r44795 - in /trunk/libclass-c3-xs-perl: ./ debian/ inc/Module/ inc/Module/Install/ lib/Class/C3/

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Fri Sep 25 13:06:56 UTC 2009


Author: jawnsy-guest
Date: Fri Sep 25 13:06:38 2009
New Revision: 44795

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=44795
Log:
* New upstream release
* Add myself to Uploaders and Copyright
* Upgrade to new short debhelper rules format
* Refresh copyright file
* Standards-Version 3.8.3 (drop perl version dependency)
* Rewrite control description
* Now Recommends libclass-c3-xs-perl -- this should probably become
  Depends, but I'm not sure. It can technically be used on its own,
  but it is not intended to be.

Modified:
    trunk/libclass-c3-xs-perl/ChangeLog
    trunk/libclass-c3-xs-perl/META.yml
    trunk/libclass-c3-xs-perl/XS.xs
    trunk/libclass-c3-xs-perl/debian/changelog
    trunk/libclass-c3-xs-perl/debian/control
    trunk/libclass-c3-xs-perl/debian/copyright
    trunk/libclass-c3-xs-perl/debian/rules
    trunk/libclass-c3-xs-perl/inc/Module/Install.pm
    trunk/libclass-c3-xs-perl/inc/Module/Install/Base.pm
    trunk/libclass-c3-xs-perl/inc/Module/Install/Can.pm
    trunk/libclass-c3-xs-perl/inc/Module/Install/Fetch.pm
    trunk/libclass-c3-xs-perl/inc/Module/Install/Makefile.pm
    trunk/libclass-c3-xs-perl/inc/Module/Install/Metadata.pm
    trunk/libclass-c3-xs-perl/inc/Module/Install/Win32.pm
    trunk/libclass-c3-xs-perl/inc/Module/Install/WriteAll.pm
    trunk/libclass-c3-xs-perl/lib/Class/C3/XS.pm

Modified: trunk/libclass-c3-xs-perl/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-c3-xs-perl/ChangeLog?rev=44795&op=diff
==============================================================================
--- trunk/libclass-c3-xs-perl/ChangeLog (original)
+++ trunk/libclass-c3-xs-perl/ChangeLog Fri Sep 25 13:06:38 2009
@@ -1,4 +1,19 @@
 Revision history for Perl extension Class::C3::XS
+
+0.13 Thu Sep 24, 2009
+        - Release 0.12_03 as a stable release, without further modifications.
+
+0.12_03 Mon Sep 21, 2009
+        - Fix compatibility with perl 5.6.x. Thanks again, Nicholas.
+
+0.12_02 Mon Sep 7, 2009
+        - Actually ship with the changes 0.12_01 claimed to have. Thanks for
+          catching this, Nicholas.
+
+0.12_01 Sat Aug 22, 2009
+        - Backport a couple of performance tweaks from bleadperl. This gives a
+          performance improvement of about 40% in calculating the linearized
+          isa for hierarchies with single parents only.
 
 0.11 Mon Mar 30, 2009
         - Define SVfARG if the perl we're compiling for doesn't have

Modified: trunk/libclass-c3-xs-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-c3-xs-perl/META.yml?rev=44795&op=diff
==============================================================================
--- trunk/libclass-c3-xs-perl/META.yml (original)
+++ trunk/libclass-c3-xs-perl/META.yml Fri Sep 25 13:06:38 2009
@@ -3,11 +3,12 @@
 author:
   - 'Brandon L. Black, <blblack at gmail.com>'
 build_requires:
+  ExtUtils::MakeMaker: 6.42
   Test::More: 0.47
 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
@@ -20,9 +21,9 @@
 provides:
   Class::C3::XS:
     file: lib/Class/C3/XS.pm
-    version: 0.11
+    version: 0.13
 requires:
   perl: 5.6.0
 resources:
   license: http://dev.perl.org/licenses/
-version: 0.11
+version: 0.13

Modified: trunk/libclass-c3-xs-perl/XS.xs
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-c3-xs-perl/XS.xs?rev=44795&op=diff
==============================================================================
--- trunk/libclass-c3-xs-perl/XS.xs (original)
+++ trunk/libclass-c3-xs-perl/XS.xs Fri Sep 25 13:06:38 2009
@@ -99,7 +99,7 @@
     if(isa && AvFILLp(isa) >= 0) {
         SV** seqs_ptr;
         I32 seqs_items;
-        HV* const tails = (HV*)sv_2mortal((SV*)newHV());
+        HV* tails;
         AV* const seqs = (AV*)sv_2mortal((SV*)newAV());
         I32* heads;
 
@@ -122,10 +122,48 @@
             else {
                 /* recursion */
                 AV* const isa_lin = __mro_linear_isa_c3(aTHX_ isa_item_stash, cache, level + 1);
+
+                if(items == 0 && AvFILLp(seqs) == -1) {
+                    /* Only one parent class. For this case, the C3
+                       linearisation is this class followed by the parent's
+                       linearisation, so don't bother with the expensive
+                       calculation.  */
+                    SV **svp;
+                    I32 subrv_items = AvFILLp(isa_lin) + 1;
+                    SV *const *subrv_p = AvARRAY(isa_lin);
+
+                    /* Hijack the allocated but unused array seqs to be the
+                       return value. It's currently mortalised.  */
+
+                    retval = seqs;
+
+                    av_extend(retval, subrv_items);
+                    AvFILLp(retval) = subrv_items;
+                    svp = AvARRAY(retval);
+
+                    /* First entry is this class.  */
+                    *svp++ = newSVpvn(stashname, stashname_len);
+
+                    while(subrv_items--) {
+                        /* These values are unlikely to be shared hash key
+                           scalars, so no point in adding code to optimising
+                           for a case that is unlikely to be true.
+                           (Or prove me wrong and do it.)  */
+
+                        SV *const val = *subrv_p++;
+                        *svp++ = newSVsv(val);
+                    }
+
+                    SvREFCNT_dec(isa_lin);
+                    SvREFCNT_inc(retval);
+
+                    goto done;
+                }
                 av_push(seqs, (SV*)isa_lin);
             }
         }
         av_push(seqs, SvREFCNT_inc((SV*)isa));
+        tails = (HV*)sv_2mortal((SV*)newHV());
 
         /* This builds "heads", which as an array of integer array
            indices, one per seq, which point at the virtual "head"
@@ -146,15 +184,22 @@
                 SV** seq_ptr = AvARRAY(seq) + 1;
                 while(seq_items--) {
                     SV* const seqitem = *seq_ptr++;
-                    HE* const he = hv_fetch_ent(tails, seqitem, 0, 0);
-                    if(!he) {
-                        if(!hv_store_ent(tails, seqitem, newSViv(1), 0)) {
-                            croak("failed to store value in hash");
+                    /* LVALUE fetch will create a new undefined SV if necessary
+                     */
+                    HE* const he = hv_fetch_ent(tails, seqitem, 1, 0);
+                    if(he) {
+                        SV* const val = HeVAL(he);
+                        /* For 5.8.0 and later, sv_inc() with increment undef to
+                           an IV of 1, which is what we want for a newly created
+                           entry.  However, for 5.6.x it will become an NV of
+                           1.0, which confuses the SvIVX() checks above  */
+                        if(SvIOK(val)) {
+                            SvIVX(val)++;
+                        } else {
+                            sv_setiv(val, 1);
                         }
-                    }
-                    else {
-                        SV* const val = HeVAL(he);
-                        sv_inc(val);
+                    } else {
+                        croak("failed to store value in hash");
                     }
                 }
             }
@@ -260,6 +305,7 @@
         av_push(retval, newSVpvn(stashname, stashname_len));
     }
 
+done:
     /* we don't want anyone modifying the cache entry but us,
        and we do so by replacing it completely */
     SvREADONLY_on(retval);
@@ -367,12 +413,18 @@
             }
 
             /* we found a real sub here */
-            sv = sv_2mortal(newSV(0));
+            sv = sv_newmortal();
 
             gv_efullname3(sv, cvgv, NULL);
 
-            fq_subname = SvPVX(sv);
-            fq_subname_len = SvCUR(sv);
+            if (SvPOK(sv)) {
+                fq_subname = SvPVX(sv);
+                fq_subname_len = SvCUR(sv);
+
+                subname = strrchr(fq_subname, ':');
+            } else {
+                subname = NULL;
+            }
 
             subname = strrchr(fq_subname, ':');
             if(!subname)
@@ -474,7 +526,7 @@
             if (SvTYPE(candidate) == SVt_PVGV && (cand_cv = GvCV(candidate)) && !GvCVGEN(candidate)) {
                 SvREFCNT_dec(linear_av);
                 SvREFCNT_inc((SV*)cand_cv);
-                if (!hv_store_ent(nmcache, newSVsv(cachekey), (SV*)cand_cv, 0)) {
+                if (!hv_store_ent(nmcache, cachekey, (SV*)cand_cv, 0)) {
                     croak("failed to store value in hash");
                 }
                 XPUSHs(sv_2mortal(newRV_inc((SV*)cand_cv)));
@@ -484,7 +536,7 @@
     }
 
     SvREFCNT_dec(linear_av);
-    if (!hv_store_ent(nmcache, newSVsv(cachekey), &PL_sv_undef, 0)) {
+    if (!hv_store_ent(nmcache, cachekey, &PL_sv_undef, 0)) {
         croak("failed to store value in hash");
     }
     if(throw_nomethod)

Modified: trunk/libclass-c3-xs-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-c3-xs-perl/debian/changelog?rev=44795&op=diff
==============================================================================
--- trunk/libclass-c3-xs-perl/debian/changelog (original)
+++ trunk/libclass-c3-xs-perl/debian/changelog Fri Sep 25 13:06:38 2009
@@ -1,8 +1,20 @@
-libclass-c3-xs-perl (0.11-2) UNRELEASED; urgency=low
+libclass-c3-xs-perl (0.13-1) UNRELEASED; urgency=low
 
+  [ Jonathan Yu ]
+  * New upstream release
+  * Add myself to Uploaders and Copyright
+  * Upgrade to new short debhelper rules format
+  * Refresh copyright file
+  * Standards-Version 3.8.3 (drop perl version dependency)
+  * Rewrite control description
+  * Now Recommends libclass-c3-xs-perl -- this should probably become
+    Depends, but I'm not sure. It can technically be used on its own,
+    but it is not intended to be.
+
+  [ Nathan Handler ]
   * debian/watch: Update to ignore development releases.
 
- -- Nathan Handler <nhandler at ubuntu.com>  Sat, 06 Jun 2009 01:33:07 +0000
+ -- Jonathan Yu <jawnsy at cpan.org>  Fri, 25 Sep 2009 05:11:56 -0400
 
 libclass-c3-xs-perl (0.11-1) unstable; urgency=low
 

Modified: trunk/libclass-c3-xs-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-c3-xs-perl/debian/control?rev=44795&op=diff
==============================================================================
--- trunk/libclass-c3-xs-perl/debian/control (original)
+++ trunk/libclass-c3-xs-perl/debian/control Fri Sep 25 13:06:38 2009
@@ -1,11 +1,11 @@
 Source: libclass-c3-xs-perl
 Section: perl
 Priority: optional
-Build-Depends: debhelper (>= 7), perl (>= 5.8.8-7), libtest-pod-perl
+Build-Depends: perl, debhelper (>= 7), 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>
-Standards-Version: 3.8.1
+ Damyan Ivanov <dmn at debian.org>, Jonathan Yu <jawnsy at cpan.org>
+Standards-Version: 3.8.3
 Homepage: http://search.cpan.org/dist/Class-C3-XS/
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libclass-c3-xs-perl/
 Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libclass-c3-xs-perl/
@@ -13,7 +13,9 @@
 Package: libclass-c3-xs-perl
 Architecture: any
 Depends: ${misc:Depends}, ${perl:Depends}, ${shlibs:Depends}
-Description: XS speedups for Class::C3
- Class::C3::XS contains XS performance enhancers for Class::C3 version 0.16 
- and higher. The main Class::C3 package will use this package automatically 
- if it can find it. Do not use this package directly, use Class::C3 instead.
+Recommends: libclass-c3-perl (>= 0.16)
+Description: Perl module to accelerate Class::C3
+ Class::C3::XS is a Perl module designed to enhance the performance of the
+ Class::C3 package (see libclass-c3-perl). It does so automatically and is not
+ designed to be used directly; once installed, it should accelerate all programs
+ that make use of Class::C3 itself.

Modified: trunk/libclass-c3-xs-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-c3-xs-perl/debian/copyright?rev=44795&op=diff
==============================================================================
--- trunk/libclass-c3-xs-perl/debian/copyright (original)
+++ trunk/libclass-c3-xs-perl/debian/copyright Fri Sep 25 13:06:38 2009
@@ -1,37 +1,41 @@
 Format-Specification:
     http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196
-Upstream-Maintainer: Brandon L. Black
+Upstream-Maintainer: Florian Ragwitz <rafl at debian.org>
 Upstream-Source: http://search.cpan.org/dist/Class-C3-XS/
 Upstream-Name: Class-C3-XS
 
 Files: *
-Author: Brandon L. Black, <blblack at gmail.com>
+Author: Brandon L. Black <blblack at gmail.com>
 Copyright: no explicit copyright. ChangeLog shows that the module was
  developed during 2007 and 2009
-License: GPL-1+|Artistic
- This library is free software; you can redistribute it and/or modify
- it under the same terms as Perl itself. 
- .
- Perl is distributed under licenses:
- .
-   a) the GNU General Public License as published by the Free Software
-      Foundation; either version 1, or (at your option) any later
-      version, or
- .
-   b) the "Artistic License" which comes with Perl.
- .
- On Debian GNU/Linux systems, the complete text of the GNU General Public
- License can be found in /usr/share/common-licenses/GPL' and the Artistic
- Licence in /usr/share/common-licenses/Artistic'.
+License: GPL-1+ | Artistic
 
-Files: inc/*
-Copyright: 2002 - 2009 by Brian Ingerson, Audrey Tang and Adam Kennedy.
+Files: debian/*
+Copyright: 2009, Jonathan Yu <jawnsy at cpan.org>
+ 2008, Damyan Ivanov <dmn at debian.org>
+ 2007-2009, Krzysztof Krzyzaniak (eloy) <eloy at debian.org>
+License: GPL-1+ | Artistic
+X-Comment: It is assumed that all maintainers license their work as the
+ same as upstream.
+
+Files: inc/Module/*
+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: Artistic | GPL-1+
 
-Files: debian/*
-Copyright: © 2007-2009 Krzysztof Krzyzaniak (eloy) <eloy at debian.org>
-Copyright: © 2007-2009 Debian Perl Group <debian-perl at lists.debian.org>
-License: other
- It is assumed that all maintainers license their worh in a manner, compatible
- with upstream's license.
+License: Artistic
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Artistic License, which comes with Perl.
+    On Debian GNU/Linux systems, the complete text of the Artistic License
+    can be found in `/usr/share/common-licenses/Artistic'
+
+License: GPL-1+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 1, or (at your option)
+    any later version.
+    On Debian GNU/Linux systems, the complete text of the GNU General
+    Public License can be found in `/usr/share/common-licenses/GPL'
+

Modified: trunk/libclass-c3-xs-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-c3-xs-perl/debian/rules?rev=44795&op=diff
==============================================================================
--- trunk/libclass-c3-xs-perl/debian/rules (original)
+++ trunk/libclass-c3-xs-perl/debian/rules Fri Sep 25 13:06:38 2009
@@ -1,23 +1,4 @@
 #!/usr/bin/make -f
 
-build: build-stamp
-build-stamp:
-	dh build
-	touch $@
-
-clean:
+%:
 	dh $@
-
-install: install-stamp
-install-stamp: build-stamp
-	dh install
-	touch $@
-
-binary-arch: install
-	dh $@
-
-binary-indep:
-
-binary: binary-arch binary-indep
-
-.PHONY: binary binary-arch binary-indep install clean build

Modified: trunk/libclass-c3-xs-perl/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-c3-xs-perl/inc/Module/Install.pm?rev=44795&op=diff
==============================================================================
--- trunk/libclass-c3-xs-perl/inc/Module/Install.pm (original)
+++ trunk/libclass-c3-xs-perl/inc/Module/Install.pm Fri Sep 25 13:06:38 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/libclass-c3-xs-perl/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-c3-xs-perl/inc/Module/Install/Base.pm?rev=44795&op=diff
==============================================================================
--- trunk/libclass-c3-xs-perl/inc/Module/Install/Base.pm (original)
+++ trunk/libclass-c3-xs-perl/inc/Module/Install/Base.pm Fri Sep 25 13:06:38 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/libclass-c3-xs-perl/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-c3-xs-perl/inc/Module/Install/Can.pm?rev=44795&op=diff
==============================================================================
--- trunk/libclass-c3-xs-perl/inc/Module/Install/Can.pm (original)
+++ trunk/libclass-c3-xs-perl/inc/Module/Install/Can.pm Fri Sep 25 13:06:38 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/libclass-c3-xs-perl/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-c3-xs-perl/inc/Module/Install/Fetch.pm?rev=44795&op=diff
==============================================================================
--- trunk/libclass-c3-xs-perl/inc/Module/Install/Fetch.pm (original)
+++ trunk/libclass-c3-xs-perl/inc/Module/Install/Fetch.pm Fri Sep 25 13:06:38 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/libclass-c3-xs-perl/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-c3-xs-perl/inc/Module/Install/Makefile.pm?rev=44795&op=diff
==============================================================================
--- trunk/libclass-c3-xs-perl/inc/Module/Install/Makefile.pm (original)
+++ trunk/libclass-c3-xs-perl/inc/Module/Install/Makefile.pm Fri Sep 25 13:06:38 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/libclass-c3-xs-perl/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-c3-xs-perl/inc/Module/Install/Metadata.pm?rev=44795&op=diff
==============================================================================
--- trunk/libclass-c3-xs-perl/inc/Module/Install/Metadata.pm (original)
+++ trunk/libclass-c3-xs-perl/inc/Module/Install/Metadata.pm Fri Sep 25 13:06:38 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/libclass-c3-xs-perl/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-c3-xs-perl/inc/Module/Install/Win32.pm?rev=44795&op=diff
==============================================================================
--- trunk/libclass-c3-xs-perl/inc/Module/Install/Win32.pm (original)
+++ trunk/libclass-c3-xs-perl/inc/Module/Install/Win32.pm Fri Sep 25 13:06:38 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/libclass-c3-xs-perl/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-c3-xs-perl/inc/Module/Install/WriteAll.pm?rev=44795&op=diff
==============================================================================
--- trunk/libclass-c3-xs-perl/inc/Module/Install/WriteAll.pm (original)
+++ trunk/libclass-c3-xs-perl/inc/Module/Install/WriteAll.pm Fri Sep 25 13:06:38 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/libclass-c3-xs-perl/lib/Class/C3/XS.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libclass-c3-xs-perl/lib/Class/C3/XS.pm?rev=44795&op=diff
==============================================================================
--- trunk/libclass-c3-xs-perl/lib/Class/C3/XS.pm (original)
+++ trunk/libclass-c3-xs-perl/lib/Class/C3/XS.pm Fri Sep 25 13:06:38 2009
@@ -4,7 +4,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.11';
+our $VERSION = '0.13';
 
 =pod
 
@@ -47,6 +47,8 @@
 require XSLoader;
 XSLoader::load('Class::C3::XS', $VERSION);
 
+$VERSION = eval $VERSION;
+
 package # hide me from PAUSE
     next;
 




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