Do you know where your variables are? | |
PerlMonks |
Re: How to install modules for local perl without changing anything on system perl?by jcb (Parson) |
on Dec 23, 2015 at 23:38 UTC ( [id://1151086]=note: print w/replies, xml ) | Need Help?? |
A method for this that I've used in the past is to have an account other than root for building software (then only run the install step as root). If you have (or can make) such an account, simply chown -R not-root /opt/apps/perl/perl5220, run the CPAN tools as not-root, and see if it works. Since you are not running the install as root, it will fail if an attempt is made to write to the system perl, and you can be confident that, at worst, only the app perl that you were trying to change can be messed up. Afterwards, chown -R root /opt/apps/perl/perl5220 will put things back the way they were. Unless, of course, /opt/app/perl/perl5220 is already owned by an account other than root, in which case you can avoid the chown dance and can simply run the CPAN tools under that account, where they will not be allowed to touch the system perl. A final caveat: This assumes that the system perl is owned by root. If the system perl is not owned by root, then you will need to figure out who changed that and why.
In Section
Seekers of Perl Wisdom
|
|