Re: Perl can't find my libraries when run via the subversion post-commit script
From: Kris Deugau <kdeugau_at_vianet.ca>
Date: Thu, 04 Mar 2010 13:28:32 -0500
Craig Thayer wrote:
As root, or as the user the repo is accessed as?
/root isn't usually accessible by any user *other* than root in my
> And I agree it is obvious that Perl is including the directories to my libraries (so the use lib statements are working as designed as you stated). However, it is Perl that is complaining that it can't find my libraries even though they are clearly in the @INC path. I have never run into this situation before and I believe it has to do with the fact that the Subversion hook is running with no environment defined, but why it makes Perl not able to find my libs ONLY when it runs as a Subversion hook I haven't a clue.
I tried a quick test creating an empty module in /root:
===
our $foobar = "foo!";
then ran
perl -e 'use lib "/root"; use Testme;'
as root and as non-root.
Running as root succeeded, non-root failed with "Can't locate Testme.pm
I suspect you'd still have the issue even if you hardcoded the absolute
> I have temporarily resolved the problem by moving my libraries to the /usr/lib/perl5/site_perl path (which I didn't want to do) which is predefined by my Perl installation in @INC. The script now runs via the Subversion hook and finds my libraries just fine. I would, however, like to understand what causes Perl to not recognize my added paths to @INC when it runs as a Subversion hook.
perl -V should show you the standard include paths; custom local
-kgd
|
This is an archived mail posted to the Subversion Users mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.