Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: How to install modules for local perl without changing anything on system perl?

by beech (Parson)
on Dec 23, 2015 at 23:44 UTC ( [id://1151087]=note: print w/replies, xml ) Need Help??


in reply to [Solved]: How to install modules for local perl without changing anything on system perl?

See local::lib for instructions, you don't have to use the module to install modules in a particular directory
PERL_MB_OPT='--install_base /home/username/perl5'; export PERL_MB_OP +T; PERL_MM_OPT='INSTALL_BASE=/home/username/perl5'; export PERL_MM_OPT; PERL5LIB="/home/username/perl5/lib/perl5"; export PERL5LIB;

https://metacpan.org/pod/ExtUtils::MakeMaker#PERL_MM_OPT
https://metacpan.org/pod/Module::Build#PERL_MB_OPT
https://metacpan.org/pod/perlrun#PERL5LIB
  • Comment on Re: How to install modules for local perl without changing anything on system perl?
  • Download Code

Replies are listed 'Best First'.
Re^2: How to install modules for local perl without changing anything on system perl?
by CountZero (Bishop) on Dec 24, 2015 at 10:56 UTC
    But will that not mess up any updates you (later) need to make to the system Perl?

    Or worse, the system Perl will start using the local perl modules which may be incompatible between the versions of local and system Perl?

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics

      But will that not mess up any updates you (later) need to make to the system Perl? Or worse, the system Perl will start using the local perl modules which may be incompatible between the versions of local and system Perl?

      Thats a good question :)

      I don't think you can mess up the system perl

      any installs would be done as root and root ought to have a different %ENV :)

      but if root doesn't, then the system installs just go in a different directory

      now that might cause something tricky to happen, but if you're using system tools to update the system perl, then those tools should remove PERL_ vars from the equation

      But yeah, the possibility exists, maybe :D

      However , the system perl shouldn't start using incompatible versions, as using INSTALL_BASE ought to include both version number and archname -- it doesn't do this on win32 (for some unknown reason), but it should do it on other operating systems

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (None)
    As of 2024-04-25 00:10 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found