Cpan With Sudo
Join the DZone community and get the full member experience.Join For Free
http://sial.org/howto/perl/life-with-cpan/ If CPAN is installed in your home directory, the system-wide cpan may cause problems when run via sudo(8), as by default sudo will invoke CPAN using the ~/.cpan/CPAN/MyConfig.pm configuration, but as root, which causes no end of trouble. To avoid this problem, reset the HOME environment variable with the -H option to sudo when invoking CPAN.
sudo -H cpan