in reply to Re: Why is cpanm installing Perl5 modules in the wrong spot?
in thread Why is cpanm installing Perl5 modules in the wrong spot?

run it as a root or with the --sudo option

FWIW, I would always use --sudo instead of running cpanm with elevated privs so that the build and test phases are run as the unprivileged user. It is only the installation into the protected directories which requires root access and that's what --sudo does. You are still trusting the module author for that final installation phase, of course.


🦛

Replies are listed 'Best First'.
Re^3: Why is cpanm installing Perl5 modules in the wrong spot?
by dsheroh (Monsignor) on Feb 08, 2021 at 08:19 UTC
    I suspect the "less safe option" comment wasn't meant to say that running as root is better than using sudo, but rather was an attempt to scare the user away from wanting to do a system-wide install at all. (i.e., "running as root or using sudo is less safe than a local-lib install") Because the current fad is to treat the system perl as if it's made of plutonium and should never be approached or touched in any way at all.