use lib '.';
Ryan, Martin
Martin.Ryan at sensis.com.au
Wed Oct 2 20:31:11 CDT 2002
> > Doesn't a Perl program automatically have access to programs
> > in the current directory?
>
> It certainly seems to, just tried it.
>
Is the context such that '.' would ever be removed from @INC?
That's the only reason I could see for "use lib '.'".
Check this out - certainly looks redundant to me...
[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
.
[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
.
[109]mryan at host:~>
Cheers,
Martin
More information about the Melbourne-pm
mailing list