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


in reply to Installing CPAN without root access

Bootstrap:
$ PATH="$PATH:~/perl5/bin" $ export PERL5LIB=~/perl5/lib/perl5 $ export PERL_MB_OPT="--install_base '$HOME/perl5'" $ export PERL_MM_OPT="INSTALL_BASE=$HOME/perl5" $ curl -L http://cpanmin.us | perl - -l ~/perl5 App::cpanminus local:: +lib
Then adapt your .profile for local::lib and cpanm by adding this line:
eval $(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)
Now you can just do: cpanm any-module