Subject: | use $ENV{PERL_LOCAL_LIB_ROOT} as default |
Short:
use $ENV{PERL_LOCAL_LIB_ROOT} as a default for resolve_path_empty
Long:
I don't like ~/.perl5 as a default. And I don't like to type the path to
my own value twice like in:
eval $(perl -M$HOME/.perl -Mlocal::lib=$HOME/.perl)
I tried this:
export PERL_LOCAL_LIB_ROOT=~/.perl
perl "-M$PERL_LOCAL_LIB_ROOT" "-Mlocal::lib"
But it failed:
- everything was set to ~/.perl5
- ~/.perl5 has been created
So I tried:
export PERL_LOCAL_LIB_ROOT=~/.perl
perl "-M$PERL_LOCAL_LIB_ROOT" "-Mlocal::lib=$PERL_LOCAL_LIB_ROOT"
But it failed: local::lib does not output anything
So I had to do:
MY_PERL_LOCAL_LIB_ROOT=~/.perl
perl "-M$MY_PERL_LOCAL_LIB_ROOT" "-Mlocal::lib=$MY_PERL_LOCAL_LIB_ROOT"
unset MY_PERL_LOCAL_LIB_ROOT
However this against my original aim to keep my shell profile clean.
I'm working on a patch to make this work:
export PERL_LOCAL_LIB_ROOT=~/.perl
perl "-I$PERL_LOCAL_LIB_ROOT" -Mlocal::lib
And maybe even (with import trickery in the -e case):
perl -I ~/.perl -Mlocal::lib
The PERL_LOCAL_LIB_ROOT environement variable should also be recognized
as a target for the bootstrap.
--
Olivier Mengué - http://search.cpan.org/~dolmen/ http://github.com/dolmen/