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

pc88mxer has asked for the wisdom of the Perl Monks concerning the following question:

I was wondering what's the best practice to use when you want to install CPAN modules in your own 'lib' directory.

I am running into problems when I want switch between installing modules in a private directory and installing them (as root) in the system locations. Specifically, I get root-owned files in my home build directory which are a nuisance.

Even as a normal user I can see the utility in being able to easily switch between different CPAN configurations. For instance, different application may each have their own 'lib' directory and hence their own CPAN install configuration.

What's a good way to manage this problem?