in reply to Re^4: 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.

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

Replies are listed 'Best First'.
Re^6: perlbrew and cpan
by CountZero (Bishop) on Aug 07, 2014 at 15:04 UTC
    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.

        perlbrew is quite safe, but the whole issue was about using sudo cpan.

        I am not sure that by pretending to be the superuser you still use the links and paths of yourself as a regular user. If all of a sudden perl no longer points to the perl installation in your home directory, but rather to the system perl, you could be in for a nasty surprise down the road.

        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