r55263 - in /branches/upstream/liblocal-lib-perl/current: ./ inc/Module/ inc/Module/Install/ lib/lib/ lib/lib/core/ lib/local/ t/
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Thu Apr 1 19:46:01 UTC 2010
Author: gregoa
Date: Thu Apr 1 19:45:53 2010
New Revision: 55263
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=55263
Log:
[svn-upgrade] Integrating new upstream version, liblocal-lib-perl (1.006000)
Added:
branches/upstream/liblocal-lib-perl/current/lib/lib/
branches/upstream/liblocal-lib-perl/current/lib/lib/core/
branches/upstream/liblocal-lib-perl/current/lib/lib/core/only.pm
branches/upstream/liblocal-lib-perl/current/t/lib-core-only.t
Modified:
branches/upstream/liblocal-lib-perl/current/Changes
branches/upstream/liblocal-lib-perl/current/MANIFEST
branches/upstream/liblocal-lib-perl/current/META.yml
branches/upstream/liblocal-lib-perl/current/Makefile.PL
branches/upstream/liblocal-lib-perl/current/inc/Module/AutoInstall.pm
branches/upstream/liblocal-lib-perl/current/inc/Module/Install.pm
branches/upstream/liblocal-lib-perl/current/inc/Module/Install/AutoInstall.pm
branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Base.pm
branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Can.pm
branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Fetch.pm
branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Include.pm
branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Makefile.pm
branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Metadata.pm
branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Win32.pm
branches/upstream/liblocal-lib-perl/current/inc/Module/Install/WriteAll.pm
branches/upstream/liblocal-lib-perl/current/lib/local/lib.pm
branches/upstream/liblocal-lib-perl/current/t/classmethod.t
branches/upstream/liblocal-lib-perl/current/t/de-dup.t
Modified: branches/upstream/liblocal-lib-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocal-lib-perl/current/Changes?rev=55263&op=diff
==============================================================================
--- branches/upstream/liblocal-lib-perl/current/Changes (original)
+++ branches/upstream/liblocal-lib-perl/current/Changes Thu Apr 1 19:45:53 2010
@@ -1,4 +1,10 @@
Revision history for local::lib
+
+1.006000 2010-03-31
+ - Create lib::core::only that provides the "set @INC to core dirs
+ only" functionality that was the only part of --self-contained that
+ ever worked usefully.
+ - Delete broken --self-contained flag from core
1.005001 2010-03-10
Modified: branches/upstream/liblocal-lib-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocal-lib-perl/current/MANIFEST?rev=55263&op=diff
==============================================================================
--- branches/upstream/liblocal-lib-perl/current/MANIFEST (original)
+++ branches/upstream/liblocal-lib-perl/current/MANIFEST Thu Apr 1 19:45:53 2010
@@ -10,6 +10,7 @@
inc/Module/Install/Metadata.pm
inc/Module/Install/Win32.pm
inc/Module/Install/WriteAll.pm
+lib/lib/core/only.pm
lib/local/lib.pm
Makefile.PL
MANIFEST This list of files
@@ -22,4 +23,5 @@
t/dist/MB/Build.PL
t/dist/MB/lib/MB.pm
t/install.t
+t/lib-core-only.t
t/pipeline.t
Modified: branches/upstream/liblocal-lib-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocal-lib-perl/current/META.yml?rev=55263&op=diff
==============================================================================
--- branches/upstream/liblocal-lib-perl/current/META.yml (original)
+++ branches/upstream/liblocal-lib-perl/current/META.yml Thu Apr 1 19:45:53 2010
@@ -7,7 +7,7 @@
configure_requires:
ExtUtils::MakeMaker: 6.42
distribution_type: module
-generated_by: 'Module::Install version 0.91'
+generated_by: 'Module::Install version 0.93'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -28,4 +28,4 @@
perl: 5.8.1
resources:
license: http://dev.perl.org/licenses/
-version: 1.005001
+version: 1.006000
Modified: branches/upstream/liblocal-lib-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocal-lib-perl/current/Makefile.PL?rev=55263&op=diff
==============================================================================
--- branches/upstream/liblocal-lib-perl/current/Makefile.PL (original)
+++ branches/upstream/liblocal-lib-perl/current/Makefile.PL Thu Apr 1 19:45:53 2010
@@ -204,13 +204,21 @@
CPAN::HandleConfig->load;
for my $eumm_setting ( qw/makepl_arg make_install_arg/ ) {
if ($CPAN::Config->{$eumm_setting} =~ /(?:PREFIX|INSTALL_BASE)/) {
- die "Possibly invalid config detected in $eumm_setting: " . $CPAN::Config->{$eumm_setting};
+ die <<"DEATH";
+WHOA THERE! It looks like you've got $CPAN::Config->{$eumm_setting} set. This is
+known to cause problems with local::lib. Please either remove this setting or
+clear out your .cpan directory.
+DEATH
}
}
for my $mb_setting (qw/mbuild_arg mbuild_install_arg mbuildpl_arg/) {
if ($CPAN::Config->{$mb_setting} =~ /(?:--prefix|--install_base)/) {
- die "Possibly invalid config detected in $mb_setting: " . $CPAN::Config->{$mb_setting};
+ die <<"DEATH";
+WHOA THERE! It looks like you've got $CPAN::Config->{$mb_setting} set. This is
+known to cause problems with local::lib. Please either remove this setting or
+clear out your .cpan directory.
+DEATH
}
}
}
Modified: branches/upstream/liblocal-lib-perl/current/inc/Module/AutoInstall.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocal-lib-perl/current/inc/Module/AutoInstall.pm?rev=55263&op=diff
==============================================================================
--- branches/upstream/liblocal-lib-perl/current/inc/Module/AutoInstall.pm (original)
+++ branches/upstream/liblocal-lib-perl/current/inc/Module/AutoInstall.pm Thu Apr 1 19:45:53 2010
@@ -672,7 +672,20 @@
sub _load_cpan {
return if $CPAN::VERSION and $CPAN::Config and not @_;
require CPAN;
- if ( $CPAN::HandleConfig::VERSION ) {
+
+ # CPAN-1.82+ adds CPAN::Config::AUTOLOAD to redirect to
+ # CPAN::HandleConfig->load. CPAN reports that the redirection
+ # is deprecated in a warning printed at the user.
+
+ # CPAN-1.81 expects CPAN::HandleConfig->load, does not have
+ # $CPAN::HandleConfig::VERSION but cannot handle
+ # CPAN::Config->load
+
+ # Which "versions expect CPAN::Config->load?
+
+ if ( $CPAN::HandleConfig::VERSION
+ || CPAN::HandleConfig->can('load')
+ ) {
# Newer versions of CPAN have a HandleConfig module
CPAN::HandleConfig->load;
} else {
@@ -802,4 +815,4 @@
__END__
-#line 1056
+#line 1069
Modified: branches/upstream/liblocal-lib-perl/current/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocal-lib-perl/current/inc/Module/Install.pm?rev=55263&op=diff
==============================================================================
--- branches/upstream/liblocal-lib-perl/current/inc/Module/Install.pm (original)
+++ branches/upstream/liblocal-lib-perl/current/inc/Module/Install.pm Thu Apr 1 19:45:53 2010
@@ -28,7 +28,7 @@
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
- $VERSION = '0.91';
+ $VERSION = '0.93';
# Storage for the pseudo-singleton
$MAIN = undef;
@@ -348,17 +348,24 @@
return $call;
}
+# Done in evals to avoid confusing Perl::MinimumVersion
+eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@;
sub _read {
local *FH;
- if ( $] >= 5.006 ) {
- open( FH, '<', $_[0] ) or die "open($_[0]): $!";
- } else {
- open( FH, "< $_[0]" ) or die "open($_[0]): $!";
- }
+ open( FH, '<', $_[0] ) or die "open($_[0]): $!";
my $string = do { local $/; <FH> };
close FH or die "close($_[0]): $!";
return $string;
}
+END_NEW
+sub _read {
+ local *FH;
+ open( FH, "< $_[0]" ) or die "open($_[0]): $!";
+ my $string = do { local $/; <FH> };
+ close FH or die "close($_[0]): $!";
+ return $string;
+}
+END_OLD
sub _readperl {
my $string = Module::Install::_read($_[0]);
@@ -379,18 +386,26 @@
return $string;
}
+# Done in evals to avoid confusing Perl::MinimumVersion
+eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@;
sub _write {
local *FH;
- if ( $] >= 5.006 ) {
- open( FH, '>', $_[0] ) or die "open($_[0]): $!";
- } else {
- open( FH, "> $_[0]" ) or die "open($_[0]): $!";
- }
+ open( FH, '>', $_[0] ) or die "open($_[0]): $!";
foreach ( 1 .. $#_ ) {
print FH $_[$_] or die "print($_[0]): $!";
}
close FH or die "close($_[0]): $!";
}
+END_NEW
+sub _write {
+ local *FH;
+ open( FH, "> $_[0]" ) or die "open($_[0]): $!";
+ foreach ( 1 .. $#_ ) {
+ print FH $_[$_] or die "print($_[0]): $!";
+ }
+ close FH or die "close($_[0]): $!";
+}
+END_OLD
# _version is for processing module versions (eg, 1.03_05) not
# Perl versions (eg, 5.8.1).
@@ -427,4 +442,4 @@
1;
-# Copyright 2008 - 2009 Adam Kennedy.
+# Copyright 2008 - 2010 Adam Kennedy.
Modified: branches/upstream/liblocal-lib-perl/current/inc/Module/Install/AutoInstall.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocal-lib-perl/current/inc/Module/Install/AutoInstall.pm?rev=55263&op=diff
==============================================================================
--- branches/upstream/liblocal-lib-perl/current/inc/Module/Install/AutoInstall.pm (original)
+++ branches/upstream/liblocal-lib-perl/current/inc/Module/Install/AutoInstall.pm Thu Apr 1 19:45:53 2010
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.91';
+ $VERSION = '0.93';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
Modified: branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Base.pm?rev=55263&op=diff
==============================================================================
--- branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Base.pm (original)
+++ branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Base.pm Thu Apr 1 19:45:53 2010
@@ -4,7 +4,7 @@
use strict 'vars';
use vars qw{$VERSION};
BEGIN {
- $VERSION = '0.91';
+ $VERSION = '0.93';
}
# Suspend handler for "redefined" warnings
Modified: branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Can.pm?rev=55263&op=diff
==============================================================================
--- branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Can.pm (original)
+++ branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Can.pm Thu Apr 1 19:45:53 2010
@@ -9,7 +9,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.91';
+ $VERSION = '0.93';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
Modified: branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Fetch.pm?rev=55263&op=diff
==============================================================================
--- branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Fetch.pm (original)
+++ branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Fetch.pm Thu Apr 1 19:45:53 2010
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.91';
+ $VERSION = '0.93';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
Modified: branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Include.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Include.pm?rev=55263&op=diff
==============================================================================
--- branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Include.pm (original)
+++ branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Include.pm Thu Apr 1 19:45:53 2010
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.91';
+ $VERSION = '0.93';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
Modified: branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Makefile.pm?rev=55263&op=diff
==============================================================================
--- branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Makefile.pm (original)
+++ branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Makefile.pm Thu Apr 1 19:45:53 2010
@@ -7,7 +7,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.91';
+ $VERSION = '0.93';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -34,6 +34,17 @@
}
}
+# Store a cleaned up version of the MakeMaker version,
+# since we need to behave differently in a variety of
+# ways based on the MM version.
+my $makemaker = eval $ExtUtils::MakeMaker::VERSION;
+
+# If we are passed a param, do a "newer than" comparison.
+# Otherwise, just return the MakeMaker version.
+sub makemaker {
+ ( @_ < 2 or $makemaker >= eval($_[1]) ) ? $makemaker : 0
+}
+
sub makemaker_args {
my $self = shift;
my $args = ( $self->{makemaker_args} ||= {} );
@@ -44,7 +55,7 @@
# For mm args that take multiple space-seperated args,
# append an argument to the current list.
sub makemaker_append {
- my $self = sShift;
+ my $self = shift;
my $name = shift;
my $args = $self->makemaker_args;
$args->{name} = defined $args->{$name}
@@ -107,6 +118,9 @@
%test_dir = ();
require File::Find;
File::Find::find( \&_wanted_t, $dir );
+ if ( -d 'xt' and ($ENV{RELEASE_TESTING} or $self->author) ) {
+ File::Find::find( \&_wanted_t, 'xt' );
+ }
$self->tests( join ' ', map { "$_/*.t" } sort keys %test_dir );
}
@@ -130,12 +144,13 @@
# an underscore, even though its own version may contain one!
# Hence the funny regexp to get rid of it. See RT #35800
# for details.
- $self->build_requires( 'ExtUtils::MakeMaker' => $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/ );
- $self->configure_requires( 'ExtUtils::MakeMaker' => $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/ );
+ my $v = $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/;
+ $self->build_requires( 'ExtUtils::MakeMaker' => $v );
+ $self->configure_requires( 'ExtUtils::MakeMaker' => $v );
} else {
# Allow legacy-compatibility with 5.005 by depending on the
# most recent EU:MM that supported 5.005.
- $self->build_requires( 'ExtUtils::MakeMaker' => 6.42 );
+ $self->build_requires( 'ExtUtils::MakeMaker' => 6.42 );
$self->configure_requires( 'ExtUtils::MakeMaker' => 6.42 );
}
@@ -145,49 +160,75 @@
$args->{NAME} = $self->module_name || $self->name;
$args->{VERSION} = $self->version;
$args->{NAME} =~ s/-/::/g;
+ $DB::single = 1;
if ( $self->tests ) {
$args->{test} = { TESTS => $self->tests };
+ } elsif ( -d 'xt' and ($self->author or $ENV{RELEASE_TESTING}) ) {
+ $args->{test} = {
+ TESTS => join( ' ', map { "$_/*.t" } grep { -d $_ } qw{ t xt } ),
+ };
}
if ( $] >= 5.005 ) {
$args->{ABSTRACT} = $self->abstract;
$args->{AUTHOR} = $self->author;
}
- if ( eval($ExtUtils::MakeMaker::VERSION) >= 6.10 ) {
- $args->{NO_META} = 1;
- }
- if ( eval($ExtUtils::MakeMaker::VERSION) > 6.17 and $self->sign ) {
+ if ( $self->makemaker(6.10) ) {
+ $args->{NO_META} = 1;
+ #$args->{NO_MYMETA} = 1;
+ }
+ if ( $self->makemaker(6.17) and $self->sign ) {
$args->{SIGN} = 1;
}
unless ( $self->is_admin ) {
delete $args->{SIGN};
}
- # Merge both kinds of requires into prereq_pm
my $prereq = ($args->{PREREQ_PM} ||= {});
%$prereq = ( %$prereq,
- map { @$_ }
+ map { @$_ } # flatten [module => version]
map { @$_ }
grep $_,
- ($self->configure_requires, $self->build_requires, $self->requires)
+ ($self->requires)
);
# Remove any reference to perl, PREREQ_PM doesn't support it
delete $args->{PREREQ_PM}->{perl};
- # merge both kinds of requires into prereq_pm
+ # Merge both kinds of requires into BUILD_REQUIRES
+ my $build_prereq = ($args->{BUILD_REQUIRES} ||= {});
+ %$build_prereq = ( %$build_prereq,
+ map { @$_ } # flatten [module => version]
+ map { @$_ }
+ grep $_,
+ ($self->configure_requires, $self->build_requires)
+ );
+
+ # Remove any reference to perl, BUILD_REQUIRES doesn't support it
+ delete $args->{BUILD_REQUIRES}->{perl};
+
+ # Delete bundled dists from prereq_pm
my $subdirs = ($args->{DIR} ||= []);
if ($self->bundles) {
foreach my $bundle (@{ $self->bundles }) {
my ($file, $dir) = @$bundle;
push @$subdirs, $dir if -d $dir;
- delete $prereq->{$file};
+ delete $build_prereq->{$file}; #Delete from build prereqs only
}
+ }
+
+ unless ( $self->makemaker('6.55_03') ) {
+ %$prereq = (%$prereq,%$build_prereq);
+ delete $args->{BUILD_REQUIRES};
}
if ( my $perl_version = $self->perl_version ) {
eval "use $perl_version; 1"
or die "ERROR: perl: Version $] is installed, "
. "but we need version >= $perl_version";
+
+ if ( $self->makemaker(6.48) ) {
+ $args->{MIN_PERL_VERSION} = $perl_version;
+ }
}
$args->{INSTALLDIRS} = $self->installdirs;
@@ -265,4 +306,4 @@
__END__
-#line 394
+#line 435
Modified: branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Metadata.pm?rev=55263&op=diff
==============================================================================
--- branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Metadata.pm (original)
+++ branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Metadata.pm Thu Apr 1 19:45:53 2010
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.91';
+ $VERSION = '0.93';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -230,6 +230,8 @@
die("The path '$file' does not exist, or is not a file");
}
+ $self->{values}{all_from} = $file;
+
# Some methods pull from POD instead of code.
# If there is a matching .pod, use that instead
my $pod = $file;
@@ -385,11 +387,10 @@
}
}
-sub perl_version_from {
- my $self = shift;
+sub _extract_perl_version {
if (
- Module::Install::_read($_[0]) =~ m/
- ^
+ $_[0] =~ m/
+ ^\s*
(?:use|require) \s*
v?
([\d_\.]+)
@@ -398,6 +399,16 @@
) {
my $perl_version = $1;
$perl_version =~ s{_}{}g;
+ return $perl_version;
+ } else {
+ return;
+ }
+}
+
+sub perl_version_from {
+ my $self = shift;
+ my $perl_version=_extract_perl_version(Module::Install::_read($_[0]));
+ if ($perl_version) {
$self->perl_version($perl_version);
} else {
warn "Cannot determine perl version info from $_[0]\n";
@@ -425,13 +436,12 @@
}
}
-sub license_from {
- my $self = shift;
+sub _extract_license {
if (
- Module::Install::_read($_[0]) =~ m/
+ $_[0] =~ m/
(
=head \d \s+
- (?:licen[cs]e|licensing|copyright|legal)\b
+ (?:licen[cs]e|licensing|copyrights?|legal)\b
.*?
)
(=head\\d.*|=cut.*|)
@@ -439,7 +449,9 @@
/ixms ) {
my $license_text = $1;
my @phrases = (
- 'under the same (?:terms|license) as (?:perl|the perl programming language) itself' => 'perl', 1,
+ 'under the same (?:terms|license) as (?:perl|the perl programming language)' => 'perl', 1,
+ 'under the terms of (?:perl|the perl programming language) itself' => 'perl', 1,
+ 'Artistic and GPL' => 'perl', 1,
'GNU general public license' => 'gpl', 1,
'GNU public license' => 'gpl', 1,
'GNU lesser general public license' => 'lgpl', 1,
@@ -456,20 +468,32 @@
'proprietary' => 'proprietary', 0,
);
while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
- $pattern =~ s{\s+}{\\s+}g;
+ $pattern =~ s#\s+#\\s+#gs;
if ( $license_text =~ /\b$pattern\b/i ) {
- $self->license($license);
- return 1;
+ return $license;
}
}
- }
-
- warn "Cannot determine license info from $_[0]\n";
- return 'unknown';
+ } else {
+ return;
+ }
+}
+
+sub license_from {
+ my $self = shift;
+ if (my $license=_extract_license(Module::Install::_read($_[0]))) {
+ $self->license($license);
+ } else {
+ warn "Cannot determine license info from $_[0]\n";
+ return 'unknown';
+ }
}
sub _extract_bugtracker {
- my @links = $_[0] =~ m#L<(\Qhttp://rt.cpan.org/\E[^>]+)>#g;
+ my @links = $_[0] =~ m#L<(
+ \Qhttp://rt.cpan.org/\E[^>]+|
+ \Qhttp://github.com/\E[\w_]+/[\w_]+/issues|
+ \Qhttp://code.google.com/p/\E[\w_\-]+/issues/list
+ )>#gx;
my %links;
@links{@links}=();
@links=keys %links;
@@ -485,7 +509,7 @@
return 0;
}
if ( @links > 1 ) {
- warn "Found more than on rt.cpan.org link in $_[0]\n";
+ warn "Found more than one bugtracker link in $_[0]\n";
return 0;
}
Modified: branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Win32.pm?rev=55263&op=diff
==============================================================================
--- branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Win32.pm (original)
+++ branches/upstream/liblocal-lib-perl/current/inc/Module/Install/Win32.pm Thu Apr 1 19:45:53 2010
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.91';
+ $VERSION = '0.93';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
Modified: branches/upstream/liblocal-lib-perl/current/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocal-lib-perl/current/inc/Module/Install/WriteAll.pm?rev=55263&op=diff
==============================================================================
--- branches/upstream/liblocal-lib-perl/current/inc/Module/Install/WriteAll.pm (original)
+++ branches/upstream/liblocal-lib-perl/current/inc/Module/Install/WriteAll.pm Thu Apr 1 19:45:53 2010
@@ -6,7 +6,7 @@
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '0.91';;
+ $VERSION = '0.93';;
@ISA = qw{Module::Install::Base};
$ISCORE = 1;
}
Added: branches/upstream/liblocal-lib-perl/current/lib/lib/core/only.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocal-lib-perl/current/lib/lib/core/only.pm?rev=55263&op=file
==============================================================================
--- branches/upstream/liblocal-lib-perl/current/lib/lib/core/only.pm (added)
+++ branches/upstream/liblocal-lib-perl/current/lib/lib/core/only.pm Thu Apr 1 19:45:53 2010
@@ -1,0 +1,95 @@
+package lib::core::only;
+
+use strict;
+use warnings FATAL => 'all';
+use Config;
+
+sub import {
+ @INC = @Config{qw(privlibexp archlibexp)};
+ return
+}
+
+=head1 NAME
+
+lib::core::only - Remove all non-core paths from @INC to avoid site/vendor dirs
+
+=head1 SYNOPSIS
+
+ use lib::core::only; # now @INC contains only the two core directories
+
+To get only the core directories plus the ones for the local::lib in scope:
+
+ $ perl -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
+
+=head1 DESCRIPTION
+
+lib::core::only is simply a shortcut to say "please reduce my @INC to only
+the core lib and archlib (architecture-specific lib) directories of this perl".
+
+You might want to do this to ensure a local::lib contains only the code you
+need, or to test an L<App::FatPacker|App::FatPacker> tree, or to avoid known
+bad vendor packages.
+
+You might want to use this to try and install a self-contained tree of perl
+modules. Be warned that that probably won't work (see L</CAVEATS>).
+
+This module was extracted from L<local::lib|local::lib>'s --self-contained
+feature, and contains the only part that ever worked. I apologise to anybody
+who thought anything else did.
+
+=head1 CAVEATS
+
+This does B<not> propagate properly across perl invocations like local::lib's
+stuff does. It can't. It's only a module import, so it B<only affects the
+specific perl VM instance in which you load and import() it>.
+
+If you want to cascade it across invocations, you can set the PERL5OPT
+environment variable to '-Mlib::core::only' and it'll sort of work. But be
+aware that taint mode ignores this, so some modules' build and test code
+probably will as well.
+
+You also need to be aware that perl's command line options are not processed
+in order - -I options take effect before -M options, so
+
+ perl -Mlib::core::only -Ilib
+
+is unlike to do what you want - it's exactly equivalent to:
+
+ perl -Mlib::core::only
+
+If you want to combine a core-only @INC with additional paths, you need to
+add the additional paths using -M options and the L<lib|lib> module:
+
+ perl -Mlib::core::only -Mlib=lib
+
+ # or if you're trying to test compiled code:
+
+ perl -Mlib::core::only -Mblib
+
+For more information on the impossibility of sanely propagating this across
+module builds without help from the build program, see
+L<http://www.shadowcat.co.uk/blog/matt-s-trout/tainted-love> - and for ways
+to achieve the old --self-contained feature's results, look at
+L<App::FatPacker|App::FatPacker>'s tree function, and at
+L<App::cpanminus|cpanm>'s --local-lib-contained feature.
+
+=head1 AUTHOR
+
+Matt S. Trout <mst at shadowcat.co.uk>
+
+=head1 LICENSE
+
+This library is free software under the same terms as perl itself.
+
+=head1 COPYRIGHT
+
+(c) 2010 the lib::core::only L</AUTHOR> as specified above.
+
+=cut
+
+1;
Modified: branches/upstream/liblocal-lib-perl/current/lib/local/lib.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocal-lib-perl/current/lib/local/lib.pm?rev=55263&op=diff
==============================================================================
--- branches/upstream/liblocal-lib-perl/current/lib/local/lib.pm (original)
+++ branches/upstream/liblocal-lib-perl/current/lib/local/lib.pm Thu Apr 1 19:45:53 2010
@@ -11,14 +11,12 @@
use Carp ();
use Config;
-our $VERSION = '1.005001'; # 1.5.1
-my @KNOWN_FLAGS = (qw/--self-contained/);
+our $VERSION = '1.006000'; # 1.6.0
+
+our @KNOWN_FLAGS = qw(--self-contained);
sub import {
my ($class, @args) = @_;
- @args <= 1 + @KNOWN_FLAGS or die <<'DEATH';
-Please see `perldoc local::lib` for directions on using this module.
-DEATH
# Remember what PERL5LIB was when we started
my $perl5lib = $ENV{PERL5LIB} || '';
@@ -50,21 +48,7 @@
}
if($arg_store{'self-contained'}) {
- # The only directories that remain are those that we just defined and those
- # where core modules are stored. We put PERL5LIB first, so it'll be favored
- # over privlibexp and archlibexp
-
- @INC = _uniq(
- $class->install_base_perl_path($arg_store{path}),
- $class->install_base_arch_path($arg_store{path}),
- split( $Config{path_sep}, $perl5lib ),
- $Config::Config{privlibexp},
- $Config::Config{archlibexp}
- );
-
- # We explicitly set PERL5LIB here to the above de-duped list to prevent
- # @INC from growing with each invocation
- $ENV{PERL5LIB} = join( $Config{path_sep}, @INC );
+ die "FATAL: The local::lib --self-contained flag has never worked reliably and the original author, Mark Stosberg, was unable or unwilling to maintain it. As such, this flag has been removed from the local::lib codebase in order to prevent misunderstandings and potentially broken builds. The local::lib authors recommend that you look at the lib::core::only module shipped with this distribution in order to create a more robust environment that is equivalent to what --self-contained provided (although quite possibly not what you originally thought it provided due to the poor quality of the documentation, for which we apologise).\n";
}
$arg_store{path} = $class->resolve_path($arg_store{path});
@@ -397,11 +381,8 @@
From the shell -
- # Install LWP and its missing dependencies to the 'my_lwp' directory
- perl -MCPAN -Mlocal::lib=my_lwp -e 'CPAN::install(LWP)'
-
- # Install LWP and *all non-core* dependencies to the 'my_lwp' directory
- perl -MCPAN -Mlocal::lib=--self-contained,my_lwp -e 'CPAN::install(LWP)'
+ # Install LWP and its missing dependencies to the '~/perl5' directory
+ perl -MCPAN -Mlocal::lib -e 'CPAN::install(LWP)'
# Just print out useful shell commands
$ perl -Mlocal::lib
@@ -569,23 +550,9 @@
=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.
+See L<lib::core::only|lib::core::only> for one way to do this - but note that
+there are a number of caveats, and the best approach is always to perform a
+build against a clean perl (i.e. site and vendor as close to empty as possible).
=head1 METHODS
@@ -790,11 +757,6 @@
Patches to correctly output commands for csh style shells, as well as some
documentation additions, contributed by Christopher Nehren <apeiron at cpan.org>.
-'--self-contained' feature contributed by Mark Stosberg <mark at summersault.com>.
-
-Ability to pass '--self-contained' without a directory inspired by frew on
-irc.perl.org/#catalyst.
-
Doc patches for a custom local::lib directory contributed by Torsten Raudssus
<torsten at raudssus.de>.
@@ -812,6 +774,9 @@
Warnings for missing PATH/PERL5LIB (as when not running interactively) silenced
by a patch from Marco Emilio Poleggi.
+Mark Stosberg <mark at summersault.com> provided the code for the now deleted
+'--self-contained' option.
+
=head1 COPYRIGHT
Copyright (c) 2007 - 2009 the local::lib L</AUTHOR> and L</CONTRIBUTORS> as
Modified: branches/upstream/liblocal-lib-perl/current/t/classmethod.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocal-lib-perl/current/t/classmethod.t?rev=55263&op=diff
==============================================================================
--- branches/upstream/liblocal-lib-perl/current/t/classmethod.t (original)
+++ branches/upstream/liblocal-lib-perl/current/t/classmethod.t Thu Apr 1 19:45:53 2010
@@ -17,6 +17,7 @@
{
+no warnings 'once'; # sigh
local *File::Spec::rel2abs = sub { shift; 'FOO'.shift; };
is($c->resolve_relative_path('bar'),'FOObar');
Modified: branches/upstream/liblocal-lib-perl/current/t/de-dup.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocal-lib-perl/current/t/de-dup.t?rev=55263&op=diff
==============================================================================
--- branches/upstream/liblocal-lib-perl/current/t/de-dup.t (original)
+++ branches/upstream/liblocal-lib-perl/current/t/de-dup.t Thu Apr 1 19:45:53 2010
@@ -4,7 +4,7 @@
use File::Temp qw(tempdir);
use Cwd;
-plan tests => 4;
+plan tests => 2;
my $dir = tempdir('test_local_lib-XXXXX', DIR => Cwd::abs_path('t'), CLEANUP => 1);
@@ -19,14 +19,3 @@
ok ! grep({ $inc{$_} > 1 } keys %inc), '@INC entries not duplicated';
ok ! grep({ $perl5lib{$_} > 1 } keys %perl5lib), 'ENV{PERL5LIB} entries not duplicated';
}
-
-local::lib->import('--self-contained', $dir);
-
-{
- my (%inc, %perl5lib);
- map { $inc{$_}++ } @INC;
- map { $perl5lib{$_} } split /:/, $ENV{PERL5LIB};
- ok ! grep({ $inc{$_} > 1 } keys %inc), '@INC entries not duplicated (--self-contained)';
- ok ! grep({ $perl5lib{$_} > 1 } keys %perl5lib), 'ENV{PERL5LIB} entries not duplicated (--self-contained)';
-}
-
Added: branches/upstream/liblocal-lib-perl/current/t/lib-core-only.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/liblocal-lib-perl/current/t/lib-core-only.t?rev=55263&op=file
==============================================================================
--- branches/upstream/liblocal-lib-perl/current/t/lib-core-only.t (added)
+++ branches/upstream/liblocal-lib-perl/current/t/lib-core-only.t Thu Apr 1 19:45:53 2010
@@ -1,0 +1,11 @@
+use strict;
+use warnings FATAL => 'all';
+use Test::More tests => 1;
+use lib::core::only ();
+use Config;
+
+is_deeply(
+ [ do { local @INC = @INC; lib::core::only->import; @INC } ],
+ [ $Config{privlibexp}, $Config{archlibexp} ],
+ 'lib::core::only mangles @INC correctly'
+);
More information about the Pkg-perl-cvs-commits
mailing list