[Bast-commits] r5882 - in local-lib/1.000/trunk: . lib/local

apeiron at dev.catalyst.perl.org apeiron at dev.catalyst.perl.org
Fri Apr 10 02:21:21 GMT 2009


Author: apeiron
Date: 2009-04-10 03:21:20 +0100 (Fri, 10 Apr 2009)
New Revision: 5882

Modified:
   local-lib/1.000/trunk/Changes
   local-lib/1.000/trunk/MANIFEST.SKIP
   local-lib/1.000/trunk/lib/local/lib.pm
Log:
Better docs and nix the .svn files from being included in the dist.


Modified: local-lib/1.000/trunk/Changes
===================================================================
--- local-lib/1.000/trunk/Changes	2009-04-10 00:20:37 UTC (rev 5881)
+++ local-lib/1.000/trunk/Changes	2009-04-10 02:21:20 UTC (rev 5882)
@@ -1,5 +1,9 @@
 Revision history for local::lib
 
+1.003003 2009-04-09
+        - Expose the internals per RT #36846.
+        - Fix the MANIFEST up a bit.
+
 1.003002 2009-02-25
         - Add a doc patch from Torsten Raudssus <torsten at raudssus.de> that
           clarifies how to specify a directory other than ~/perl5.

Modified: local-lib/1.000/trunk/MANIFEST.SKIP
===================================================================
--- local-lib/1.000/trunk/MANIFEST.SKIP	2009-04-10 00:20:37 UTC (rev 5881)
+++ local-lib/1.000/trunk/MANIFEST.SKIP	2009-04-10 02:21:20 UTC (rev 5882)
@@ -1 +1,2 @@
 ^(?!script/|examples/|lib/|inc/|t/|Makefile.PL$|README$|MANIFEST$|Changes$|META.yml$)
+.svn

Modified: local-lib/1.000/trunk/lib/local/lib.pm
===================================================================
--- local-lib/1.000/trunk/lib/local/lib.pm	2009-04-10 00:20:37 UTC (rev 5881)
+++ local-lib/1.000/trunk/lib/local/lib.pm	2009-04-10 02:21:20 UTC (rev 5882)
@@ -11,7 +11,7 @@
 use Carp ();
 use Config;
 
-our $VERSION = '1.003002'; # 1.3.2
+our $VERSION = '1.003003'; # 1.3.3
 
 sub import {
   my ($class, @args) = @_;
@@ -402,6 +402,138 @@
 
 These values are then available for reference by any code after import.
 
+=head1 METHODS
+
+=head2 ensure_directory_structure_for
+
+=over 4
+
+=item Arguments: path
+
+=back
+
+Attempts to create the given path, and all required parent directories. Throws
+an exception on failure.
+
+=head2 print_environment_vars_for
+
+=over 4
+
+=item Arguments: path
+
+=back
+
+Prints to standard output the variables listed above, properly set to use the
+given path as the base directory.
+
+=head2 setup_env_hash_for
+
+=over 4
+
+=item Arguments: path
+
+=back
+
+Constructs the C<%ENV> keys for the given path, by calling
+C<build_environment_vars_for>.
+
+=head2 install_base_perl_path
+
+=over 4
+
+=item Arguments: path
+
+=back
+
+Returns a path describing where to install the Perl modules for this local
+library installation. Appends the directories C<lib> and C<perl5> to the given
+path.
+
+=head2 install_base_arch_path
+
+=over 4
+
+=item Arguments: path
+
+=back
+
+Returns a path describing where to install the architecture-specific Perl
+modules for this local library installation. Based on the
+L</install_base_perl_path> method's return value, and appends the value of
+C<$Config{archname}>.
+
+=head2 install_base_bin_path
+
+=over 4
+
+=item Arguments: path
+
+=back
+
+Returns a path describing where to install the executable programs for this
+local library installation. Based on the L</install_base_perl_path> method's
+return value, and appends the directory C<bin>.
+
+=head2 modulebuildrc_path
+
+=over 4
+
+=item Arguments: path
+
+=back
+
+Returns a path describing where to install the C<.modulebuildrc> file, based on
+the given path.
+
+=head2 resolve_empty_path
+
+=over 4
+
+=item Arguments: path
+
+=back
+
+Builds and returns the base path into which to set up the local module
+installation. Defaults to C<~/perl5>.
+
+=head2 resolve_home_path
+
+=over 4
+
+=item Arguments: path
+
+=back
+
+Attempts to find the user's home directory. If installed, uses C<File::HomeDir>
+for this purpose. If no definite answer is available, throws an exception.
+
+=head2 resolve_relative_path
+
+=over 4
+
+=item Arguments: path
+
+=back
+
+Translates the given path into an absolute path.
+
+=head2 resolve_path
+
+=over 4
+
+=item Arguments: path
+
+=back
+
+Calls the following in a pipeline, passing the result from the previous to the
+next, in an attempt to find where to configure the environment for a local
+library installation: L</resolve_empty_path>, L</resolve_home_path>,
+L</resolve_relative_path>. Passes the given path argument to
+L</resolve_empty_path> which then returns a result that is passed to
+L</resolve_home_path>, which then has its result passed to
+L</resolve_relative_path>. The result of this final call is returned from
+L</resolve_path>.
+
 =head1 A WARNING ABOUT UNINST=1
 
 Be careful about using local::lib in combination with "make install UNINST=1".




More information about the Bast-commits mailing list