use lib '.';
Rick Measham
rickm at isite.net.au
Wed Oct 2 20:46:23 CDT 2002
Its not redundant as Martins output proves. Perl looks through @INC
for its modules. If I have my home-rolled Carp.pm in my local
directory then it wont be found unless I use '.';
Here it finds the one in site_perl (or wherever it happens to be)
>[107]mryan at host:~> perl -e 'print join("\n", @INC), "\n"'
>/usr/libdata/perl/5.00503/mach
>/usr/libdata/perl/5.00503
>/usr/local/lib/perl5/site_perl/5.005/i386-freebsd
>/usr/local/lib/perl5/site_perl/5.005
>.
Here it will find the one in the local directory.
>[108]mryan at host:~> perl -e 'use lib "."; print join("\n", @INC), "\n"'
>.
>/usr/libdata/perl/5.00503/mach
>/usr/libdata/perl/5.00503
>/usr/local/lib/perl5/site_perl/5.005/i386-freebsd
>/usr/local/lib/perl5/site_perl/5.005
>.
Cheers!
Rick Measham
--
--------------------------------------------------------
There are 10 kinds of people:
those that understand binary, and those that don't.
--------------------------------------------------------
The day Microsoft makes something that doesn't suck
is the day they start selling vacuum cleaners
--------------------------------------------------------
More information about the Melbourne-pm
mailing list