http://www.perlmonks.org?node_id=688434


in reply to best way to install modules in your home directory?

The first half of your problem can be solved by not using sudo, but really become root (su -). Then root will use his own home directory.

An even better solution is not to install anything with cpan directly, but build a package that is native to your operating system. For Debian dh-make-perl is really useful, and very good usable in Testing (aka Lenny), I'm sure there are similar utilities for other distributions and Unixes (for example cpan2dist from CPANPLUS).