Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: CPAN module and @INC

by andreychek (Parson)
on Jul 01, 2001 at 10:15 UTC ( #92992=note: print w/replies, xml ) Need Help??


in reply to CPAN module and @INC

I unfortunatly do not know any methods to "permanently" change the @INC path, without recompiling Perl. Recompiling Perl always is an option though -- and if you are using some version of Linux, you could always use one of those prepackaged versions if you aren't in the mood to compile. If you choose to recompile, just check to make sure it's setting @INC paths properly at compile time (I believe it's a compile time option if I'm not mistaken).

Since CPAN insists on putting things in /usr/lib/perl5 on your box, it sounds like your Perl install is confused. First off, are you certain that you don't have any rogue versions of Perl living in /usr/bin? If so, that could certainly cause the problem you're seeing now.

However, assuming thats not the problem, and for some reason or another you don't really feel like recompiling everything, there are two fairly simple things you could do to remedy your problem:

  • The shell environment variable PERL5LIB acts just as @INC does.. or better said, it's like saying "use lib". Perl will search for modules in any directory listed in that variable, so you could set it for a particular user, or for the entire system in a login script.

  • Secondly, you could always symlink /usr/lib/perl5 to /usr/local/lib/perl5. In that case, anything CPAN installed would end up in your @INC every time. While it is a hack around another problem on your system, it would certaintly get you running quickly, and by all means there's nothing wrong with that.. it's just treating the symptom though, not the actual problem.
    -Eric
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Node Status?
    node history
    Node Type: note [id://92992]
    help
    Chatterbox?
    [Eily]: BTW LanX, you should try typing a few random chars at the beginning of each message. This will prevent expansion :P
    [LanX]: qwiud you sthink so?
    [LanX]: zxwqbd good idea! :)
    LanX embraces his new habit spqopiwjdnq
    [ambrus]: qQUkZTmHTuKxStGT- BzTIK9gdudif7TkTLI t3mnF144UaAZjkknXY 8nN-QM19wHBsTrp5vB lEYU_Kksa7X1RIBB4x EWLD5X7SW3jGX5ryfN OMn_yL5FTdQxzjhtyX mKN9sjUCzBNHK5Rrp0 S2WMUvIb1i9aZFgjtq VR0GH1bjPMvm1G16iz hBqc1U6toPd4FbJOFj VsOeT745AN1_pO88rD SRAYKtBZwCZedESZmN mvutrOTHiSNwflB- pRfn_k
    [Eily]: so far it seems to work
    Your Mother reminds the monks they should be grateful not to share an office, lest they be subjugated to constant inanities like, "Czech please!"
    [LanX]: what's strange is that the "Cowboy you said this already" message is missing #dqiwd
    [LanX]: YM: BTW learn to mute your humanity
    [Your Mother]: Cumin? Now I want tacos...

    How do I use this? | Other CB clients
    Other Users?
    Others taking refuge in the Monastery: (17)
    As of 2017-03-27 16:53 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Should Pluto Get Its Planethood Back?



      Results (320 votes). Check out past polls.