in reply to Use lib() and require
"This is a small simple module which simplifies the manipulation of @INC at compile time.
It is typically used to add extra directories to perl's search path so that later C<use> or C<require> statements will find modules which are not located on perl's default search path."
The @INC variable is set to look in the various places AND the current directory:
mine is set for these paths:-
/usr/libdata/perl/5.00503/mach ,br>
/usr/libdata/perl/5.00503
/usr/local/lib/perl5/site_perl/5.005/i386freebsd
/usr/local/lib/perl5/site_perl/5.005
and .
so if I want to 'use'/'require' .pl progs in say /home/perl then I can specify that in the code as
use lib /home/perl; # note lib will take a list
then I can 'require' or 'use' anything in that directory.
Hope this helps some.
Cheers
Steve
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Use lib() and require
by costas (Scribe) on Apr 09, 2001 at 12:19 UTC | |
by vbrtrmn (Pilgrim) on Apr 12, 2004 at 22:36 UTC |