r40817 - in /branches/upstream/libpar-perl/current: ./ inc/Module/ inc/Module/Install/ lib/ lib/PAR/

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Mon Jul 27 04:23:33 UTC 2009


Author: jawnsy-guest
Date: Mon Jul 27 04:23:26 2009
New Revision: 40817

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=40817
Log:
[svn-upgrade] Integrating new upstream version, libpar-perl (0.994)

Modified:
    branches/upstream/libpar-perl/current/AUTHORS
    branches/upstream/libpar-perl/current/ChangeLog
    branches/upstream/libpar-perl/current/META.yml
    branches/upstream/libpar-perl/current/README
    branches/upstream/libpar-perl/current/inc/Module/Install.pm
    branches/upstream/libpar-perl/current/inc/Module/Install/Base.pm
    branches/upstream/libpar-perl/current/inc/Module/Install/Can.pm
    branches/upstream/libpar-perl/current/inc/Module/Install/Fetch.pm
    branches/upstream/libpar-perl/current/inc/Module/Install/Include.pm
    branches/upstream/libpar-perl/current/inc/Module/Install/Makefile.pm
    branches/upstream/libpar-perl/current/inc/Module/Install/Metadata.pm
    branches/upstream/libpar-perl/current/inc/Module/Install/Win32.pm
    branches/upstream/libpar-perl/current/inc/Module/Install/WriteAll.pm
    branches/upstream/libpar-perl/current/lib/PAR.pm
    branches/upstream/libpar-perl/current/lib/PAR/Environment.pod
    branches/upstream/libpar-perl/current/lib/PAR/Heavy.pm

Modified: branches/upstream/libpar-perl/current/AUTHORS
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpar-perl/current/AUTHORS?rev=40817&op=diff
==============================================================================
--- branches/upstream/libpar-perl/current/AUTHORS (original)
+++ branches/upstream/libpar-perl/current/AUTHORS Mon Jul 27 04:23:26 2009
@@ -93,6 +93,7 @@
 Matthew Riedel
 Mattia Barbon                 (MBARBON)
 Michael Goldberger
+Michael Schilli               (MSCHILLI)
 Mike Campbell
 Mike Stok                     (MIKESTOK)
 Morbus Iff

Modified: branches/upstream/libpar-perl/current/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpar-perl/current/ChangeLog?rev=40817&op=diff
==============================================================================
--- branches/upstream/libpar-perl/current/ChangeLog (original)
+++ branches/upstream/libpar-perl/current/ChangeLog Mon Jul 27 04:23:26 2009
@@ -1,3 +1,16 @@
+[Changes for 0.994 - Jul 23, 2009]
+  - Fix for the PAR::Heavy fix to the INC priority handling.
+
+[Changes for 0.993 - Jul 19, 2009]
+  - The priority (fallback=>0) repositories should look at @PAR_INC
+    for the loaded PARs instead of @PAR_INC_LAST.
+  - Don't reload from a downloaded .par file after installing it
+    via "upgrade".
+  - Band-aid fix for the loading priority of shared librares from
+    PAR files: Try PAR's first, the local stuff, then fallback-PARs.
+  - Initial support for running external perl scripts from a packaged
+    interpreter.
+
 [Changes for 0.992 - Apr  5, 2009]
   - Support for non-fallback repositories.
 

Modified: branches/upstream/libpar-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpar-perl/current/META.yml?rev=40817&op=diff
==============================================================================
--- branches/upstream/libpar-perl/current/META.yml (original)
+++ branches/upstream/libpar-perl/current/META.yml Mon Jul 27 04:23:26 2009
@@ -2,10 +2,12 @@
 abstract: 'Perl Archive Tookit'
 author:
   - 'Audrey Tang <cpan at audreyt.org>'
+build_requires:
+  ExtUtils::MakeMaker: 6.42
 configure_requires:
-  ExtUtils::MakeMaker: 6.50
+  ExtUtils::MakeMaker: 6.42
 distribution_type: module
-generated_by: 'Module::Install version 0.81'
+generated_by: 'Module::Install version 0.91'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -18,7 +20,7 @@
 provides:
   PAR:
     file: lib/PAR.pm
-    version: 0.992
+    version: 0.994
   PAR::Heavy:
     file: lib/PAR/Heavy.pm
     version: 0.11
@@ -37,4 +39,4 @@
   perl: 5.6.0
 resources:
   license: http://dev.perl.org/licenses/
-version: 0.992
+version: 0.994

Modified: branches/upstream/libpar-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpar-perl/current/README?rev=40817&op=diff
==============================================================================
--- branches/upstream/libpar-perl/current/README (original)
+++ branches/upstream/libpar-perl/current/README Mon Jul 27 04:23:26 2009
@@ -4,7 +4,7 @@
 Please type "perldoc PAR" after installation to see the module usage
 information, and "perldoc PAR::FAQ" for frequently answered questions.
 
-As of version 0.97 of PAR, the logic for generating stand-alone executables
+With version 0.97 of PAR, the logic for generating stand-alone executables
 has been refactored into the PAR-Packer distribution. It should be available
 from the same source you got PAR from. Hence, for packing scripts with
 prerequisite modules into stand-alone scripts or executables
@@ -76,7 +76,9 @@
 
 * Copyright
 
-Copyright 2002, 2003, 2004, 2005, 2006 by Audrey Tang <cpan at audreyt.org>.
+Copyright 2002-2009 by Audrey Tang <cpan at audreyt.org>.
+
+Copyright 2002-2009 by Steffen Mueller <smueller at cpan.org>.
 
 All rights reserved.  You can redistribute and/or modify
 this bundle under the same terms as Perl itself.

Modified: branches/upstream/libpar-perl/current/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpar-perl/current/inc/Module/Install.pm?rev=40817&op=diff
==============================================================================
--- branches/upstream/libpar-perl/current/inc/Module/Install.pm (original)
+++ branches/upstream/libpar-perl/current/inc/Module/Install.pm Mon Jul 27 04:23:26 2009
@@ -17,12 +17,10 @@
 #     3. The ./inc/ version of Module::Install loads
 # }
 
-BEGIN {
-	require 5.004;
-}
+use 5.005;
 use strict 'vars';
 
-use vars qw{$VERSION};
+use vars qw{$VERSION $MAIN};
 BEGIN {
 	# All Module::Install core packages now require synchronised versions.
 	# This will be used to ensure we don't accidentally load old or
@@ -30,7 +28,10 @@
 	# 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.81';
+	$VERSION = '0.91';
+
+	# Storage for the pseudo-singleton
+	$MAIN    = undef;
 
 	*inc::Module::Install::VERSION = *VERSION;
 	@inc::Module::Install::ISA     = __PACKAGE__;
@@ -93,6 +94,7 @@
 
 
 
+
 # Build.PL was formerly supported, but no longer is due to excessive
 # difficulty in implementing every single feature twice.
 if ( $0 =~ /Build.PL$/i ) { die <<"END_DIE" }
@@ -131,14 +133,22 @@
 	$sym->{$cwd} = sub {
 		my $pwd = Cwd::cwd();
 		if ( my $code = $sym->{$pwd} ) {
-			# delegate back to parent dirs
+			# Delegate back to parent dirs
 			goto &$code unless $cwd eq $pwd;
 		}
 		$$sym =~ /([^:]+)$/ or die "Cannot autoload $who - $sym";
-		unless ( uc($1) eq $1 ) {
-			unshift @_, ( $self, $1 );
-			goto &{$self->can('call')};
+		my $method = $1;
+		if ( uc($method) eq $method ) {
+			# Do nothing
+			return;
+		} elsif ( $method =~ /^_/ and $self->can($method) ) {
+			# Dispatch to the root M:I class
+			return $self->$method(@_);
 		}
+
+		# Dispatch to the appropriate plugin
+		unshift @_, ( $self, $1 );
+		goto &{$self->can('call')};
 	};
 }
 
@@ -163,6 +173,9 @@
 	delete $INC{"$self->{file}"};
 	delete $INC{"$self->{path}.pm"};
 
+	# Save to the singleton
+	$MAIN = $self;
+
 	return 1;
 }
 
@@ -176,8 +189,7 @@
 
 	my @exts = @{$self->{extensions}};
 	unless ( @exts ) {
-		my $admin = $self->{admin};
-		@exts = $admin->load_all_extensions;
+		@exts = $self->{admin}->load_all_extensions;
 	}
 
 	my %seen;
@@ -260,7 +272,7 @@
 sub load_extensions {
 	my ($self, $path, $top) = @_;
 
-	unless ( grep { !ref $_ and lc $_ eq lc $self->{prefix} } @INC ) {
+	unless ( grep { ! ref $_ and lc $_ eq lc $self->{prefix} } @INC ) {
 		unshift @INC, $self->{prefix};
 	}
 
@@ -341,7 +353,7 @@
 	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]): $!";
@@ -372,7 +384,7 @@
 	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]): $!";

Modified: branches/upstream/libpar-perl/current/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpar-perl/current/inc/Module/Install/Base.pm?rev=40817&op=diff
==============================================================================
--- branches/upstream/libpar-perl/current/inc/Module/Install/Base.pm (original)
+++ branches/upstream/libpar-perl/current/inc/Module/Install/Base.pm Mon Jul 27 04:23:26 2009
@@ -1,7 +1,11 @@
 #line 1
 package Module::Install::Base;
 
-$VERSION = '0.81';
+use strict 'vars';
+use vars qw{$VERSION};
+BEGIN {
+	$VERSION = '0.91';
+}
 
 # Suspend handler for "redefined" warnings
 BEGIN {
@@ -9,54 +13,56 @@
 	$SIG{__WARN__} = sub { $w };
 }
 
-### This is the ONLY module that shouldn't have strict on
-# use strict;
-
-#line 41
+#line 42
 
 sub new {
-    my ($class, %args) = @_;
-
-    foreach my $method ( qw(call load) ) {
-        *{"$class\::$method"} = sub {
-            shift()->_top->$method(@_);
-        } unless defined &{"$class\::$method"};
-    }
-
-    bless( \%args, $class );
+	my $class = shift;
+	unless ( defined &{"${class}::call"} ) {
+		*{"${class}::call"} = sub { shift->_top->call(@_) };
+	}
+	unless ( defined &{"${class}::load"} ) {
+		*{"${class}::load"} = sub { shift->_top->load(@_) };
+	}
+	bless { @_ }, $class;
 }
 
 #line 61
 
 sub AUTOLOAD {
-    my $self = shift;
-    local $@;
-    my $autoload = eval { $self->_top->autoload } or return;
-    goto &$autoload;
+	local $@;
+	my $func = eval { shift->_top->autoload } or return;
+	goto &$func;
 }
 
-#line 76
+#line 75
 
-sub _top { $_[0]->{_top} }
+sub _top {
+	$_[0]->{_top};
+}
 
-#line 89
+#line 90
 
 sub admin {
-    $_[0]->_top->{admin} or Module::Install::Base::FakeAdmin->new;
+	$_[0]->_top->{admin}
+	or
+	Module::Install::Base::FakeAdmin->new;
 }
 
-#line 101
+#line 106
 
 sub is_admin {
-    $_[0]->admin->VERSION;
+	$_[0]->admin->VERSION;
 }
 
 sub DESTROY {}
 
 package Module::Install::Base::FakeAdmin;
 
-my $Fake;
-sub new { $Fake ||= bless(\@_, $_[0]) }
+my $fake;
+
+sub new {
+	$fake ||= bless(\@_, $_[0]);
+}
 
 sub AUTOLOAD {}
 
@@ -69,4 +75,4 @@
 
 1;
 
-#line 146
+#line 154

Modified: branches/upstream/libpar-perl/current/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpar-perl/current/inc/Module/Install/Can.pm?rev=40817&op=diff
==============================================================================
--- branches/upstream/libpar-perl/current/inc/Module/Install/Can.pm (original)
+++ branches/upstream/libpar-perl/current/inc/Module/Install/Can.pm Mon Jul 27 04:23:26 2009
@@ -2,16 +2,16 @@
 package Module::Install::Can;
 
 use strict;
-use Module::Install::Base;
-use Config              ();
-use File::Spec          ();
-use ExtUtils::MakeMaker ();
+use Config                ();
+use File::Spec            ();
+use ExtUtils::MakeMaker   ();
+use Module::Install::Base ();
 
-use vars qw{$VERSION $ISCORE @ISA};
+use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.81';
+	$VERSION = '0.91';
+	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
-	@ISA     = qw{Module::Install::Base};
 }
 
 # check if we can load some module

Modified: branches/upstream/libpar-perl/current/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpar-perl/current/inc/Module/Install/Fetch.pm?rev=40817&op=diff
==============================================================================
--- branches/upstream/libpar-perl/current/inc/Module/Install/Fetch.pm (original)
+++ branches/upstream/libpar-perl/current/inc/Module/Install/Fetch.pm Mon Jul 27 04:23:26 2009
@@ -2,13 +2,13 @@
 package Module::Install::Fetch;
 
 use strict;
-use Module::Install::Base;
+use Module::Install::Base ();
 
-use vars qw{$VERSION $ISCORE @ISA};
+use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.81';
+	$VERSION = '0.91';
+	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
-	@ISA     = qw{Module::Install::Base};
 }
 
 sub get_file {

Modified: branches/upstream/libpar-perl/current/inc/Module/Install/Include.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpar-perl/current/inc/Module/Install/Include.pm?rev=40817&op=diff
==============================================================================
--- branches/upstream/libpar-perl/current/inc/Module/Install/Include.pm (original)
+++ branches/upstream/libpar-perl/current/inc/Module/Install/Include.pm Mon Jul 27 04:23:26 2009
@@ -2,13 +2,13 @@
 package Module::Install::Include;
 
 use strict;
-use Module::Install::Base;
+use Module::Install::Base ();
 
-use vars qw{$VERSION $ISCORE @ISA};
+use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.81';
+	$VERSION = '0.91';
+	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
-	@ISA     = qw{Module::Install::Base};
 }
 
 sub include {

Modified: branches/upstream/libpar-perl/current/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpar-perl/current/inc/Module/Install/Makefile.pm?rev=40817&op=diff
==============================================================================
--- branches/upstream/libpar-perl/current/inc/Module/Install/Makefile.pm (original)
+++ branches/upstream/libpar-perl/current/inc/Module/Install/Makefile.pm Mon Jul 27 04:23:26 2009
@@ -2,14 +2,14 @@
 package Module::Install::Makefile;
 
 use strict 'vars';
-use Module::Install::Base;
-use ExtUtils::MakeMaker ();
-
-use vars qw{$VERSION $ISCORE @ISA};
+use ExtUtils::MakeMaker   ();
+use Module::Install::Base ();
+
+use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.81';
+	$VERSION = '0.91';
+	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
-	@ISA     = qw{Module::Install::Base};
 }
 
 sub Makefile { $_[0] }
@@ -114,17 +114,32 @@
 	my $self = shift;
 	die "&Makefile->write() takes no arguments\n" if @_;
 
-	# Make sure we have a new enough
+	# Check the current Perl version
+	my $perl_version = $self->perl_version;
+	if ( $perl_version ) {
+		eval "use $perl_version; 1"
+			or die "ERROR: perl: Version $] is installed, "
+			. "but we need version >= $perl_version";
+	}
+
+	# Make sure we have a new enough MakeMaker
 	require ExtUtils::MakeMaker;
 
-	# MakeMaker can complain about module versions that include
-	# 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->configure_requires( 'ExtUtils::MakeMaker' => $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/ );
-
-	# Generate the
+	if ( $perl_version and $self->_cmp($perl_version, '5.006') >= 0 ) {
+		# MakeMaker can complain about module versions that include
+		# 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+)/ );
+	} 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->configure_requires( 'ExtUtils::MakeMaker' => 6.42 );
+	}
+
+	# Generate the MakeMaker params
 	my $args = $self->makemaker_args;
 	$args->{DISTNAME} = $self->name;
 	$args->{NAME}     = $self->module_name || $self->name;
@@ -133,7 +148,7 @@
 	if ( $self->tests ) {
 		$args->{test} = { TESTS => $self->tests };
 	}
-	if ($] >= 5.005) {
+	if ( $] >= 5.005 ) {
 		$args->{ABSTRACT} = $self->abstract;
 		$args->{AUTHOR}   = $self->author;
 	}
@@ -147,7 +162,7 @@
 		delete $args->{SIGN};
 	}
 
-	# merge both kinds of requires into prereq_pm
+	# Merge both kinds of requires into prereq_pm
 	my $prereq = ($args->{PREREQ_PM} ||= {});
 	%$prereq = ( %$prereq,
 		map { @$_ }
@@ -250,4 +265,4 @@
 
 __END__
 
-#line 379
+#line 394

Modified: branches/upstream/libpar-perl/current/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpar-perl/current/inc/Module/Install/Metadata.pm?rev=40817&op=diff
==============================================================================
--- branches/upstream/libpar-perl/current/inc/Module/Install/Metadata.pm (original)
+++ branches/upstream/libpar-perl/current/inc/Module/Install/Metadata.pm Mon Jul 27 04:23:26 2009
@@ -2,18 +2,17 @@
 package Module::Install::Metadata;
 
 use strict 'vars';
-use Module::Install::Base;
+use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.81';
-	@ISA     = qw{Module::Install::Base};
+	$VERSION = '0.91';
+	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
 
 my @boolean_keys = qw{
 	sign
-	mymeta
 };
 
 my @scalar_keys = qw{
@@ -440,21 +439,21 @@
 	/ixms ) {
 		my $license_text = $1;
 		my @phrases      = (
-			'under the same (?:terms|license) as perl itself' => 'perl',        1,
-			'GNU general public license'                      => 'gpl',         1,
-			'GNU public license'                              => 'gpl',         1,
-			'GNU lesser general public license'               => 'lgpl',        1,
-			'GNU lesser public license'                       => 'lgpl',        1,
-			'GNU library general public license'              => 'lgpl',        1,
-			'GNU library public license'                      => 'lgpl',        1,
-			'BSD license'                                     => 'bsd',         1,
-			'Artistic license'                                => 'artistic',    1,
-			'GPL'                                             => 'gpl',         1,
-			'LGPL'                                            => 'lgpl',        1,
-			'BSD'                                             => 'bsd',         1,
-			'Artistic'                                        => 'artistic',    1,
-			'MIT'                                             => 'mit',         1,
-			'proprietary'                                     => 'proprietary', 0,
+			'under the same (?:terms|license) as (?:perl|the perl programming language) itself' => 'perl', 1,
+			'GNU general public license'         => 'gpl',         1,
+			'GNU public license'                 => 'gpl',         1,
+			'GNU lesser general public license'  => 'lgpl',        1,
+			'GNU lesser public license'          => 'lgpl',        1,
+			'GNU library general public license' => 'lgpl',        1,
+			'GNU library public license'         => 'lgpl',        1,
+			'BSD license'                        => 'bsd',         1,
+			'Artistic license'                   => 'artistic',    1,
+			'GPL'                                => 'gpl',         1,
+			'LGPL'                               => 'lgpl',        1,
+			'BSD'                                => 'bsd',         1,
+			'Artistic'                           => 'artistic',    1,
+			'MIT'                                => 'mit',         1,
+			'proprietary'                        => 'proprietary', 0,
 		);
 		while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
 			$pattern =~ s{\s+}{\\s+}g;
@@ -506,17 +505,29 @@
 	}
 }
 
+sub test_requires_from {
+	my $self     = shift;
+	my $content  = Module::Install::_readperl($_[0]);
+	my @requires = $content =~ m/^use\s+([^\W\d]\w*(?:::\w+)*)\s+([\d\.]+)/mg;
+	while ( @requires ) {
+		my $module  = shift @requires;
+		my $version = shift @requires;
+		$self->test_requires( $module => $version );
+	}
+}
+
 # Convert triple-part versions (eg, 5.6.1 or 5.8.9) to
 # numbers (eg, 5.006001 or 5.008009).
 # Also, convert double-part versions (eg, 5.8)
 sub _perl_version {
 	my $v = $_[-1];
-	$v =~ s/^([1-9])\.([1-9]\d?\d?)$/sprintf("%d.%03d",$1,$2)/e;	
+	$v =~ s/^([1-9])\.([1-9]\d?\d?)$/sprintf("%d.%03d",$1,$2)/e;
 	$v =~ s/^([1-9])\.([1-9]\d?\d?)\.(0|[1-9]\d?\d?)$/sprintf("%d.%03d%03d",$1,$2,$3 || 0)/e;
 	$v =~ s/(\.\d\d\d)000$/$1/;
 	$v =~ s/_.+$//;
 	if ( ref($v) ) {
-		$v = $v + 0; # Numify
+		# Numify
+		$v = $v + 0;
 	}
 	return $v;
 }
@@ -526,21 +537,56 @@
 
 
 ######################################################################
-# MYMETA.yml Support
+# MYMETA Support
 
 sub WriteMyMeta {
 	die "WriteMyMeta has been deprecated";
 }
 
-sub write_mymeta {
-	my $self = shift;
-	
-	# If there's no existing META.yml there is nothing we can do
-	return unless -f 'META.yml';
+sub write_mymeta_yaml {
+	my $self = shift;
 
 	# We need YAML::Tiny to write the MYMETA.yml file
 	unless ( eval { require YAML::Tiny; 1; } ) {
 		return 1;
+	}
+
+	# Generate the data
+	my $meta = $self->_write_mymeta_data or return 1;
+
+	# Save as the MYMETA.yml file
+	print "Writing MYMETA.yml\n";
+	YAML::Tiny::DumpFile('MYMETA.yml', $meta);
+}
+
+sub write_mymeta_json {
+	my $self = shift;
+
+	# We need JSON to write the MYMETA.json file
+	unless ( eval { require JSON; 1; } ) {
+		return 1;
+	}
+
+	# Generate the data
+	my $meta = $self->_write_mymeta_data or return 1;
+
+	# Save as the MYMETA.yml file
+	print "Writing MYMETA.json\n";
+	Module::Install::_write(
+		'MYMETA.json',
+		JSON->new->pretty(1)->canonical->encode($meta),
+	);
+}
+
+sub _write_mymeta_data {
+	my $self = shift;
+
+	# If there's no existing META.yml there is nothing we can do
+	return undef unless -f 'META.yml';
+
+	# We need Parse::CPAN::Meta to load the file
+	unless ( eval { require Parse::CPAN::Meta; 1; } ) {
+		return undef;
 	}
 
 	# Merge the perl version into the dependencies
@@ -558,7 +604,7 @@
 	}
 
 	# Load the advisory META.yml file
-	my @yaml = YAML::Tiny::LoadFile('META.yml');
+	my @yaml = Parse::CPAN::Meta::LoadFile('META.yml');
 	my $meta = $yaml[0];
 
 	# Overwrite the non-configure dependency hashs
@@ -572,9 +618,7 @@
 		$meta->{build_requires} = { map { @$_ } @{ $val->{build_requires} } };
 	}
 
-	# Save as the MYMETA.yml file
-	print "Writing MYMETA.yml\n";
-	YAML::Tiny::DumpFile('MYMETA.yml', $meta);	
+	return $meta;
 }
 
 1;

Modified: branches/upstream/libpar-perl/current/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpar-perl/current/inc/Module/Install/Win32.pm?rev=40817&op=diff
==============================================================================
--- branches/upstream/libpar-perl/current/inc/Module/Install/Win32.pm (original)
+++ branches/upstream/libpar-perl/current/inc/Module/Install/Win32.pm Mon Jul 27 04:23:26 2009
@@ -2,12 +2,12 @@
 package Module::Install::Win32;
 
 use strict;
-use Module::Install::Base;
+use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.81';
-	@ISA     = qw{Module::Install::Base};
+	$VERSION = '0.91';
+	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
 

Modified: branches/upstream/libpar-perl/current/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpar-perl/current/inc/Module/Install/WriteAll.pm?rev=40817&op=diff
==============================================================================
--- branches/upstream/libpar-perl/current/inc/Module/Install/WriteAll.pm (original)
+++ branches/upstream/libpar-perl/current/inc/Module/Install/WriteAll.pm Mon Jul 27 04:23:26 2009
@@ -2,11 +2,11 @@
 package Module::Install::WriteAll;
 
 use strict;
-use Module::Install::Base;
+use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.81';
+	$VERSION = '0.91';;
 	@ISA     = qw{Module::Install::Base};
 	$ISCORE  = 1;
 }
@@ -41,8 +41,18 @@
 
 	# The Makefile write process adds a couple of dependencies,
 	# so write the META.yml files after the Makefile.
-	$self->Meta->write        if $args{meta};
-	$self->Meta->write_mymeta if $self->mymeta;
+	if ( $args{meta} ) {
+		$self->Meta->write;
+	}
+
+	# Experimental support for MYMETA
+	if ( $ENV{X_MYMETA} ) {
+		if ( $ENV{X_MYMETA} eq 'JSON' ) {
+			$self->Meta->write_mymeta_json;
+		} else {
+			$self->Meta->write_mymeta_yaml;
+		}
+	}
 
 	return 1;
 }

Modified: branches/upstream/libpar-perl/current/lib/PAR.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpar-perl/current/lib/PAR.pm?rev=40817&op=diff
==============================================================================
--- branches/upstream/libpar-perl/current/lib/PAR.pm (original)
+++ branches/upstream/libpar-perl/current/lib/PAR.pm Mon Jul 27 04:23:26 2009
@@ -1,5 +1,5 @@
 package PAR;
-$PAR::VERSION = '0.992';
+$PAR::VERSION = '0.994';
 
 use 5.006;
 use strict;
@@ -640,6 +640,34 @@
     }
 }
 
+sub _run_external_file {
+    my $filename = shift;
+    my $clear_stack = shift;
+    require 5.008;
+    open my $ffh, '<', $filename
+      or die "Can't open perl script \"$filename\": $!";
+
+    my $clearstack = '';
+    if (defined &Internals::PAR::CLEARSTACK and $clear_stack) {
+        $clear_stack = "Internals::PAR::CLEARSTACK();\n";
+    }
+    my $string = "package main; shift \@INC;\n$clearstack#line 1 \"$filename\"\n"
+                 . do { local $/ = undef; <$ffh> };
+    close $ffh;
+
+    open my $fh, '<', \$string
+      or die "Can't open file handle to string: $!";
+
+    unshift @INC, sub { $fh };
+
+    $ENV{PAR_0} = $filename; # for Pod::Usage
+    { do 'main';
+      CORE::exit($1) if ($@ =~/^_TK_EXIT_\((\d+)\)/);
+      die $@ if $@;
+      exit;
+    }
+}
+
 # extract the contents of a .par (or .exe) or any
 # Archive::Zip handle to the PAR_TEMP/inc directory.
 # returns that directory.
@@ -741,12 +769,20 @@
                 # Then, realize that if you pass undef for the file handle, perl (5.8.9)
                 # does NOT use the subroutine. Thus the hacky GLOB ref.
                 my $line = 1;
+                no warnings;
                 return (\*I_AM_NOT_HERE, sub {$line ? ($_="1;",$line=0,return(1)) : ($_="",return(0))});
             }
 
-            if ($local_file) {
-                return _find_par_internals([$PAR_INC_LAST[-1]], @args);
-            }
+            # Note: This is likely not necessary as the module has been installed
+            # into the system by upgrade_module if it was available at all.
+            # If it was already loaded, this will not be reached (see return right above).
+            # If it could not be loaded from the system and neither found in the repository,
+            # we simply want to have the normal error message, too!
+            #
+            #if ($local_file) {
+            #    # XXX load with fallback - is that right?
+            #    return _find_par_internals([$PAR_INC_LAST[-1]], @args);
+            #}
         }
     }
     my $rv = _find_par_internals(\@PAR_INC, @args);
@@ -758,9 +794,11 @@
     $module =~ s/\.pm$//;
     $module =~ s/\//::/g;
     foreach my $client (@PriorityRepositoryObjects) {
-        my $local_file = $client->get_module($module, 1); # 1 == fallback
+        my $local_file = $client->get_module($module, 0); # 1 == fallback
         if ($local_file) {
-            return _find_par_internals([$PAR_INC_LAST[-1]], @args);
+            # Not loaded as fallback (cf. PRIORITY) thus look at PAR_INC
+            # instead of PAR_INC_LAST
+            return _find_par_internals([$PAR_INC[-1]], @args);
         }
     }
     return();
@@ -785,19 +823,12 @@
     foreach my $client (@RepositoryObjects) {
         my $local_file = $client->get_module($module, 1); # 1 == fallback
         if ($local_file) {
+            # Loaded as fallback thus look at PAR_INC_LAST
             return _find_par_internals([$PAR_INC_LAST[-1]], @args);
         }
     }
     return $rv;
 }
-
-
-# This is a conjunction of the early find_par and the late
-# find_par_last. It's called by PAR::Heavy for Dynaloader stuff.
-sub _find_par_any {
-    return _find_par_internals([@PAR_INC, @PAR_INC_LAST], @_);
-}
-
 
 
 # This routine implements loading modules from PARs
@@ -810,7 +841,7 @@
     my $scheme;
     foreach (@$INC_ARY ? @$INC_ARY : @INC) {
         my $path = $_;
-        if ($[ < 5.008001) {
+        if ($] < 5.008001) {
             # reassemble from "perl -Ischeme://path" autosplitting
             $path = "$scheme:$path" if !@$INC_ARY
                 and $path and $path =~ m!//!

Modified: branches/upstream/libpar-perl/current/lib/PAR/Environment.pod
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpar-perl/current/lib/PAR/Environment.pod?rev=40817&op=diff
==============================================================================
--- branches/upstream/libpar-perl/current/lib/PAR/Environment.pod (original)
+++ branches/upstream/libpar-perl/current/lib/PAR/Environment.pod Mon Jul 27 04:23:26 2009
@@ -131,6 +131,19 @@
 This is reasonably reliable given normal program spawning conventions,
 but cannot be guaranteed to be correct in all circumstances.
 
+=head2 PAR_APP_REUSE
+
+Strictly internal. Skip this section if you're not a PAR developer.
+
+The variable shouldn't ever be exposed to user code and packaged
+applications should not depend on it being set or not.
+
+If an application has been packaged with the C<--reusable> option, the
+bootstrapping code will set this environment variable to the name of
+the program that is to be run instead of the packaged program.
+The F<main.pl> loader script fetches the file name, deletes the
+environment variable, and then runs the given program.
+
 =head2 PAR_RUN
 
 This environment variable was set during constructions of C<PAR::Packer>

Modified: branches/upstream/libpar-perl/current/lib/PAR/Heavy.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpar-perl/current/lib/PAR/Heavy.pm?rev=40817&op=diff
==============================================================================
--- branches/upstream/libpar-perl/current/lib/PAR/Heavy.pm (original)
+++ branches/upstream/libpar-perl/current/lib/PAR/Heavy.pm Mon Jul 27 04:23:26 2009
@@ -78,13 +78,32 @@
     my $file = $cache_key = "auto/$modpname/$modfname.$dlext";
 
     if ($FullCache{$file}) {
+        # TODO: understand
         local $DynaLoader::do_expand = 1;
         return $bootstrap->(@args);
     }
 
     my $member;
-    $member = PAR::_find_par_any(undef, $file, 1) if defined &PAR::_find_par_any;
-    return $bootstrap->(@args) unless $member; # we failed to find the dll, let DynaLoader (try or) throw an error
+    # First, try to find things in the peferentially loaded PARs:
+    $member = PAR::_find_par_internals([@PAR::PAR_INC], undef, $file, 1)
+      if defined &PAR::_find_par_internals;
+
+    # If that failed to find the dll, let DynaLoader (try or) throw an error
+    unless ($member) { 
+        my $filename = eval { $bootstrap->(@args) };
+        return $filename if not $@ and defined $filename;
+
+        # Now try the fallback pars
+        $member = PAR::_find_par_internals([@PAR::PAR_INC_LAST], undef, $file, 1)
+          if defined &PAR::_find_par_internals;
+
+        # If that fails, let dynaloader have another go JUST to throw an error
+        # While this may seem wasteful, nothing really matters once we fail to
+        # load shared libraries!
+        unless ($member) { 
+            return $bootstrap->(@args);
+        }
+    }
 
     $FullCache{$file} = _dl_extract($member, $file);
 
@@ -171,8 +190,11 @@
 
 =head1 COPYRIGHT
 
-Copyright 2002-2008 by Audrey Tang
+Copyright 2002-2009 by Audrey Tang
 E<lt>cpan at audreyt.orgE<gt>.
+
+Copyright 2006-2009 by Steffen Mueller
+E<lt>smueller at cpan.orgE<gt>.
 
 This program is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.




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