X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Flocal%2Flib.pm;h=92fc88320f6cd125dd7b1503c5d75bfeca96d2a9;hb=refs%2Ftags%2F1.008018;hp=440757ac2aa2277b207bff7eeee9b07d5f76b289;hpb=788ea14692f083128b280e85ec9df2b9108b9272;p=p5sagit%2Flocal-lib.git diff --git a/lib/local/lib.pm b/lib/local/lib.pm index 440757a..92fc883 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.008011'; # 1.8.11 +our $VERSION = '1.008018'; # 1.8.18 our @KNOWN_FLAGS = qw(--self-contained --deactivate --deactivate-all); @@ -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 { @@ -586,7 +593,7 @@ A typical way to install local::lib is using what is known as the hasn't already installed local::lib. In this case, you'll need to install local::lib in your home directory. -If you do have administrative privileges, you will still want to set up your +Even if you do have administrative privileges, you will still want to set up your environment variables, as discussed in step 4. Without this, you would still install the modules into the system CPAN installation and also your Perl scripts will not use the lib/ path you bootstrapped with local::lib. @@ -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