Skip Menu |

This queue is for tickets about the local-lib CPAN distribution.

Report information
The Basics
Id: 68171
Status: resolved
Priority: 0/
Queue: local-lib

People
Owner: Nobody in particular
Requestors: matt.lawrence [...] virgin.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.008004
Fixed in: 1.008026



Subject: Doc snippet for lib::core::only does not work
I noticed that the docs for lib::core::only suggest that this is possible: perl -Mlib::core::only -Mlocal::lib=~/perl5 ... But that fails because local::lib cannot be loaded: $ perl -Mlib::core::only -Mlocal::lib=~/perl5 -ce 1 Can't locate local/lib.pm in @INC [...] Until such a time as it is in core, the following would have to be used instead: perl -Mlocal::lib -Mlib::core::only -Mlocal::lib=~/perl5 ...
Sorry it took so long for me to get back to this. Can you send a docpatch?
On Wed Jul 13 22:31:50 2011, APEIRON wrote: Show quoted text
> Sorry it took so long for me to get back to this. Can you send a docpatch?
Sure, how about this? Matt
Subject: local_lib_doc.patch
diff --git a/lib/lib/core/only.pm b/lib/lib/core/only.pm index 9c7be40..48adc8e 100644 --- a/lib/lib/core/only.pm +++ b/lib/lib/core/only.pm @@ -19,12 +19,17 @@ lib::core::only - Remove all non-core paths from @INC to avoid site/vendor dirs To get only the core directories plus the ones for the local::lib in scope: - $ perl -Mlib::core::only -Mlocal::lib=~/perl5 myscript.pl + $ perl -mlocal::lib -Mlib::core::only -Mlocal::lib=~/perl5 myscript.pl To attempt to do a self-contained build (but note this will not reliably propagate into subprocesses, see the CAVEATS below): - $ PERL5OPT='-Mlib::core::only -Mlocal::lib=~/perl5' cpan + $ PERL5OPT='-mlocal::lib -Mlib::core::only -Mlocal::lib=~/perl5' cpan + +Please note that it is necessary to use C<local::lib> twice for this to work. +First so that C<lib::core::only> doesn't prevent C<local::lib> from loading +(it's not currently in core) and then again after C<lib::core::only> so that +the local paths are not removed. =head1 DESCRIPTION
Patch applied. Will be included in next release.
Fixed in 1.008026