Permalink
Browse files

Merge pull request #180 from kmcgrath/feature-reset-locallib

reset local::lib on multiple use
  • Loading branch information...
2 parents d34d605 + b766ccd commit 950787f9cd795bb0d1213975bb1312f22b781525 @gugod gugod committed Dec 27, 2011
Showing with 846 additions and 8 deletions.
  1. +1 −1 dev-bin/build.sh
  2. +1 −0 dev-bin/update-fatlib.pl
  3. +9 −0 lib/App/perlbrew.pm
  4. +835 −7 perlbrew
View
@@ -1,6 +1,6 @@
#!/bin/sh
-export PERL5LIB=lib
+export PERL5LIB=lib:$PERL5LIB
# fatpack trace bin/perlbrew
# fatpack packlists-for `cat fatpacker.trace` > packlists
# fatpack tree `cat packlists`
View
@@ -7,6 +7,7 @@
my $modules = [ split /\s+/, <<MODULES ];
local/lib.pm
File/Path/Tiny.pm
+Capture/Tiny.pm
MODULES
my $packer = App::FatPacker->new;
View
@@ -1120,6 +1120,15 @@ sub perlbrew_env {
if ($lib_name) {
require local::lib;
+
+ if (
+ $ENV{PERL_LOCAL_LIB_ROOT}
+ && $ENV{PERL_LOCAL_LIB_ROOT} =~ /^$PERLBREW_HOME/
+ ) {
+ my %deactivate_env = local::lib->build_deact_all_environment_vars_for($ENV{PERL_LOCAL_LIB_ROOT});
+ @env{keys %deactivate_env} = values %deactivate_env;
+ }
+
my $base = "$PERLBREW_HOME/libs/${perl_name}\@${lib_name}";
if (-d $base) {
Oops, something went wrong.

0 comments on commit 950787f

Please sign in to comment.