X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2Flocal-lib.git;a=blobdiff_plain;f=lib%2Flocal%2Flib.pm;h=1dd92a749d72090c11bc0b989a34b1ebc01d273d;hp=128648cea623858ebe350ef0c30b30bd16f2ea5b;hb=b0c48f8e34169eac29f6f3b662d430a1731439d1;hpb=4f9db5b432f6e19df7c489bb05c4d1cfcca978a2 diff --git a/lib/local/lib.pm b/lib/local/lib.pm index 128648c..1dd92a7 100644 --- a/lib/local/lib.pm +++ b/lib/local/lib.pm @@ -11,7 +11,7 @@ use File::Path (); use Carp (); use Config; -our $VERSION = '1.004009'; # 1.4.9 +our $VERSION = '1.005000'; # 1.5.0 my @KNOWN_FLAGS = (qw/--self-contained/); sub import { @@ -567,6 +567,26 @@ PATH is appended to, rather than clobbered. These values are then available for reference by any code after import. +=head1 CREATING A SELF-CONTAINED SET OF MODULES + +You can use local::lib to prepare a directory which contains a module and all +of its non-core dependencies. The C<--self-contained> option ignores any +globally installed modules when resolving dependencies, only considering +modules installed in a "local::lib" directory or provided by core Perl. + +A use-case for this feature would be to prepare to deploy a whole "stack" of +module dependencies on a new machine, even if you have copies of the same +dependencies installed globally already. + +The C<--self-contained> option should be used like this: + + # Install LWP and *all non-core* dependencies to the 'my_lwp' directory + perl -MCPAN -Mlocal::lib=--self-contained,my_lwp -e 'CPAN::install(LWP)' + +Note that some dependencies may involve C-based "XS" code even if your target +module doesn't. The issue of dealing with XS vs Pure Perl code is beyond the scope +of what local::lib provides. + =head1 METHODS =head2 ensure_directory_structure_for