r38126 - in /trunk/libmoosex-types-perl: ./ debian/ inc/Module/ inc/Module/Install/ lib/MooseX/

carnil-guest at users.alioth.debian.org carnil-guest at users.alioth.debian.org
Mon Jun 15 18:43:00 UTC 2009


Author: carnil-guest
Date: Mon Jun 15 18:42:53 2009
New Revision: 38126

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=38126
Log:
* New upstream release
* Add myself to uploaders
* debian/rules: minimize rules file.
* debian/watch: remove comments on file 
* debian/copyright: Add pkg-perl members for debian packaging
  copyright. 

Modified:
    trunk/libmoosex-types-perl/Changes
    trunk/libmoosex-types-perl/META.yml
    trunk/libmoosex-types-perl/README
    trunk/libmoosex-types-perl/debian/changelog
    trunk/libmoosex-types-perl/debian/control
    trunk/libmoosex-types-perl/debian/copyright
    trunk/libmoosex-types-perl/debian/rules
    trunk/libmoosex-types-perl/debian/watch
    trunk/libmoosex-types-perl/inc/Module/AutoInstall.pm
    trunk/libmoosex-types-perl/inc/Module/Install.pm
    trunk/libmoosex-types-perl/inc/Module/Install/AutoInstall.pm
    trunk/libmoosex-types-perl/inc/Module/Install/Base.pm
    trunk/libmoosex-types-perl/inc/Module/Install/Can.pm
    trunk/libmoosex-types-perl/inc/Module/Install/Fetch.pm
    trunk/libmoosex-types-perl/inc/Module/Install/Include.pm
    trunk/libmoosex-types-perl/inc/Module/Install/Makefile.pm
    trunk/libmoosex-types-perl/inc/Module/Install/Metadata.pm
    trunk/libmoosex-types-perl/inc/Module/Install/Win32.pm
    trunk/libmoosex-types-perl/inc/Module/Install/WriteAll.pm
    trunk/libmoosex-types-perl/lib/MooseX/Types.pm

Modified: trunk/libmoosex-types-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-types-perl/Changes?rev=38126&op=diff
==============================================================================
--- trunk/libmoosex-types-perl/Changes (original)
+++ trunk/libmoosex-types-perl/Changes Mon Jun 15 18:42:53 2009
@@ -1,3 +1,6 @@
+0.12    Sun Jun 14 14:39:57 PDT 2009
+        - fix mixing of typelibs with regular Moose classes
+
 0.11    Sat May 23 18:02:35 PDT 2009
         - warning on string types and unregistered class/role types
         - better error for missing comma

Modified: trunk/libmoosex-types-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-types-perl/META.yml?rev=38126&op=diff
==============================================================================
--- trunk/libmoosex-types-perl/META.yml (original)
+++ trunk/libmoosex-types-perl/META.yml Mon Jun 15 18:42:53 2009
@@ -9,7 +9,7 @@
 configure_requires:
   ExtUtils::MakeMaker: 6.42
 distribution_type: module
-generated_by: 'Module::Install version 0.87'
+generated_by: 'Module::Install version 0.91'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -22,7 +22,7 @@
 provides:
   MooseX::Types:
     file: lib/MooseX/Types.pm
-    version: 0.11
+    version: 0.12
   MooseX::Types::Base:
     file: lib/MooseX/Types/Base.pm
   MooseX::Types::CheckedUtilExports:
@@ -50,4 +50,4 @@
   perl: 5.8.0
 resources:
   license: http://dev.perl.org/licenses/
-version: 0.11
+version: 0.12

Modified: trunk/libmoosex-types-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-types-perl/README?rev=38126&op=diff
==============================================================================
--- trunk/libmoosex-types-perl/README (original)
+++ trunk/libmoosex-types-perl/README Mon Jun 15 18:42:53 2009
@@ -97,8 +97,9 @@
     This module will also provide you with some helper functions to make it
     easier to use Moose types in your code.
 
-    String type names will produce a syntax error, unless it's for a
-    "class_type" or "role_type" declared within the library.
+    String type names will produce a warning, unless it's for a "class_type"
+    or "role_type" declared within the library, or a fully qualified name
+    like 'MyTypeLibrary::Foo'.
 
 TYPE HANDLER FUNCTIONS
   $type

Modified: trunk/libmoosex-types-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-types-perl/debian/changelog?rev=38126&op=diff
==============================================================================
--- trunk/libmoosex-types-perl/debian/changelog (original)
+++ trunk/libmoosex-types-perl/debian/changelog Mon Jun 15 18:42:53 2009
@@ -1,8 +1,17 @@
-libmoosex-types-perl (0.11-2) UNRELEASED; urgency=low
+libmoosex-types-perl (0.12-1) unstable; urgency=low
 
+  [ Nathan Handler ]
   * debian/watch: Update to ignore development releases.
 
- -- Nathan Handler <nhandler at ubuntu.com>  Sat, 06 Jun 2009 01:36:29 +0000
+  [ Salvatore Bonaccorso ]
+  * New upstream release
+  * Add myself to uploaders
+  * debian/rules: minimize rules file.
+  * debian/watch: remove comments on file 
+  * debian/copyright: Add pkg-perl members for debian packaging
+    copyright. 
+
+ -- Salvatore Bonaccorso <salvatore.bonaccorso at gmail.com>  Mon, 15 Jun 2009 20:35:38 +0200
 
 libmoosex-types-perl (0.11-1) unstable; urgency=low
 

Modified: trunk/libmoosex-types-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-types-perl/debian/control?rev=38126&op=diff
==============================================================================
--- trunk/libmoosex-types-perl/debian/control (original)
+++ trunk/libmoosex-types-perl/debian/control Mon Jun 15 18:42:53 2009
@@ -8,7 +8,8 @@
   libtest-simple-perl (>= 0.80), libtest-exception-perl,
   libsub-name-perl
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
-Uploaders: Ansgar Burchardt <ansgar at 43-1.org>, Ryan Niebur <ryanryan52 at gmail.com>
+Uploaders: Ansgar Burchardt <ansgar at 43-1.org>, Ryan Niebur <ryanryan52 at gmail.com>,
+  Salvatore Bonaccorso <salvatore.bonaccorso at gmail.com>
 Standards-Version: 3.8.1
 Homepage: http://search.cpan.org/dist/MooseX-Types/
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libmoosex-types-perl/

Modified: trunk/libmoosex-types-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-types-perl/debian/copyright?rev=38126&op=diff
==============================================================================
--- trunk/libmoosex-types-perl/debian/copyright (original)
+++ trunk/libmoosex-types-perl/debian/copyright Mon Jun 15 18:42:53 2009
@@ -19,6 +19,7 @@
 
 Files: debian/*
 Copyright: 2009, Ansgar Burchardt <ansgar at 43-1.org>
+           2009, various members of the Debian Perl Group, cf. debian/changelog
 License: Artistic | GPL-1+
 
 License: Artistic

Modified: trunk/libmoosex-types-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-types-perl/debian/rules?rev=38126&op=diff
==============================================================================
--- trunk/libmoosex-types-perl/debian/rules (original)
+++ trunk/libmoosex-types-perl/debian/rules Mon Jun 15 18:42:53 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:
-
-binary-indep: install
-	dh $@
-
-binary: binary-arch binary-indep
-
-.PHONY: binary binary-arch binary-indep install clean build

Modified: trunk/libmoosex-types-perl/debian/watch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-types-perl/debian/watch?rev=38126&op=diff
==============================================================================
--- trunk/libmoosex-types-perl/debian/watch (original)
+++ trunk/libmoosex-types-perl/debian/watch Mon Jun 15 18:42:53 2009
@@ -1,4 +1,2 @@
-# format version number, currently 3; this line is compulsory!
 version=3
-# URL to the package page followed by a regex to search
 http://search.cpan.org/dist/MooseX-Types/   .*/MooseX-Types-v?(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$

Modified: trunk/libmoosex-types-perl/inc/Module/AutoInstall.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-types-perl/inc/Module/AutoInstall.pm?rev=38126&op=diff
==============================================================================
--- trunk/libmoosex-types-perl/inc/Module/AutoInstall.pm (original)
+++ trunk/libmoosex-types-perl/inc/Module/AutoInstall.pm Mon Jun 15 18:42:53 2009
@@ -175,15 +175,24 @@
             }
 
             # XXX: check for conflicts and uninstalls(!) them.
-            if (
-                defined( my $cur = _version_check( _load($mod), $arg ||= 0 ) ) )
+            my $cur = _load($mod);
+            if (_version_cmp ($cur, $arg) >= 0)
             {
                 print "loaded. ($cur" . ( $arg ? " >= $arg" : '' ) . ")\n";
                 push @Existing, $mod => $arg;
                 $DisabledTests{$_} = 1 for map { glob($_) } @skiptests;
             }
             else {
-                print "missing." . ( $arg ? " (would need $arg)" : '' ) . "\n";
+                if (not defined $cur)   # indeed missing
+                {
+                    print "missing." . ( $arg ? " (would need $arg)" : '' ) . "\n";
+                }
+                else
+                {
+                    # no need to check $arg as _version_cmp ($cur, undef) would satisfy >= above
+                    print "too old. ($cur < $arg)\n";
+                }
+
                 push @required, $mod => $arg;
             }
         }
@@ -268,8 +277,11 @@
 
     require CPAN;
 
-    if ($CPAN::VERSION > '1.89' && $cpan_env) {
-        return _running_under('CPAN');
+    if ($CPAN::VERSION > '1.89') {
+        if ($cpan_env) {
+            return _running_under('CPAN');
+        }
+        return; # CPAN.pm new enough, don't need to check further
     }
 
     # last ditch attempt, this -will- configure CPAN, very sorry
@@ -310,7 +322,7 @@
     while ( my ( $pkg, $ver ) = splice( @_, 0, 2 ) ) {
 
         # grep out those already installed
-        if ( defined( _version_check( _load($pkg), $ver ) ) ) {
+        if ( _version_cmp( _load($pkg), $ver ) >= 0 ) {
             push @installed, $pkg;
         }
         else {
@@ -349,7 +361,7 @@
 
     # see if we have successfully installed them
     while ( my ( $pkg, $ver ) = splice( @modules, 0, 2 ) ) {
-        if ( defined( _version_check( _load($pkg), $ver ) ) ) {
+        if ( _version_cmp( _load($pkg), $ver ) >= 0 ) {
             push @installed, $pkg;
         }
         elsif ( $args{do_once} and open( FAILED, '>> .#autoinstall.failed' ) ) {
@@ -404,7 +416,7 @@
         my $success;
         my $obj = $modtree->{$pkg};
 
-        if ( $obj and defined( _version_check( $obj->{version}, $ver ) ) ) {
+        if ( $obj and _version_cmp( $obj->{version}, $ver ) >= 0 ) {
             my $pathname = $pkg;
             $pathname =~ s/::/\\W/;
 
@@ -497,7 +509,7 @@
         my $obj     = CPAN::Shell->expand( Module => $pkg );
         my $success = 0;
 
-        if ( $obj and defined( _version_check( $obj->cpan_version, $ver ) ) ) {
+        if ( $obj and _version_cmp( $obj->cpan_version, $ver ) >= 0 ) {
             my $pathname = $pkg;
             $pathname =~ s/::/\\W/;
 
@@ -561,7 +573,7 @@
     my $ver   = shift;
 
     return
-      if defined( _version_check( _load($class), $ver ) );  # no need to upgrade
+      if _version_cmp( _load($class), $ver ) >= 0;  # no need to upgrade
 
     if (
         _prompt( "==> A newer version of $class ($ver) is required. Install?",
@@ -658,7 +670,7 @@
 
 # Load CPAN.pm and it's configuration
 sub _load_cpan {
-    return if $CPAN::VERSION and not @_;
+    return if $CPAN::VERSION and $CPAN::Config and not @_;
     require CPAN;
     if ( $CPAN::HandleConfig::VERSION ) {
         # Newer versions of CPAN have a HandleConfig module
@@ -670,9 +682,11 @@
 }
 
 # compare two versions, either use Sort::Versions or plain comparison
-sub _version_check {
+# return values same as <=>
+sub _version_cmp {
     my ( $cur, $min ) = @_;
-    return unless defined $cur;
+    return -1 unless defined $cur;  # if 0 keep comparing
+    return 1 unless $min;
 
     $cur =~ s/\s+$//;
 
@@ -683,16 +697,13 @@
             ) {
 
             # use version.pm if it is installed.
-            return (
-                ( version->new($cur) >= version->new($min) ) ? $cur : undef );
+            return version->new($cur) <=> version->new($min);
         }
         elsif ( $Sort::Versions::VERSION or defined( _load('Sort::Versions') ) )
         {
 
             # use Sort::Versions as the sorting algorithm for a.b.c versions
-            return ( ( Sort::Versions::versioncmp( $cur, $min ) != -1 )
-                ? $cur
-                : undef );
+            return Sort::Versions::versioncmp( $cur, $min );
         }
 
         warn "Cannot reliably compare non-decimal formatted versions.\n"
@@ -701,7 +712,7 @@
 
     # plain comparison
     local $^W = 0;    # shuts off 'not numeric' bugs
-    return ( $cur >= $min ? $cur : undef );
+    return $cur <=> $min;
 }
 
 # nothing; this usage is deprecated.
@@ -791,4 +802,4 @@
 
 __END__
 
-#line 1045
+#line 1056

Modified: trunk/libmoosex-types-perl/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-types-perl/inc/Module/Install.pm?rev=38126&op=diff
==============================================================================
--- trunk/libmoosex-types-perl/inc/Module/Install.pm (original)
+++ trunk/libmoosex-types-perl/inc/Module/Install.pm Mon Jun 15 18:42:53 2009
@@ -28,7 +28,7 @@
 	# This is not enforced yet, but will be some time in the next few
 	# releases once we can make sure it won't clash with custom
 	# Module::Install extensions.
-	$VERSION = '0.87';
+	$VERSION = '0.91';
 
 	# Storage for the pseudo-singleton
 	$MAIN    = undef;
@@ -353,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]): $!";
@@ -384,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/libmoosex-types-perl/inc/Module/Install/AutoInstall.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-types-perl/inc/Module/Install/AutoInstall.pm?rev=38126&op=diff
==============================================================================
--- trunk/libmoosex-types-perl/inc/Module/Install/AutoInstall.pm (original)
+++ trunk/libmoosex-types-perl/inc/Module/Install/AutoInstall.pm Mon Jun 15 18:42:53 2009
@@ -2,13 +2,13 @@
 package Module::Install::AutoInstall;
 
 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.87';
+	$VERSION = '0.91';
+	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
-	@ISA     = qw{Module::Install::Base};
 }
 
 sub AutoInstall { $_[0] }

Modified: trunk/libmoosex-types-perl/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-types-perl/inc/Module/Install/Base.pm?rev=38126&op=diff
==============================================================================
--- trunk/libmoosex-types-perl/inc/Module/Install/Base.pm (original)
+++ trunk/libmoosex-types-perl/inc/Module/Install/Base.pm Mon Jun 15 18:42:53 2009
@@ -4,7 +4,7 @@
 use strict 'vars';
 use vars qw{$VERSION};
 BEGIN {
-	$VERSION = '0.87';
+	$VERSION = '0.91';
 }
 
 # Suspend handler for "redefined" warnings
@@ -13,42 +13,34 @@
 	$SIG{__WARN__} = sub { $w };
 }
 
-### This is the ONLY module that shouldn't have strict on
-# use strict;
-
-#line 45
+#line 42
 
 sub new {
-	my ($class, %args) = @_;
-
-	foreach my $method ( qw(call load) ) {
-		next if defined &{"$class\::$method"};
-		*{"$class\::$method"} = sub {
-			shift()->_top->$method(@_);
-		};
+	my $class = shift;
+	unless ( defined &{"${class}::call"} ) {
+		*{"${class}::call"} = sub { shift->_top->call(@_) };
 	}
-
-	bless( \%args, $class );
+	unless ( defined &{"${class}::load"} ) {
+		*{"${class}::load"} = sub { shift->_top->load(@_) };
+	}
+	bless { @_ }, $class;
 }
 
-#line 66
+#line 61
 
 sub AUTOLOAD {
-	my $self = shift;
 	local $@;
-	my $autoload = eval {
-		$self->_top->autoload
-	} or return;
-	goto &$autoload;
+	my $func = eval { shift->_top->autoload } or return;
+	goto &$func;
 }
 
-#line 83
+#line 75
 
 sub _top {
 	$_[0]->{_top};
 }
 
-#line 98
+#line 90
 
 sub admin {
 	$_[0]->_top->{admin}
@@ -56,7 +48,7 @@
 	Module::Install::Base::FakeAdmin->new;
 }
 
-#line 114
+#line 106
 
 sub is_admin {
 	$_[0]->admin->VERSION;
@@ -83,4 +75,4 @@
 
 1;
 
-#line 162
+#line 154

Modified: trunk/libmoosex-types-perl/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-types-perl/inc/Module/Install/Can.pm?rev=38126&op=diff
==============================================================================
--- trunk/libmoosex-types-perl/inc/Module/Install/Can.pm (original)
+++ trunk/libmoosex-types-perl/inc/Module/Install/Can.pm Mon Jun 15 18:42:53 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.87';
+	$VERSION = '0.91';
+	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
-	@ISA     = qw{Module::Install::Base};
 }
 
 # check if we can load some module

Modified: trunk/libmoosex-types-perl/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-types-perl/inc/Module/Install/Fetch.pm?rev=38126&op=diff
==============================================================================
--- trunk/libmoosex-types-perl/inc/Module/Install/Fetch.pm (original)
+++ trunk/libmoosex-types-perl/inc/Module/Install/Fetch.pm Mon Jun 15 18:42:53 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.87';
+	$VERSION = '0.91';
+	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
-	@ISA     = qw{Module::Install::Base};
 }
 
 sub get_file {

Modified: trunk/libmoosex-types-perl/inc/Module/Install/Include.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-types-perl/inc/Module/Install/Include.pm?rev=38126&op=diff
==============================================================================
--- trunk/libmoosex-types-perl/inc/Module/Install/Include.pm (original)
+++ trunk/libmoosex-types-perl/inc/Module/Install/Include.pm Mon Jun 15 18:42:53 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.87';
+	$VERSION = '0.91';
+	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
-	@ISA     = qw{Module::Install::Base};
 }
 
 sub include {

Modified: trunk/libmoosex-types-perl/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-types-perl/inc/Module/Install/Makefile.pm?rev=38126&op=diff
==============================================================================
--- trunk/libmoosex-types-perl/inc/Module/Install/Makefile.pm (original)
+++ trunk/libmoosex-types-perl/inc/Module/Install/Makefile.pm Mon Jun 15 18:42:53 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.87';
+	$VERSION = '0.91';
+	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
-	@ISA     = qw{Module::Install::Base};
 }
 
 sub Makefile { $_[0] }

Modified: trunk/libmoosex-types-perl/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-types-perl/inc/Module/Install/Metadata.pm?rev=38126&op=diff
==============================================================================
--- trunk/libmoosex-types-perl/inc/Module/Install/Metadata.pm (original)
+++ trunk/libmoosex-types-perl/inc/Module/Install/Metadata.pm Mon Jun 15 18:42:53 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.87';
-	@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/libmoosex-types-perl/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-types-perl/inc/Module/Install/Win32.pm?rev=38126&op=diff
==============================================================================
--- trunk/libmoosex-types-perl/inc/Module/Install/Win32.pm (original)
+++ trunk/libmoosex-types-perl/inc/Module/Install/Win32.pm Mon Jun 15 18:42:53 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.87';
-	@ISA     = qw{Module::Install::Base};
+	$VERSION = '0.91';
+	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
 

Modified: trunk/libmoosex-types-perl/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-types-perl/inc/Module/Install/WriteAll.pm?rev=38126&op=diff
==============================================================================
--- trunk/libmoosex-types-perl/inc/Module/Install/WriteAll.pm (original)
+++ trunk/libmoosex-types-perl/inc/Module/Install/WriteAll.pm Mon Jun 15 18:42:53 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.87';
+	$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/libmoosex-types-perl/lib/MooseX/Types.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-types-perl/lib/MooseX/Types.pm?rev=38126&op=diff
==============================================================================
--- trunk/libmoosex-types-perl/lib/MooseX/Types.pm (original)
+++ trunk/libmoosex-types-perl/lib/MooseX/Types.pm Mon Jun 15 18:42:53 2009
@@ -20,7 +20,7 @@
 use namespace::clean -except => [qw( meta )];
 
 use 5.008;
-our $VERSION = '0.11';
+our $VERSION = '0.12';
 my $UndefMsg = q{Action for type '%s' not yet defined in library '%s'};
 
 =head1 SYNOPSIS
@@ -122,8 +122,9 @@
 This module will also provide you with some helper functions to make it 
 easier to use Moose types in your code.
 
-String type names will produce a syntax error, unless it's for a C<class_type>
-or C<role_type> declared within the library.
+String type names will produce a warning, unless it's for a C<class_type> or
+C<role_type> declared within the library, or a fully qualified name like
+C<'MyTypeLibrary::Foo'>.
 
 =head1 TYPE HANDLER FUNCTIONS
 
@@ -373,8 +374,8 @@
     
     ## Return an anonymous subroutine that will generate the proxied type
     ## constraint for you.
-    
-    return subname $name => sub {
+
+    return subname "__ANON__::$name" => sub {
         my $type_constraint = $class->create_base_type_constraint($name);
 
         if(defined(my $params = shift @_)) {




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