in reply to Specifying directories for cpan shell

Config options (and Makefile.PL/Build.PL arguments) control everything, so the best way is to fake MyConfig, example mycpan
#!/usr/bin/perl -- BEGIN { package CPAN::MyConfig; $INC{'CPAN/MyConfig.pm'} = __FILE__; ... }; my $cpan = 'path/to/cpan'; do $cpan;
I got the idea from Re: CPANPLUS custom configurations. See also mkmyconfig, Install a CPAN module at x location, Personal library with CPAN, Installation of modules in home directory, install_base.