Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: perl default include library

by pileofrogs (Priest)
on Jun 30, 2010 at 22:49 UTC ( [id://847425]=note: print w/replies, xml ) Need Help??


in reply to Re: perl default include library
in thread perl default include library

++

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://847425]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-03-29 06:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found