Basically, I tried this on Ubuntu and OS X:
wget -O- http://cpanmin.us | perl - -l ~/.perl5 App::cpanminus local::lib
eval `perl -I ~/.perl5/lib/perl5 -Mlocal::lib`
I don't see anything that says
PERL_LOCAL_LIB_ROOT controls where local::lib installs itself. And there's absolutely no reason to believe it'll influence where the other module you are installing (App::cpanminus) will be installed.
Both App::cpanminus and local::lib use ExtUtils::MakeMaker as their installer, so the following does the trick:
One would normally configure the Module::Build installer too, but neither App::cpanminus nor local::lib have dependencies.
export PERL_MB_OPT="--install_base $HOME/.perl5"
The procedure actually documented in the docs:
wget http://search.cpan.org/CPAN/authors/id/H/HA/HAARG/local-lib-2.000019.tar.gz tar xvzf local-lib-2.000019.tar.gz cd local-lib-2.000019 perl Makefile.PL --bootstrap=~/.perl5 make test && make install echo 'eval "$(perl -I$HOME/.perl5/lib/perl5 -Mlocal::lib)"' >>~/.bashrc
Then, from a fresh shell, you can install App::cpanminus.