And release 1.008004.
[p5sagit/local-lib.git] / lib / local / lib.pm
index 098c31e..87d1869 100644 (file)
@@ -11,7 +11,7 @@ use File::Path ();
 use Carp ();
 use Config;
 
-our $VERSION = '1.008001'; # 1.8.1
+our $VERSION = '1.008004'; # 1.8.4
 
 our @KNOWN_FLAGS = qw(--self-contained --deactivate --deactivate-all);
 
@@ -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;
@@ -789,6 +789,19 @@ given path as the base directory.
 Constructs the C<%ENV> keys for the given path, by calling
 L</build_environment_vars_for>.
 
+=head2 active_paths
+
+=over 4
+
+=item Arguments: None
+
+=item Return value: @paths
+
+=back
+
+Returns a list of active C<local::lib> paths, according to the
+C<PERL_LOCAL_LIB_ROOT> environment variable.
+
 =head2 install_base_perl_path
 
 =over 4