XP is just a number | |
PerlMonks |
Re^5: use lib current directoryby syphilis (Archbishop) |
on Feb 25, 2014 at 22:54 UTC ( [id://1076203]=note: print w/replies, xml ) | Need Help?? |
doesn't explain why new OS requires moving "." to the top I doubt that it's a requirement of the OS. If you have a module named FOO.pm in "." and also in (say) /usr/share/perl5, and your code contains use FOO; then, in the first instance, it's the FOO.pm from /usr/share/perl5 that gets loaded. But in the second instance it's the FOO.pm from "." that gets loaded. This happens because use FOO; tells perl to search through @INC from beginning to end, and load the first module named FOO.pm that it finds. So ... if there's some problem with the FOO.pm that's in /usr/share/perl5 but the one in "." is ok, then it makes a big difference whether "." is searched before or after /usr/share/perl5. I don't think you've told us the actual error you get if you don't use lib "."; What is that error message ? Cheers, Rob
In Section
Seekers of Perl Wisdom
|
|