r40819 - in /trunk/libpar-perl: ./ debian/ 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:45:29 UTC 2009


Author: jawnsy-guest
Date: Mon Jul 27 04:45:22 2009
New Revision: 40819

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=40819
Log:
* New upstream release
  + Fixed INC priority handling for PAR::Heavy
  + Don't reload from downloaded .par files after installing via 'upgrade'
  + Band-aid fix for loading priority of shared libraries from PAR files:
    try PAR's first, then local stuff, then fallback-PARs
  + Support for running external Perl scripts from a packaged interpreter
* Add myself to Copyright and Uploaders
* Standards-Version 3.8.2 (no changes)
* Use new short debian/rules format
  + Requires debhelper >= 7.0.50 and quilt >= 0.46-7

Modified:
    trunk/libpar-perl/AUTHORS
    trunk/libpar-perl/ChangeLog
    trunk/libpar-perl/META.yml
    trunk/libpar-perl/README
    trunk/libpar-perl/debian/changelog
    trunk/libpar-perl/debian/control
    trunk/libpar-perl/debian/copyright
    trunk/libpar-perl/debian/rules
    trunk/libpar-perl/inc/Module/Install.pm
    trunk/libpar-perl/inc/Module/Install/Base.pm
    trunk/libpar-perl/inc/Module/Install/Can.pm
    trunk/libpar-perl/inc/Module/Install/Fetch.pm
    trunk/libpar-perl/inc/Module/Install/Include.pm
    trunk/libpar-perl/inc/Module/Install/Makefile.pm
    trunk/libpar-perl/inc/Module/Install/Metadata.pm
    trunk/libpar-perl/inc/Module/Install/Win32.pm
    trunk/libpar-perl/inc/Module/Install/WriteAll.pm
    trunk/libpar-perl/lib/PAR.pm
    trunk/libpar-perl/lib/PAR/Environment.pod
    trunk/libpar-perl/lib/PAR/Heavy.pm

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

Modified: trunk/libpar-perl/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpar-perl/ChangeLog?rev=40819&op=diff
==============================================================================
--- trunk/libpar-perl/ChangeLog (original)
+++ trunk/libpar-perl/ChangeLog Mon Jul 27 04:45:22 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: trunk/libpar-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpar-perl/META.yml?rev=40819&op=diff
==============================================================================
--- trunk/libpar-perl/META.yml (original)
+++ trunk/libpar-perl/META.yml Mon Jul 27 04:45:22 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: trunk/libpar-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpar-perl/README?rev=40819&op=diff
==============================================================================
--- trunk/libpar-perl/README (original)
+++ trunk/libpar-perl/README Mon Jul 27 04:45:22 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: trunk/libpar-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpar-perl/debian/changelog?rev=40819&op=diff
==============================================================================
--- trunk/libpar-perl/debian/changelog (original)
+++ trunk/libpar-perl/debian/changelog Mon Jul 27 04:45:22 2009
@@ -1,3 +1,18 @@
+libpar-perl (0.994-1) UNRELEASED; urgency=low
+
+  * New upstream release
+    + Fixed INC priority handling for PAR::Heavy
+    + Don't reload from downloaded .par files after installing via 'upgrade'
+    + Band-aid fix for loading priority of shared libraries from PAR files:
+      try PAR's first, then local stuff, then fallback-PARs
+    + Support for running external Perl scripts from a packaged interpreter
+  * Add myself to Copyright and Uploaders
+  * Standards-Version 3.8.2 (no changes)
+  * Use new short debian/rules format
+    + Requires debhelper >= 7.0.50 and quilt >= 0.46-7
+
+ -- Jonathan Yu <frequency at cpan.org>  Sun, 26 Jul 2009 20:24:31 -0400
+
 libpar-perl (0.992-1) unstable; urgency=low
 
   [ Krzysztof Krzyżaniak (eloy) ]

Modified: trunk/libpar-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpar-perl/debian/control?rev=40819&op=diff
==============================================================================
--- trunk/libpar-perl/debian/control (original)
+++ trunk/libpar-perl/debian/control Mon Jul 27 04:45:22 2009
@@ -1,32 +1,31 @@
 Source: libpar-perl
 Section: perl
 Priority: optional
-Build-Depends: debhelper (>= 7), quilt
-Build-Depends-Indep: perl (>= 5.8.0-7), libmodule-install-perl,
- libmodule-scandeps-perl (>= 0.66), libarchive-zip-perl,
- libpar-dist-perl (>= 0.32), libdigest-sha1-perl, libmodule-signature-perl,
- libgetopt-argvfile-perl (>= 1.07), gnupg, libinline-perl, libtest-pod-perl
+Build-Depends: debhelper (>= 7.0.50), quilt (>= 0.46-7)
+Build-Depends-Indep: perl (>= 5.8.0-7), libmodule-scandeps-perl (>= 0.66),
+ libarchive-zip-perl, libpar-dist-perl (>= 0.32), libmodule-signature-perl,
+ libdigest-sha1-perl, libgetopt-argvfile-perl (>= 1.07), libinline-perl, gnupg,
+ libtest-pod-perl
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
 Uploaders: Krzysztof Krzyżaniak (eloy) <eloy at debian.org>,
  Damyan Ivanov <dmn at debian.org>, Niko Tyni <ntyni at iki.fi>,
  gregor herrmann <gregoa at debian.org>, Gunnar Wolf <gwolf at debian.org>,
- Antonio Radici <antonio at dyne.org>
-Standards-Version: 3.8.1
+ Antonio Radici <antonio at dyne.org>, Jonathan Yu <frequency at cpan.org>
+Standards-Version: 3.8.2
 Homepage: http://par.perl.org/
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libpar-perl/
 Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libpar-perl/
 
 Package: libpar-perl
 Architecture: all
-Depends: ${perl:Depends}, ${misc:Depends}, libmodule-scandeps-perl (>=  0.66),
- libarchive-zip-perl, libpar-dist-perl (>= 0.32),
- libdigest-sha1-perl, libgetopt-argvfile-perl (>= 1.07),
- libcompress-zlib-perl (>= 1.3), libfile-temp-perl
+Depends: ${perl:Depends}, ${misc:Depends}, libmodule-scandeps-perl (>= 0.66),
+ libarchive-zip-perl, libpar-dist-perl (>= 0.32), libdigest-sha1-perl,
+ libgetopt-argvfile-perl (>= 1.07), libcompress-zlib-perl (>= 1.3),
+ libfile-temp-perl
 Recommends: gnupg, libmodule-signature-perl, libpar-packer-perl
-Description: Perl Archive Toolkit
- PAR lets you easily bundle a typical blib/ tree into a zip file, called a Perl 
- Archive, or PAR.
- .
- PAR supports loading XS modules by overriding DynaLoader bootstrapping methods; 
- it writes shared object file to a temporary file at the time it is needed.
-
+Description: Perl redistributable module packaging framework
+ PAR is a Perl framework which allows you to easily bundle a typical blib/
+ tree into a compressed file (currently a zip) called a Perl Archive. This
+ makes it fairly simple to redistribute, even providing support for loading
+ C/XS modules by overriding DynaLoader's bootstrapping methods. It writes a
+ shared object file to a temporary file at the time it is needed.

Modified: trunk/libpar-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpar-perl/debian/copyright?rev=40819&op=diff
==============================================================================
--- trunk/libpar-perl/debian/copyright (original)
+++ trunk/libpar-perl/debian/copyright Mon Jul 27 04:45:22 2009
@@ -1,24 +1,25 @@
 Format-Specification:
     http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196
-Upstream-Maintainer: Audrey Tang <cpan at audreyt.org>
+Upstream-Maintainer: Steffen Mueller <smueller at cpan.org>
 Upstream-Source: http://search.cpan.org/dist/PAR/
 Upstream-Name: PAR
 
 Files: *
-Copyright:
- 2002-2009 by Audrey Tang <cpan at audreyt.org>
- 2005-2009 by Steffen Mueller <smueller at cpan.org>
+Copyright: 2005-2009, Steffen Mueller <smueller at cpan.org>
+ 2002-2009, Audrey Tang <cpan at audreyt.org>
 License-Alias: Perl
 License: Artistic | GPL-1+
 
+Files: debian/*
+Copyright: 2009, Jonathan Yu <frequency at cpan.org>
+ 2005-2009, various members of the Debian Perl Group, cf. debian/changelog
+License: Artistic | GPL-1+
+
 Files: inc/Module/*
-Copyright: Copyright 2002 - 2009 by Brian Ingerson, Audrey Tang and Adam Kennedy
+Copyright: 2002-2009, Adam Kennedy <adamk at cpan.org>
+ 2002-2009, Audrey Tang <autrijus at autrijus.org>
+ 2002-2009, Brian Ingerson <ingy at cpan.org>
 License-Alias: Perl
-License: GPL-1+ | Artistic
-
-Files: debian/*
-Copyright: 2005-2009, various members of the Debian Perl Group,
- cf. debian/changelog
 License: Artistic | GPL-1+
 
 License: Artistic

Modified: trunk/libpar-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpar-perl/debian/rules?rev=40819&op=diff
==============================================================================
--- trunk/libpar-perl/debian/rules (original)
+++ trunk/libpar-perl/debian/rules Mon Jul 27 04:45:22 2009
@@ -1,25 +1,7 @@
 #!/usr/bin/make -f
 
-include /usr/share/quilt/quilt.make
+%:
+	dh --with quilt $@
 
-build: build-stamp
-build-stamp: $(QUILT_STAMPFN)
-	PERL_TEST_POD=1 dh build
-	touch $@
-
-clean: unpatch
-	dh $@
-
-install: install-stamp
-install-stamp: build-stamp
-	dh install
-	touch $@
-
-binary-arch:
-
-binary-indep: install
-	dh $@
-
-binary: binary-arch binary-indep
-
-.PHONY: binary binary-arch binary-indep install clean build
+override_dh_auto_test:
+	PERL_TEST_POD=1 dh_auto_test

Modified: trunk/libpar-perl/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpar-perl/inc/Module/Install.pm?rev=40819&op=diff
==============================================================================
--- trunk/libpar-perl/inc/Module/Install.pm (original)
+++ trunk/libpar-perl/inc/Module/Install.pm Mon Jul 27 04:45:22 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: trunk/libpar-perl/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpar-perl/inc/Module/Install/Base.pm?rev=40819&op=diff
==============================================================================
--- trunk/libpar-perl/inc/Module/Install/Base.pm (original)
+++ trunk/libpar-perl/inc/Module/Install/Base.pm Mon Jul 27 04:45:22 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: trunk/libpar-perl/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpar-perl/inc/Module/Install/Can.pm?rev=40819&op=diff
==============================================================================
--- trunk/libpar-perl/inc/Module/Install/Can.pm (original)
+++ trunk/libpar-perl/inc/Module/Install/Can.pm Mon Jul 27 04:45:22 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: trunk/libpar-perl/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpar-perl/inc/Module/Install/Fetch.pm?rev=40819&op=diff
==============================================================================
--- trunk/libpar-perl/inc/Module/Install/Fetch.pm (original)
+++ trunk/libpar-perl/inc/Module/Install/Fetch.pm Mon Jul 27 04:45:22 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: trunk/libpar-perl/inc/Module/Install/Include.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpar-perl/inc/Module/Install/Include.pm?rev=40819&op=diff
==============================================================================
--- trunk/libpar-perl/inc/Module/Install/Include.pm (original)
+++ trunk/libpar-perl/inc/Module/Install/Include.pm Mon Jul 27 04:45:22 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: trunk/libpar-perl/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpar-perl/inc/Module/Install/Makefile.pm?rev=40819&op=diff
==============================================================================
--- trunk/libpar-perl/inc/Module/Install/Makefile.pm (original)
+++ trunk/libpar-perl/inc/Module/Install/Makefile.pm Mon Jul 27 04:45:22 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: trunk/libpar-perl/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpar-perl/inc/Module/Install/Metadata.pm?rev=40819&op=diff
==============================================================================
--- trunk/libpar-perl/inc/Module/Install/Metadata.pm (original)
+++ trunk/libpar-perl/inc/Module/Install/Metadata.pm Mon Jul 27 04:45:22 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: trunk/libpar-perl/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpar-perl/inc/Module/Install/Win32.pm?rev=40819&op=diff
==============================================================================
--- trunk/libpar-perl/inc/Module/Install/Win32.pm (original)
+++ trunk/libpar-perl/inc/Module/Install/Win32.pm Mon Jul 27 04:45:22 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: trunk/libpar-perl/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpar-perl/inc/Module/Install/WriteAll.pm?rev=40819&op=diff
==============================================================================
--- trunk/libpar-perl/inc/Module/Install/WriteAll.pm (original)
+++ trunk/libpar-perl/inc/Module/Install/WriteAll.pm Mon Jul 27 04:45:22 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: trunk/libpar-perl/lib/PAR.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpar-perl/lib/PAR.pm?rev=40819&op=diff
==============================================================================
--- trunk/libpar-perl/lib/PAR.pm (original)
+++ trunk/libpar-perl/lib/PAR.pm Mon Jul 27 04:45:22 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: trunk/libpar-perl/lib/PAR/Environment.pod
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpar-perl/lib/PAR/Environment.pod?rev=40819&op=diff
==============================================================================
--- trunk/libpar-perl/lib/PAR/Environment.pod (original)
+++ trunk/libpar-perl/lib/PAR/Environment.pod Mon Jul 27 04:45:22 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: trunk/libpar-perl/lib/PAR/Heavy.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpar-perl/lib/PAR/Heavy.pm?rev=40819&op=diff
==============================================================================
--- trunk/libpar-perl/lib/PAR/Heavy.pm (original)
+++ trunk/libpar-perl/lib/PAR/Heavy.pm Mon Jul 27 04:45:22 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