Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Nobody installs modules by hand, they pretty much always install them via the CPAN shell.

    And thus, "sudo cpan" is probably far more common than the alternative.
    • Run cpan as a normal user and then...

      o conf make_install_make_command 'sudo make'
      o conf mbuild_install_build_command 'sudo ./Build'

      That makes the CPAN shell do the safe thing. Normal first-time configuration these days asks if you'd like to do that, but ONLY if you're not root. If you are root it should probably advise you restart as a non-root user.

      • Unfortunately, that's so obscure as to be impractical.

        If cpan really shouldn't be run as root, then CPAN should refuse to run as root if sudo is available.
        • It asks you as part of the first-time configuration. Of course, this doesn't help existing users. And I agree, the CPAN shell should pump out a big warning if it's being run as root.

          Do you want to use a different make command for 'make install'?
          Cautious people will probably prefer:
           
              su root -c make
          or
              sudo make
          or
              /path1/to/sudo -u admin_account /path2/to/make
           
          or some such. Your choice:
           
          Do you want to use a different command for './Build install'?
          Sudo users will probably prefer:
           
              su root -c ./Build
          or
              sudo ./Build
          or
              /path1/to/sudo -u admin_account ./Build
           
          or some such. Your choice: