New CPAN option for sudo

cbrandtbuffalo on 2006-07-28T14:22:03

So maybe I'm a little slow to find this out, but the cpan shell provided by the CPAN.pm module has a cool new option. In the past, I've always done 'sudo cpan' on my box to install things on the system, but then all my .cpan stuff is owned by root. Now, if you run this command in your cpan shell:

o conf make_install_make_command 'sudo make'

the cpan shell will run everything as you, then run 'sudo make install' for the last step, just like you would if installing by hand! Very cool.

If you've been doing the 'sudo cpan' thing, you'll need to clean up your .cpan directory because it's owned by root. You can probably chown it, but I chose to just delete it all.


But then you're still root....

Abigail on 2006-07-28T15:15:37

I don't have to be root at any time when installing perl, or any CPAN modules. Everything Perl is owned by a user 'camel' on my box - and it's the 'camel' user that does the cpan thingybob.
  su camel cpan -i Meta

Auuughhh!!

Aristotle on 2006-07-28T18:31:39

Not Meta!