X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Flocal%2Flib.pm;h=2e477e66465043896e0a0ceb01f7dadac9d8ba0a;hb=1cd322bb6bfa4218fc286b356ee72a83ac8e18e1;hp=a97a78f99484cda181228f35a2aa8a61d5318e04;hpb=c1ed5f4bf162501712d308bde66c8cb1d162ddc2;p=p5sagit%2Flocal-lib.git diff --git a/lib/local/lib.pm b/lib/local/lib.pm index a97a78f..2e477e6 100644 --- a/lib/local/lib.pm +++ b/lib/local/lib.pm @@ -10,7 +10,7 @@ use File::Spec (); use File::Path (); use Config; -our $VERSION = '1.008007'; # 1.8.4 +our $VERSION = '1.008011'; # 1.8.11 our @KNOWN_FLAGS = qw(--self-contained --deactivate --deactivate-all); @@ -234,7 +234,15 @@ sub setup_local_lib_for { exit 0; } else { $class->setup_env_hash_for($path, $deactivating); - @INC = _uniq(split($Config{path_sep}, $ENV{PERL5LIB}), @INC); + my $arch_dir = $Config{archname}; + @INC = _uniq( + ( + # Inject $path/$archname for each path in PERL5LIB + map { ( File::Spec->catdir($_, $arch_dir), $_ ) } + split($Config{path_sep}, $ENV{PERL5LIB}) + ), + @INC + ); } } @@ -397,7 +405,7 @@ sub _env_list_value { && (!$options{exists} || -e $_)) } map { if (ref $_ eq 'SCALAR' && $options{interpolate} == INTERPOLATE_ENV) { - exists $ENV{${$_}} ? (split /\Q$Config{path_sep}/, $ENV{${$_}}) : () + defined $ENV{${$_}} ? (split /\Q$Config{path_sep}/, $ENV{${$_}}) : () } else { $_ } @@ -419,13 +427,12 @@ sub build_activate_environment_vars_for { PERL5LIB => _env_list_value( { interpolate => $interpolate, exists => 0, empty => '' }, - $class->install_base_arch_path($path), $class->install_base_perl_path($path), \'PERL5LIB', ), PATH => _env_list_value( { interpolate => $interpolate, exists => 0, empty => '' }, - $class->install_base_bin_path($path), + $class->install_base_bin_path($path), \'PATH', ), ) @@ -1017,6 +1024,14 @@ On Win32 systems, C is also examined. =back +=head1 SEE ALSO + +=over 4 + +=item * L + +=back + =head1 SUPPORT IRC: