I typically don't run cpan via sudo but rather set the install commands within cpan to use sudo. From the cpan> prompt:<div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div><font face="'courier new', monospace">cpan> o conf make_install_make_command 'sudo /usr/bin/make'</font></div><div><font face="'courier new', monospace">cpan> o conf mbuild_install_build_command 'sudo ./Build'</font></div>
<div><font face="'courier new', monospace">cpan> o conf commit # may not be needed</font></div></blockquote><div><div><br><div class="gmail_quote">Then, whenever you install via cpan, it will use sudo to install modules. </div>
<div class="gmail_quote"><br></div><div class="gmail_quote">Also, I often will run cpan thusly:</div><div class="gmail_quote"><br></div></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div><div><div class="gmail_quote"><font face="'courier new', monospace">$ PERL_MM_USE_DEFAULT=1 cpan Bundle::CPAN</font></div></div></div></blockquote><div><div><div class="gmail_quote"><br>
</div><div class="gmail_quote">That causes cpan to accept the default answers to any prompts as it installs the CPAN bundle. This is usually so I don't have to repeatedly answer "y" to install required modules.</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">Since you're asking about upgrading, there's another useful thing you can do:</div>
<div class="gmail_quote"><br></div></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><div class="gmail_quote"><font face="'courier new', monospace">perl -MCPAN -e 'CPAN->upgrade(/^Catalyst::/)'</font></div>
</div></div></blockquote><div><div><div class="gmail_quote"><br></div><div class="gmail_quote">That'll upgrade all of the installed modules that start with "Catalyst::" read the CPAN docs for more info.</div>
<div class="gmail_quote">
<br></div><div class="gmail_quote">hope this helps, </div><div class="gmail_quote"><br></div><div class="gmail_quote">-Scott</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Fri, Apr 9, 2010 at 11:58 AM, Tim McDaniel <span dir="ltr"><<a href="mailto:tmcd@panix.com" target="_blank">tmcd@panix.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I've been lazy due to being on a single-user machine, either at home<br>
or a Windows box at work.<br>
<br>
I got IT at work to install Perl 5.10.1 on a server. I want to update<br>
the modules for all users. I've had an odd amount of trouble finding<br>
info on the Proper Way to upgrade -- maybe my Google-fu is weak today.<br>
Is it as simple as "sudo cpan upgrade"? Should I worry about<br>
upgrading CPAN itself first, if necessary, and if so, how? Are there<br>
any modifications due to<br>
Red Hat Enterprise Linux Server release 5.4 (Tikanga)<br>
?<br><font color="#888888">
<br>
-- <br>
Tim McDaniel, <a href="mailto:tmcd@panix.com" target="_blank">tmcd@panix.com</a><br>
_______________________________________________<br>
Austin mailing list<br>
<a href="mailto:Austin@pm.org" target="_blank">Austin@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/austin" target="_blank">http://mail.pm.org/mailman/listinfo/austin</a><br>
</font></blockquote></div><br></div></div>