Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Distro Pkg-Managed, broken Install.pm, sudo clears $PERL5LIB

by sundialsvc4 (Abbot)
on Oct 13, 2010 at 17:32 UTC ( [id://865127]=note: print w/replies, xml ) Need Help??


in reply to Distro Pkg-Managed, broken Install.pm, sudo clears $PERL5LIB

Many OS distro-management packages are written in Perl, and those are set up to expect a very particular CPAN setup... which they manage, like everything else, using their own package management system.   (Yeah, the cat is eating its own tail, etc, but it actually works.)

However, truly-dreadful things can happen if you inadvertantly break it.   What is slick-as-a-whistle can turn into something that has fallen and can’t get up.   And some distro-management software seems to be running on a wing and a prayer in the best of times.

The admonition therefore is a very sound one:   for code that (say) you are preparing for deployment to a web-site somewhere, set up your own CPAN-library directory, your own .cpan configuration file, everything.   Add it to your local setting of PERL5LIB.   Write scripts to add, and to undo, those environment changes.   The techniques are exactly those that you’d use to run as a non-root user at a public web-hosting service.   You can’t altogether eliminate their package repositories from @INC, because they normally compile those pathnames straight into their Perl executables if they themselves rely upon it, but this is usually not an issue.   (And since @INC is, after all, just an ordinary list, you can replace it in its entirety, within a particular piece of code.)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-26 02:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found