![]() |
|
Think about Loose Coupling | |
PerlMonks |
Re^3: Basic - Perl5libby dsheroh (Monsignor) |
on Oct 28, 2010 at 08:06 UTC ( [id://867937]=note: print w/replies, xml ) | Need Help?? |
The more common way to add to @INC from within your program is with use lib. The following is equivalent to (more concise than) the code above:
...except that use lib puts the extra dirs at the start of @INC (giving them precedence over system modules, which is normally what you want) while your use of push puts them at the end (giving system modules precedence, which is normally not what you want).
In Section
Seekers of Perl Wisdom
|
|