in reply to Re: change where CPAN places Modules - Help Please
in thread change where CPAN places Modules - Help Please

This:

%ENV:
PERL5LIB="/root/perl5/lib/perl5:"
PERL_LOCAL_LIB_ROOT=":/root/perl5"
PERL_MB_OPT="--install_base /root/perl5"
PERL_MM_OPT="INSTALL_BASE=/root/perl5"
@INC:
/root/perl5/lib/perl5/5.16.3/x86_64-linux-thread-multi
/root/perl5/lib/perl5/5.16.3
/root/perl5/lib/perl5/x86_64-linux-thread-multi
/root/perl5/lib/perl5
/usr/local/lib64/perl5
/usr/local/share/perl5
/usr/lib64/perl5/vendor_perl
/usr/share/perl5/vendor_perl
/usr/lib64/perl5
/usr/share/perl5

Or the whole thing?

-Rich
  • Comment on Re^2: change where CPAN places Modules - Help Please

Replies are listed 'Best First'.
Re^3: change where CPAN places Modules - Help Please
by Anonymous Monk on May 02, 2017 at 00:33 UTC
      so for using that "sh Configure -Dprefix=~/p-5.18.0/" I have to re-install perl?

      -Rich

        so for using that "sh Configure -Dprefix=~/p-5.18.0/" I have to re-install perl?

        Yes

        See , you're not supposed to mess with your system perl, you're just supposed to use system tools to add modules to it (yum, apt ...)

        So you install a second/additional "local" perl ... and then it knows where to install modules without needing those extra env vars

        Root simply uses "/user/local/bin/cpan" to install modules into "/user/local/perl/..."

        Root tells his users to use "/user/local/bin/perl"

        All the users use "#!/user/local/bin/perl --" for shebang and things just work

        Now if the users want extra stuff from cpan they use PERL5LIB/INSTALL_BASE... and they don't bother root about it or other users