laziness, impatience, and hubris | |
PerlMonks |
Re^2: perl default include libraryby pileofrogs (Priest) |
on Jun 30, 2010 at 22:49 UTC ( [id://847425]=note: print w/replies, xml ) | Need Help?? |
++ As a sysadmin and perl user, I've run into similar problems before and they almost always stem from multiple perl binaries installed. You can also get into multiple copies of cpan, and you can get cpan behaving differently depending on what user you log in as. And which of your multiple binaries is cpan executing? More concretely, look for /usr/local/bin/perl and /usr/bin/perl. Run "which perl" and "which cpan". Scripts usually have a path in the 1st line, like "#! /usr/bin/perl" so if you have a /usr/local/bin/perl and a /usr/bin/perl and your scripts start with "#! /usr/bin/perl" and your $PATH has /usr/local/bin/ before /usr/bin, you'll be calling the a different binary from the command line than when you execute scripts. E.G. "perl -Mcpan -e shell" would run under /usr/local/bin/perl, while running "cpan" might run under /usr/bin/perl. If you're compiling your own perl, make sure you know where it lives and make sure you call it with the full path and make sure cpan calls it as well. It might even be a good idea to put it outside of the usual path (/usr/local/mybin/perl, say), so you know for sure when you call it or the distro installed version. I always keep one and only one perl binary on my systems to avoid this problem. Good luck! --Pileofrogs
In Section
Seekers of Perl Wisdom
|
|