APM: installing modules on a virtual server
Sam Foster
austin.pm at sam-i-am.com
Tue Sep 28 14:42:34 CDT 2004
Ian Remmler wrote:
> If by "gave me nothing" above, you mean there was no output from
> the command, that's normal. Just do a "set |grep PERL5LIB" or
> "echo $PERL5LIB" to see the contents. If you already know this
> stuff, excuse the wasted bytes.
>
> Unless the perl binary is wonkey, I can't see a reason why that
> shouldn't work. I'm using a similar setup at work with no
> problems. I haven't needed the 'use lib' trick.
>
Ahh.. Thank you Ian for pointing out the should-have-been-obvious.
PERL5LIB was indeed being set, but running the cpan shell having set it,
gave me the same result - modules installed to ~/perl5lib are not being
found.
In the Test::* example, I've got
~/perl5lib/lib/Test/Builder.pm
~/perl5lib/lib/Test/Harness
~/perl5lib/lib/Test/Harness.pm
~/perl5lib/lib/Test/More.pm
~/perl5lib/lib/Test/Simple.pm
~/perl5lib/lib/Test/Tutorial.pod
(~/perl5lib resolves to /home/usgm/perl5lib)
yet, the File::Slurp tests complain:
t/stdin.............Can't locate Test/More.pm in @INC (@INC contains:
blib/arch blib/lib /usr/lib/perl5/5.6.1/i686-linux
/usr/lib/perl5/5.6.1/i686-linux /usr/lib/perl5/5.6.1/i686-linux
/usr/lib/perl5/5.6.1 /home/usgm/perl5lib /usr/lib/perl5/5.6.1/i686-linux
/usr/lib/perl5/5.6.1/i686-linux /usr/lib/perl5/5.6.1
/usr/lib/perl5/site_perl/5.6.1/i686-linux
/usr/lib/perl5/site_perl/5.6.1/i686-linux /usr/lib/perl5/site_perl/5.6.1
/usr/lib/perl5/site_perl/5.6.1/i686-linux /usr/lib/perl5/site_perl/5.6.1
/usr/lib/perl5/site_perl . /usr/lib/perl5/5.6.1/i686-linux
/usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i686-linux
/usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl .) at t/stdin.t
line 9.
/home/usgm/perl5lib is in fact in @INC... However,
export PERL5LIB = ~/perl5lib/lib
does make it all work. I guess I was expecting it to search down from
~/perl5lib, it didn't occur to me I needed the extra '/lib'.
thanks all, I think I'm back on track.
Sam
More information about the Austin
mailing list