X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Flocal%2Flib.pm;h=6b8c73304de4b29d5cf52679d8caa4f56ca6d860;hb=98d589dad5bd3e5c70f100ef70d57c27fb287579;hp=578c71a58adb747dad65780403fa424cb4ef0fd6;hpb=5a98906e00669a6aed56e8a866b7957d935a0666;p=p5sagit%2Flocal-lib.git diff --git a/lib/local/lib.pm b/lib/local/lib.pm index 578c71a..6b8c733 100644 --- a/lib/local/lib.pm +++ b/lib/local/lib.pm @@ -8,10 +8,9 @@ use 5.008001; # probably works with earlier versions but I'm not supporting them use File::Spec (); use File::Path (); -use Carp (); use Config; -our $VERSION = '1.008002'; # 1.8.2 +our $VERSION = '1.008007'; # 1.8.4 our @KNOWN_FLAGS = qw(--self-contained --deactivate --deactivate-all); @@ -175,6 +174,7 @@ sub resolve_home_path { } }; unless (defined $homedir) { + require Carp; Carp::croak( "Couldn't resolve homedir for " .(defined $user ? $user : 'current user') @@ -207,6 +207,8 @@ sub setup_local_lib_for { my $interpolate = LITERAL_ENV; my @active_lls = $class->active_paths; + $path = $class->ensure_dir_structure_for($path); + if (! $deactivating) { if (@active_lls && $active_lls[-1] eq $path) { exit 0 if $0 eq '-'; @@ -221,8 +223,6 @@ sub setup_local_lib_for { } } - $path = $class->ensure_dir_structure_for($path); - if ($0 eq '-') { $class->print_environment_vars_for($path, $deactivating, $interpolate); exit 0; @@ -645,7 +645,7 @@ C, you can use this: set PATH=C:\DOCUME~1\ADMINI~1\perl5\bin;%PATH% ### To set the environment for this shell alone - C:\>perl -Mlocal::lib > %TEMP%\tmp.bat && %TEMP%\tmp.bat && del %TEMP%\temp.bat + C:\>perl -Mlocal::lib > %TEMP%\tmp.bat && %TEMP%\tmp.bat && del %TEMP%\tmp.bat ### instead of $(perl -Mlocal::lib=./) If you want the environment entries to persist, you'll need to add then to the @@ -1015,6 +1015,8 @@ G. de Oliveira . Improvements to stacking multiple local::lib dirs and removing them from the environment later on contributed by Andrew Rodland . +Patch for Carp version mismatch contributed by Hakim Cassimally . + =head1 COPYRIGHT Copyright (c) 2007 - 2010 the local::lib L and L as