X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Flocal%2Flib.pm;h=7b2cf2b9695409ea94618337ab07c061ed647a19;hb=17dc0f1174d5b6ad3fbf1a6ad517713c52c84231;hp=440757ac2aa2277b207bff7eeee9b07d5f76b289;hpb=788ea14692f083128b280e85ec9df2b9108b9272;p=p5sagit%2Flocal-lib.git diff --git a/lib/local/lib.pm b/lib/local/lib.pm index 440757a..7b2cf2b 100644 --- a/lib/local/lib.pm +++ b/lib/local/lib.pm @@ -10,7 +10,8 @@ use File::Spec (); use File::Path (); use Config; -our $VERSION = '1.008011'; # 1.8.11 +our $VERSION = '1.008_021'; # 1.8.21 development release +$VERSION = eval $VERSION; our @KNOWN_FLAGS = qw(--self-contained --deactivate --deactivate-all); @@ -443,7 +444,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 +594,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 +865,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 @@ -1097,8 +1106,8 @@ listed above. =head1 LICENSE -This library is free software and may be distributed under the same terms -as perl itself. +This is free software; you can redistribute it and/or modify it under +the same terms as the Perl 5 programming language system itself. =cut