From: Eden Cardim Date: Sat, 8 Sep 2012 14:01:47 +0000 (-0300) Subject: adding docs on how to maintain multiple perls X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=05223ac6681c92c1cd5c84ef3a2d885284b86715;p=p5sagit%2Flocal-lib.git adding docs on how to maintain multiple perls --- diff --git a/lib/local/lib.pm b/lib/local/lib.pm index 9945da3..307eb32 100644 --- a/lib/local/lib.pm +++ b/lib/local/lib.pm @@ -601,6 +601,12 @@ to specify the name of the directory when you call bootstrap, as follows: perl Makefile.PL --bootstrap=~/foo +If you're using multiple versions of perl via something like +L, it might be useful to bootstrap to a specific directory +for the current version of perl you're running: + + perl Makefile.PL --bootstrap=$HOME/perl5/$(perl -e 'print $]') + 3. Run this: (local::lib assumes you have make installed on your system) make test && make install @@ -624,6 +630,12 @@ import parameter to the call of the local::lib module like this way: echo 'eval $(perl -I$HOME/foo/lib/perl5 -Mlocal::lib=$HOME/foo)' >>~/.bashrc +If you used the perl-version-specific bootstrap before, you'll need: + + echo "eval $(perl -Mlocal::lib=$HOME/perl5/$(perl -e 'print $]'))" >>~/.bashrc + +Make sure you re-eval C<.bashrc> every time you switch perls. + After writing your shell configuration file, be sure to re-read it to get the changed settings into your current shell's environment. Bourne shells use C<. ~/.bashrc> for this, whereas C shells use C.