in reply to Re^3: perlbrew and cpan
in thread perlbrew and cpan

I find it strange that perlbrew allows the system perl to be updated; regardless that it's been ran with a sudo.

Shouldn't that happen only after perlbrew off had been given? when the system perl is available.

Replies are listed 'Best First'.
Re^5: perlbrew and cpan
by ikegami (Patriarch) on Aug 07, 2014 at 14:02 UTC

    I find it strange that perlbrew allows the system perl to be updated

    The biggest reason to use perlbrew is to avoid breaking tools that use the system Perl. (Most people will phrase that as "I can't get permission to modify the system Perl".) Disappearing the system Perl would not be a good thing.

    perlbrew is a specialized PATH manipulator, that's it.

Re^5: perlbrew and cpan
by Anonymous Monk on Aug 07, 2014 at 09:45 UTC

    I find it strange that perlbrew allows the system perl to be updated; regardless that it's been ran with a sudo.

    Shouldn't that happen only after perlbrew off had been given? when the system perl is available.

    Um, what are you talking about? Where is your proof (shell session log)?

      I don't have access to my Linux-system with perlbrew now, so read with caution.

      Perlbrew's genius "trick" is to re-link perl to whatever version of perl you made active (there is more involved than just that, but it is the basis).

      When you sudo you elevate yourself to the level of the admin and it may be that it also messes with your links or your environment or such. Without sudo I cannot touch the system Perl, with sudo that is one safety lock that is missing and I'd rather not take any chances. That's why I never do a sudo install of Perl-modules. Perhaps I am overcautious, but better safe than sorry.

      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

        From perlbrew:

        "By default, perlbrew builds and installs perls into $ENV{HOME}/perl5/perlbrew directory. To use a different directory, set this environment variable in your bashrc to the directory in your shell RC before sourcing perlbrew's RC."

        They'd have to have deliberately made some very poor configuration changes for perlbrew to nuke a system perl.