X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2Flocal-lib.git;a=blobdiff_plain;f=lib%2Flocal%2Flib.pm;h=24cab90158fc66f76a324279ecb7f037b3e12a60;hp=440757ac2aa2277b207bff7eeee9b07d5f76b289;hb=24351831cd9bba6bc993566324483b05bbd5d52c;hpb=788ea14692f083128b280e85ec9df2b9108b9272 diff --git a/lib/local/lib.pm b/lib/local/lib.pm index 440757a..24cab90 100644 --- a/lib/local/lib.pm +++ b/lib/local/lib.pm @@ -443,7 +443,14 @@ sub active_paths { my ($class) = @_; return () unless defined $ENV{PERL_LOCAL_LIB_ROOT}; - return grep { $_ ne '' } split /\Q$Config{path_sep}/, $ENV{PERL_LOCAL_LIB_ROOT}; + + return grep { + # screen out entries that aren't actually reflected in @INC + my $active_ll = $class->install_base_perl_path($_); + grep { $_ eq $active_ll } @INC + } + grep { $_ ne '' } + split /\Q$Config{path_sep}\E/, $ENV{PERL_LOCAL_LIB_ROOT}; } sub build_deactivate_environment_vars_for { @@ -857,7 +864,8 @@ L. =back Returns a list of active C paths, according to the -C environment variable. +C environment variable and verified against +what is really in C<@INC>. =head2 install_base_perl_path