"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
In reply to Re: Use lib() and require
by Anonymous Monk
in thread Use lib() and require
by costas
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |