r55265 - in /trunk/liblocal-lib-perl: ./ debian/ inc/Module/ inc/Module/Install/ lib/lib/ lib/local/ t/

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Thu Apr 1 19:48:32 UTC 2010


Author: gregoa
Date: Thu Apr  1 19:48:19 2010
New Revision: 55265

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=55265
Log:
New upstream release.

Added:
    trunk/liblocal-lib-perl/lib/lib/
      - copied from r55264, branches/upstream/liblocal-lib-perl/current/lib/lib/
    trunk/liblocal-lib-perl/t/lib-core-only.t
      - copied unchanged from r55264, branches/upstream/liblocal-lib-perl/current/t/lib-core-only.t
Modified:
    trunk/liblocal-lib-perl/Changes
    trunk/liblocal-lib-perl/MANIFEST
    trunk/liblocal-lib-perl/META.yml
    trunk/liblocal-lib-perl/Makefile.PL
    trunk/liblocal-lib-perl/debian/changelog
    trunk/liblocal-lib-perl/inc/Module/AutoInstall.pm
    trunk/liblocal-lib-perl/inc/Module/Install.pm
    trunk/liblocal-lib-perl/inc/Module/Install/AutoInstall.pm
    trunk/liblocal-lib-perl/inc/Module/Install/Base.pm
    trunk/liblocal-lib-perl/inc/Module/Install/Can.pm
    trunk/liblocal-lib-perl/inc/Module/Install/Fetch.pm
    trunk/liblocal-lib-perl/inc/Module/Install/Include.pm
    trunk/liblocal-lib-perl/inc/Module/Install/Makefile.pm
    trunk/liblocal-lib-perl/inc/Module/Install/Metadata.pm
    trunk/liblocal-lib-perl/inc/Module/Install/Win32.pm
    trunk/liblocal-lib-perl/inc/Module/Install/WriteAll.pm
    trunk/liblocal-lib-perl/lib/local/lib.pm
    trunk/liblocal-lib-perl/t/classmethod.t
    trunk/liblocal-lib-perl/t/de-dup.t

Modified: trunk/liblocal-lib-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocal-lib-perl/Changes?rev=55265&op=diff
==============================================================================
--- trunk/liblocal-lib-perl/Changes (original)
+++ trunk/liblocal-lib-perl/Changes Thu Apr  1 19:48:19 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: trunk/liblocal-lib-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocal-lib-perl/MANIFEST?rev=55265&op=diff
==============================================================================
--- trunk/liblocal-lib-perl/MANIFEST (original)
+++ trunk/liblocal-lib-perl/MANIFEST Thu Apr  1 19:48:19 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: trunk/liblocal-lib-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocal-lib-perl/META.yml?rev=55265&op=diff
==============================================================================
--- trunk/liblocal-lib-perl/META.yml (original)
+++ trunk/liblocal-lib-perl/META.yml Thu Apr  1 19:48:19 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: trunk/liblocal-lib-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocal-lib-perl/Makefile.PL?rev=55265&op=diff
==============================================================================
--- trunk/liblocal-lib-perl/Makefile.PL (original)
+++ trunk/liblocal-lib-perl/Makefile.PL Thu Apr  1 19:48:19 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: trunk/liblocal-lib-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocal-lib-perl/debian/changelog?rev=55265&op=diff
==============================================================================
--- trunk/liblocal-lib-perl/debian/changelog (original)
+++ trunk/liblocal-lib-perl/debian/changelog Thu Apr  1 19:48:19 2010
@@ -1,3 +1,9 @@
+liblocal-lib-perl (1.006000-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- gregor herrmann <gregoa at debian.org>  Thu, 01 Apr 2010 21:46:31 +0200
+
 liblocal-lib-perl (1.005001-1) unstable; urgency=low
 
   [ Jonathan Yu ]

Modified: trunk/liblocal-lib-perl/inc/Module/AutoInstall.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocal-lib-perl/inc/Module/AutoInstall.pm?rev=55265&op=diff
==============================================================================
--- trunk/liblocal-lib-perl/inc/Module/AutoInstall.pm (original)
+++ trunk/liblocal-lib-perl/inc/Module/AutoInstall.pm Thu Apr  1 19:48:19 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: trunk/liblocal-lib-perl/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocal-lib-perl/inc/Module/Install.pm?rev=55265&op=diff
==============================================================================
--- trunk/liblocal-lib-perl/inc/Module/Install.pm (original)
+++ trunk/liblocal-lib-perl/inc/Module/Install.pm Thu Apr  1 19:48:19 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: trunk/liblocal-lib-perl/inc/Module/Install/AutoInstall.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocal-lib-perl/inc/Module/Install/AutoInstall.pm?rev=55265&op=diff
==============================================================================
--- trunk/liblocal-lib-perl/inc/Module/Install/AutoInstall.pm (original)
+++ trunk/liblocal-lib-perl/inc/Module/Install/AutoInstall.pm Thu Apr  1 19:48:19 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: trunk/liblocal-lib-perl/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocal-lib-perl/inc/Module/Install/Base.pm?rev=55265&op=diff
==============================================================================
--- trunk/liblocal-lib-perl/inc/Module/Install/Base.pm (original)
+++ trunk/liblocal-lib-perl/inc/Module/Install/Base.pm Thu Apr  1 19:48:19 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: trunk/liblocal-lib-perl/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocal-lib-perl/inc/Module/Install/Can.pm?rev=55265&op=diff
==============================================================================
--- trunk/liblocal-lib-perl/inc/Module/Install/Can.pm (original)
+++ trunk/liblocal-lib-perl/inc/Module/Install/Can.pm Thu Apr  1 19:48:19 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: trunk/liblocal-lib-perl/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocal-lib-perl/inc/Module/Install/Fetch.pm?rev=55265&op=diff
==============================================================================
--- trunk/liblocal-lib-perl/inc/Module/Install/Fetch.pm (original)
+++ trunk/liblocal-lib-perl/inc/Module/Install/Fetch.pm Thu Apr  1 19:48:19 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: trunk/liblocal-lib-perl/inc/Module/Install/Include.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocal-lib-perl/inc/Module/Install/Include.pm?rev=55265&op=diff
==============================================================================
--- trunk/liblocal-lib-perl/inc/Module/Install/Include.pm (original)
+++ trunk/liblocal-lib-perl/inc/Module/Install/Include.pm Thu Apr  1 19:48:19 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: trunk/liblocal-lib-perl/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocal-lib-perl/inc/Module/Install/Makefile.pm?rev=55265&op=diff
==============================================================================
--- trunk/liblocal-lib-perl/inc/Module/Install/Makefile.pm (original)
+++ trunk/liblocal-lib-perl/inc/Module/Install/Makefile.pm Thu Apr  1 19:48:19 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: trunk/liblocal-lib-perl/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocal-lib-perl/inc/Module/Install/Metadata.pm?rev=55265&op=diff
==============================================================================
--- trunk/liblocal-lib-perl/inc/Module/Install/Metadata.pm (original)
+++ trunk/liblocal-lib-perl/inc/Module/Install/Metadata.pm Thu Apr  1 19:48:19 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: trunk/liblocal-lib-perl/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocal-lib-perl/inc/Module/Install/Win32.pm?rev=55265&op=diff
==============================================================================
--- trunk/liblocal-lib-perl/inc/Module/Install/Win32.pm (original)
+++ trunk/liblocal-lib-perl/inc/Module/Install/Win32.pm Thu Apr  1 19:48:19 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: trunk/liblocal-lib-perl/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocal-lib-perl/inc/Module/Install/WriteAll.pm?rev=55265&op=diff
==============================================================================
--- trunk/liblocal-lib-perl/inc/Module/Install/WriteAll.pm (original)
+++ trunk/liblocal-lib-perl/inc/Module/Install/WriteAll.pm Thu Apr  1 19:48:19 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;
 }

Modified: trunk/liblocal-lib-perl/lib/local/lib.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocal-lib-perl/lib/local/lib.pm?rev=55265&op=diff
==============================================================================
--- trunk/liblocal-lib-perl/lib/local/lib.pm (original)
+++ trunk/liblocal-lib-perl/lib/local/lib.pm Thu Apr  1 19:48:19 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: trunk/liblocal-lib-perl/t/classmethod.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocal-lib-perl/t/classmethod.t?rev=55265&op=diff
==============================================================================
--- trunk/liblocal-lib-perl/t/classmethod.t (original)
+++ trunk/liblocal-lib-perl/t/classmethod.t Thu Apr  1 19:48:19 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: trunk/liblocal-lib-perl/t/de-dup.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/liblocal-lib-perl/t/de-dup.t?rev=55265&op=diff
==============================================================================
--- trunk/liblocal-lib-perl/t/de-dup.t (original)
+++ trunk/liblocal-lib-perl/t/de-dup.t Thu Apr  1 19:48:19 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)';
-}
-




More information about the Pkg-perl-cvs-commits mailing list