From: Andrew Rodland Date: Tue, 15 Feb 2011 21:18:44 +0000 (-0600) Subject: If PERL_LOCAL_LIB_ROOT is already set, add ourselves to the end X-Git-Tag: 1.008004~15 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=393c618de8cd43901ba63b8529bfd5db23151b73;p=p5sagit%2Flocal-lib.git If PERL_LOCAL_LIB_ROOT is already set, add ourselves to the end instead of replacing it, so that we can keep track of multiple l::ls in effect. --- diff --git a/lib/local/lib.pm b/lib/local/lib.pm index 65e5365..2971fee 100644 --- a/lib/local/lib.pm +++ b/lib/local/lib.pm @@ -321,7 +321,15 @@ sub setup_env_hash_for { sub build_environment_vars_for { my ($class, $path, $interpolate) = @_; return ( - PERL_LOCAL_LIB_ROOT => $path, + PERL_LOCAL_LIB_ROOT => join($Config{path_sep}, + (($ENV{PERL_LOCAL_LIB_ROOT}||()) ? + ($interpolate == INTERPOLATE_ENV + ? ($ENV{PERL_LOCAL_LIB_ROOT}||()) + : (($^O ne 'MSWin32') ? '$PERL_LOCAL_LIB_ROOT' + : '%PERL_LOCAL_LIB_ROOT%' )) + : ()), + $path + ), PERL_MB_OPT => "--install_base ${path}", PERL_MM_OPT => "INSTALL_BASE=${path}", PERL5LIB => join($Config{path_sep},