Hello community,

here is the log from the commit of package perl-CPAN-Meta for openSUSE:Factory 
checked in at 2013-12-16 09:26:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-CPAN-Meta (Old)
 and      /work/SRC/openSUSE:Factory/.perl-CPAN-Meta.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-CPAN-Meta"

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-CPAN-Meta/perl-CPAN-Meta.changes    
2013-11-26 19:24:53.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.perl-CPAN-Meta.new/perl-CPAN-Meta.changes       
2013-12-16 09:26:41.000000000 +0100
@@ -1,0 +2,11 @@
+Mon Dec  9 11:18:14 UTC 2013 - co...@suse.com
+
+- updated to 2.133380
+   [FIXED]
+   - Improved bad version handling during META conversion
+ 
+   - When downgrading multiple licenses to version 1.x META formats, if all
+     the licenses are open source, the downgraded license will be
+     "open_source", not "unknown"
+
+-------------------------------------------------------------------

Old:
----
  CPAN-Meta-2.132830.tar.gz

New:
----
  CPAN-Meta-2.133380.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-CPAN-Meta.spec ++++++
--- /var/tmp/diff_new_pack.vLLlvD/_old  2013-12-16 09:26:41.000000000 +0100
+++ /var/tmp/diff_new_pack.vLLlvD/_new  2013-12-16 09:26:41.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           perl-CPAN-Meta
-Version:        2.132830
+Version:        2.133380
 Release:        0
 %define cpan_name CPAN-Meta
 Summary:        the distribution metadata for a CPAN dist
@@ -33,6 +33,7 @@
 BuildRequires:  perl(CPAN::Meta::YAML) >= 0.008
 BuildRequires:  perl(File::Temp) >= 0.20
 BuildRequires:  perl(JSON::PP) >= 2.27200
+BuildRequires:  perl(List::Util) >= 1.33
 BuildRequires:  perl(Parse::CPAN::Meta) >= 1.4403
 BuildRequires:  perl(Test::More) >= 0.88
 BuildRequires:  perl(version) >= 0.88
@@ -46,6 +47,7 @@
 Requires:       perl(CPAN::Meta::Requirements) >= 2.121
 Requires:       perl(CPAN::Meta::YAML) >= 0.008
 Requires:       perl(JSON::PP) >= 2.27200
+Requires:       perl(List::Util) >= 1.33
 Requires:       perl(Parse::CPAN::Meta) >= 1.4403
 Requires:       perl(version) >= 0.88
 %{perl_requires}

++++++ CPAN-Meta-2.132830.tar.gz -> CPAN-Meta-2.133380.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CPAN-Meta-2.132830/Changes 
new/CPAN-Meta-2.133380/Changes
--- old/CPAN-Meta-2.132830/Changes      2013-10-10 22:04:44.000000000 +0200
+++ new/CPAN-Meta-2.133380/Changes      2013-12-04 05:01:20.000000000 +0100
@@ -1,5 +1,15 @@
 Revision history for CPAN-Meta
 
+2.133380  2013-12-03 23:01:07 America/New_York
+
+  [FIXED]
+
+  - Improved bad version handling during META conversion
+
+  - When downgrading multiple licenses to version 1.x META formats, if all
+    the licenses are open source, the downgraded license will be
+    "open_source", not "unknown"
+
 2.132830  2013-10-10 16:04:30 America/New_York
 
   [ADDED]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CPAN-Meta-2.132830/MANIFEST 
new/CPAN-Meta-2.133380/MANIFEST
--- old/CPAN-Meta-2.132830/MANIFEST     2013-10-10 22:04:44.000000000 +0200
+++ new/CPAN-Meta-2.133380/MANIFEST     2013-12-04 05:01:20.000000000 +0100
@@ -22,7 +22,6 @@
 lib/CPAN/Meta/Spec.pm
 lib/CPAN/Meta/Validator.pm
 perlcritic.rc
-t/00-compile.t
 t/00-report-prereqs.t
 t/README-data.txt
 t/converter-bad.t
@@ -85,6 +84,7 @@
 t/save-load.t
 t/strings.t
 t/validator.t
+xt/author/00-compile.t
 xt/author/critic.t
 xt/author/pod-spell.t
 xt/release/distmeta.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CPAN-Meta-2.132830/META.json 
new/CPAN-Meta-2.133380/META.json
--- old/CPAN-Meta-2.132830/META.json    2013-10-10 22:04:44.000000000 +0200
+++ new/CPAN-Meta-2.133380/META.json    2013-12-04 05:01:20.000000000 +0100
@@ -5,7 +5,7 @@
       "Ricardo Signes <r...@cpan.org>"
    ],
    "dynamic_config" : 0,
-   "generated_by" : "Dist::Zilla version 4.300039, CPAN::Meta::Converter 
version 2.132810",
+   "generated_by" : "Dist::Zilla version 5.006, CPAN::Meta::Converter version 
2.132830",
    "license" : [
       "perl_5"
    ],
@@ -34,8 +34,20 @@
       },
       "develop" : {
          "requires" : {
+            "Dist::Zilla" : "5.006",
+            "Dist::Zilla::Plugin::AutoVersion" : "0",
+            "Dist::Zilla::Plugin::MakeMaker" : "0",
+            "Dist::Zilla::Plugin::MakeMaker::Highlander" : "0.003",
+            "Dist::Zilla::Plugin::OnlyCorePrereqs" : "0",
+            "Dist::Zilla::Plugin::Prereqs" : "0",
+            "Dist::Zilla::PluginBundle::DAGOLDEN" : "0.053",
+            "File::Spec" : "0",
+            "File::Temp" : "0",
+            "IO::Handle" : "0",
+            "IPC::Open3" : "0",
             "Pod::Coverage::TrustPod" : "0",
             "Test::CPAN::Meta" : "0",
+            "Test::More" : "0",
             "Test::Pod" : "1.41",
             "Test::Pod::Coverage" : "1.08"
          }
@@ -46,6 +58,7 @@
             "CPAN::Meta::YAML" : "0.008",
             "Carp" : "0",
             "JSON::PP" : "2.27200",
+            "List::Util" : "1.33",
             "Parse::CPAN::Meta" : "1.4403",
             "Scalar::Util" : "0",
             "perl" : "5.008",
@@ -55,6 +68,10 @@
          }
       },
       "test" : {
+         "recommends" : {
+            "CPAN::Meta" : "0",
+            "CPAN::Meta::Requirements" : "0"
+         },
          "requires" : {
             "Data::Dumper" : "0",
             "ExtUtils::MakeMaker" : "0",
@@ -63,9 +80,6 @@
             "File::Spec::Functions" : "0",
             "File::Temp" : "0.20",
             "IO::Dir" : "0",
-            "IO::Handle" : "0",
-            "IPC::Open3" : "0",
-            "List::Util" : "0",
             "Test::More" : "0.88",
             "overload" : "0",
             "utf8" : "0"
@@ -75,31 +89,31 @@
    "provides" : {
       "CPAN::Meta" : {
          "file" : "lib/CPAN/Meta.pm",
-         "version" : "2.132830"
+         "version" : "2.133380"
       },
       "CPAN::Meta::Converter" : {
          "file" : "lib/CPAN/Meta/Converter.pm",
-         "version" : "2.132830"
+         "version" : "2.133380"
       },
       "CPAN::Meta::Feature" : {
          "file" : "lib/CPAN/Meta/Feature.pm",
-         "version" : "2.132830"
+         "version" : "2.133380"
       },
       "CPAN::Meta::History" : {
          "file" : "lib/CPAN/Meta/History.pm",
-         "version" : "2.132830"
+         "version" : "2.133380"
       },
       "CPAN::Meta::Prereqs" : {
          "file" : "lib/CPAN/Meta/Prereqs.pm",
-         "version" : "2.132830"
+         "version" : "2.133380"
       },
       "CPAN::Meta::Spec" : {
          "file" : "lib/CPAN/Meta/Spec.pm",
-         "version" : "2.132830"
+         "version" : "2.133380"
       },
       "CPAN::Meta::Validator" : {
          "file" : "lib/CPAN/Meta/Validator.pm",
-         "version" : "2.132830"
+         "version" : "2.133380"
       }
    },
    "release_status" : "stable",
@@ -114,7 +128,7 @@
          "web" : "https://github.com/Perl-Toolchain-Gang/CPAN-Meta";
       }
    },
-   "version" : "2.132830",
+   "version" : "2.133380",
    "x_authority" : "cpan:DAGOLDEN",
    "x_contributors" : [
       "Ansgar Burchardt <ans...@cpan.org>",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CPAN-Meta-2.132830/META.yml 
new/CPAN-Meta-2.133380/META.yml
--- old/CPAN-Meta-2.132830/META.yml     2013-10-10 22:04:44.000000000 +0200
+++ new/CPAN-Meta-2.133380/META.yml     2013-12-04 05:01:20.000000000 +0100
@@ -11,16 +11,13 @@
   File::Spec::Functions: 0
   File::Temp: 0.20
   IO::Dir: 0
-  IO::Handle: 0
-  IPC::Open3: 0
-  List::Util: 0
   Test::More: 0.88
   overload: 0
   utf8: 0
 configure_requires:
   ExtUtils::MakeMaker: 6.17
 dynamic_config: 0
-generated_by: 'Dist::Zilla version 4.300039, CPAN::Meta::Converter version 
2.132810'
+generated_by: 'Dist::Zilla version 5.006, CPAN::Meta::Converter version 
2.132830'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -38,30 +35,31 @@
 provides:
   CPAN::Meta:
     file: lib/CPAN/Meta.pm
-    version: 2.132830
+    version: 2.133380
   CPAN::Meta::Converter:
     file: lib/CPAN/Meta/Converter.pm
-    version: 2.132830
+    version: 2.133380
   CPAN::Meta::Feature:
     file: lib/CPAN/Meta/Feature.pm
-    version: 2.132830
+    version: 2.133380
   CPAN::Meta::History:
     file: lib/CPAN/Meta/History.pm
-    version: 2.132830
+    version: 2.133380
   CPAN::Meta::Prereqs:
     file: lib/CPAN/Meta/Prereqs.pm
-    version: 2.132830
+    version: 2.133380
   CPAN::Meta::Spec:
     file: lib/CPAN/Meta/Spec.pm
-    version: 2.132830
+    version: 2.133380
   CPAN::Meta::Validator:
     file: lib/CPAN/Meta/Validator.pm
-    version: 2.132830
+    version: 2.133380
 requires:
   CPAN::Meta::Requirements: 2.121
   CPAN::Meta::YAML: 0.008
   Carp: 0
   JSON::PP: 2.27200
+  List::Util: 1.33
   Parse::CPAN::Meta: 1.4403
   Scalar::Util: 0
   perl: 5.008
@@ -72,7 +70,7 @@
   bugtracker: https://github.com/Perl-Toolchain-Gang/CPAN-Meta/issues
   homepage: https://github.com/Perl-Toolchain-Gang/CPAN-Meta
   repository: https://github.com/Perl-Toolchain-Gang/CPAN-Meta.git
-version: 2.132830
+version: 2.133380
 x_authority: cpan:DAGOLDEN
 x_contributors:
   - 'Ansgar Burchardt <ans...@cpan.org>'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CPAN-Meta-2.132830/Makefile.PL 
new/CPAN-Meta-2.133380/Makefile.PL
--- old/CPAN-Meta-2.132830/Makefile.PL  2013-10-10 22:04:44.000000000 +0200
+++ new/CPAN-Meta-2.133380/Makefile.PL  2013-12-04 05:01:20.000000000 +0100
@@ -24,6 +24,7 @@
     "CPAN::Meta::YAML" => "0.008",
     "Carp" => 0,
     "JSON::PP" => "2.27200",
+    "List::Util" => "1.33",
     "Parse::CPAN::Meta" => "1.4403",
     "Scalar::Util" => 0,
     "strict" => 0,
@@ -38,44 +39,45 @@
     "File::Spec::Functions" => 0,
     "File::Temp" => "0.20",
     "IO::Dir" => 0,
-    "IO::Handle" => 0,
-    "IPC::Open3" => 0,
-    "List::Util" => 0,
     "Test::More" => "0.88",
     "overload" => 0,
     "utf8" => 0
   },
-  "VERSION" => "2.132830",
+  "VERSION" => "2.133380",
   "test" => {
     "TESTS" => "t/*.t"
   }
 );
 
 
-unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
-  my $tr = delete $WriteMakefileArgs{TEST_REQUIRES};
-  my $br = $WriteMakefileArgs{BUILD_REQUIRES};
-  for my $mod ( keys %$tr ) {
-    if ( exists $br->{$mod} ) {
-      $br->{$mod} = $tr->{$mod} if $tr->{$mod} > $br->{$mod};
-    }
-    else {
-      $br->{$mod} = $tr->{$mod};
-    }
-  }
-}
+my %FallbackPrereqs = (
+  "CPAN::Meta::Requirements" => "2.121",
+  "CPAN::Meta::YAML" => "0.008",
+  "Carp" => 0,
+  "Data::Dumper" => 0,
+  "ExtUtils::MakeMaker" => 0,
+  "File::Basename" => 0,
+  "File::Spec" => 0,
+  "File::Spec::Functions" => 0,
+  "File::Temp" => "0.20",
+  "IO::Dir" => 0,
+  "JSON::PP" => "2.27200",
+  "List::Util" => "1.33",
+  "Parse::CPAN::Meta" => "1.4403",
+  "Scalar::Util" => 0,
+  "Test::More" => "0.88",
+  "overload" => 0,
+  "strict" => 0,
+  "utf8" => 0,
+  "version" => "0.88",
+  "warnings" => 0
+);
 
-unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) {
-  my $br = delete $WriteMakefileArgs{BUILD_REQUIRES};
-  my $pp = $WriteMakefileArgs{PREREQ_PM};
-  for my $mod ( keys %$br ) {
-    if ( exists $pp->{$mod} ) {
-      $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod};
-    }
-    else {
-      $pp->{$mod} = $br->{$mod};
-    }
-  }
+
+unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
+  delete $WriteMakefileArgs{TEST_REQUIRES};
+  delete $WriteMakefileArgs{BUILD_REQUIRES};
+  $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
 }
 
 delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CPAN-Meta-2.132830/README 
new/CPAN-Meta-2.133380/README
--- old/CPAN-Meta-2.132830/README       2013-10-10 22:04:44.000000000 +0200
+++ new/CPAN-Meta-2.133380/README       2013-12-04 05:01:20.000000000 +0100
@@ -2,7 +2,7 @@
     CPAN::Meta - the distribution metadata for a CPAN dist
 
 VERSION
-    version 2.132830
+    version 2.133380
 
 SYNOPSIS
         use v5.10;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CPAN-Meta-2.132830/cpanfile 
new/CPAN-Meta-2.133380/cpanfile
--- old/CPAN-Meta-2.132830/cpanfile     2013-10-10 22:04:44.000000000 +0200
+++ new/CPAN-Meta-2.133380/cpanfile     2013-12-04 05:01:20.000000000 +0100
@@ -2,6 +2,7 @@
 requires "CPAN::Meta::YAML" => "0.008";
 requires "Carp" => "0";
 requires "JSON::PP" => "2.27200";
+requires "List::Util" => "1.33";
 requires "Parse::CPAN::Meta" => "1.4403";
 requires "Scalar::Util" => "0";
 requires "perl" => "5.008";
@@ -17,21 +18,35 @@
   requires "File::Spec::Functions" => "0";
   requires "File::Temp" => "0.20";
   requires "IO::Dir" => "0";
-  requires "IO::Handle" => "0";
-  requires "IPC::Open3" => "0";
-  requires "List::Util" => "0";
   requires "Test::More" => "0.88";
   requires "overload" => "0";
   requires "utf8" => "0";
 };
 
+on 'test' => sub {
+  recommends "CPAN::Meta" => "0";
+  recommends "CPAN::Meta::Requirements" => "0";
+};
+
 on 'configure' => sub {
   requires "ExtUtils::MakeMaker" => "6.17";
 };
 
 on 'develop' => sub {
+  requires "Dist::Zilla" => "5.006";
+  requires "Dist::Zilla::Plugin::AutoVersion" => "0";
+  requires "Dist::Zilla::Plugin::MakeMaker" => "0";
+  requires "Dist::Zilla::Plugin::MakeMaker::Highlander" => "0.003";
+  requires "Dist::Zilla::Plugin::OnlyCorePrereqs" => "0";
+  requires "Dist::Zilla::Plugin::Prereqs" => "0";
+  requires "Dist::Zilla::PluginBundle::DAGOLDEN" => "0.053";
+  requires "File::Spec" => "0";
+  requires "File::Temp" => "0";
+  requires "IO::Handle" => "0";
+  requires "IPC::Open3" => "0";
   requires "Pod::Coverage::TrustPod" => "0";
   requires "Test::CPAN::Meta" => "0";
+  requires "Test::More" => "0";
   requires "Test::Pod" => "1.41";
   requires "Test::Pod::Coverage" => "1.08";
 };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CPAN-Meta-2.132830/lib/CPAN/Meta/Converter.pm 
new/CPAN-Meta-2.133380/lib/CPAN/Meta/Converter.pm
--- old/CPAN-Meta-2.132830/lib/CPAN/Meta/Converter.pm   2013-10-10 
22:04:44.000000000 +0200
+++ new/CPAN-Meta-2.133380/lib/CPAN/Meta/Converter.pm   2013-12-04 
05:01:20.000000000 +0100
@@ -2,13 +2,14 @@
 use strict;
 use warnings;
 package CPAN::Meta::Converter;
-our $VERSION = '2.132830'; # VERSION
+our $VERSION = '2.133380'; # VERSION
 
 
 use CPAN::Meta::Validator;
 use CPAN::Meta::Requirements;
 use version 0.88 ();
 use Parse::CPAN::Meta 1.4400 ();
+use List::Util 1.33 qw/all/;
 
 sub _dclone {
   my $ref = shift;
@@ -94,7 +95,7 @@
   };
 }
 
-my @valid_licenses_1 = (
+my @open_source = (
   'perl',
   'gpl',
   'apache',
@@ -106,6 +107,12 @@
   'mit',
   'mozilla',
   'open_source',
+);
+
+my %is_open_source = map {; $_ => 1 } @open_source;
+
+my @valid_licenses_1 = (
+  @open_source,
   'unrestricted',
   'restrictive',
   'unknown',
@@ -122,7 +129,9 @@
   if ( $license_map_1{lc $element} ) {
     return $license_map_1{lc $element};
   }
-  return 'unknown';
+  else {
+    return 'unknown';
+  }
 }
 
 my @valid_licenses_2 = qw(
@@ -220,12 +229,20 @@
     return "unknown";
   }
   elsif( ref $element eq 'ARRAY' ) {
-    if ( @$element == 1 ) {
-      return $license_downgrade_map{$element->[0]} || "unknown";
+    if ( @$element > 1) {
+      if ( all { $is_open_source{ $license_downgrade_map{lc $_} || 'unknown' } 
} @$element ) {
+        return 'open_source';
+      }
+      else {
+        return 'unknown';
+      }
+    }
+    elsif ( @$element == 1 ) {
+      return $license_downgrade_map{lc $element->[0]} || "unknown";
     }
   }
   elsif ( ! ref $element ) {
-    return $license_downgrade_map{$element} || "unknown";
+    return $license_downgrade_map{lc $element} || "unknown";
   }
   return "unknown";
 }
@@ -349,7 +366,7 @@
     # XXX turn this into CPAN::Meta::Requirements with bad version hook
     # and then turn it back into a hash
     my $new_map = CPAN::Meta::Requirements->new(
-      { bad_version_hook => sub { version->new(0) } } # punt
+      { bad_version_hook => \&_bad_version_hook } # punt
     );
     while ( my ($k,$v) = each %$element ) {
       next unless _is_module_name($k);
@@ -1293,7 +1310,7 @@
 
 =pod
 
-=encoding utf-8
+=encoding UTF-8
 
 =head1 NAME
 
@@ -1301,7 +1318,7 @@
 
 =head1 VERSION
 
-version 2.132830
+version 2.133380
 
 =head1 SYNOPSIS
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CPAN-Meta-2.132830/lib/CPAN/Meta/Feature.pm 
new/CPAN-Meta-2.133380/lib/CPAN/Meta/Feature.pm
--- old/CPAN-Meta-2.132830/lib/CPAN/Meta/Feature.pm     2013-10-10 
22:04:44.000000000 +0200
+++ new/CPAN-Meta-2.133380/lib/CPAN/Meta/Feature.pm     2013-12-04 
05:01:20.000000000 +0100
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 package CPAN::Meta::Feature;
-our $VERSION = '2.132830'; # VERSION
+our $VERSION = '2.133380'; # VERSION
 
 use CPAN::Meta::Prereqs;
 
@@ -36,7 +36,7 @@
 
 =pod
 
-=encoding utf-8
+=encoding UTF-8
 
 =head1 NAME
 
@@ -44,7 +44,7 @@
 
 =head1 VERSION
 
-version 2.132830
+version 2.133380
 
 =head1 DESCRIPTION
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CPAN-Meta-2.132830/lib/CPAN/Meta/History.pm 
new/CPAN-Meta-2.133380/lib/CPAN/Meta/History.pm
--- old/CPAN-Meta-2.132830/lib/CPAN/Meta/History.pm     2013-10-10 
22:04:44.000000000 +0200
+++ new/CPAN-Meta-2.133380/lib/CPAN/Meta/History.pm     2013-12-04 
05:01:20.000000000 +0100
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 package CPAN::Meta::History;
-our $VERSION = '2.132830'; # VERSION
+our $VERSION = '2.133380'; # VERSION
 
 1;
 
@@ -13,7 +13,7 @@
 
 =pod
 
-=encoding utf-8
+=encoding UTF-8
 
 =head1 NAME
 
@@ -21,7 +21,7 @@
 
 =head1 VERSION
 
-version 2.132830
+version 2.133380
 
 =head1 DESCRIPTION
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CPAN-Meta-2.132830/lib/CPAN/Meta/Prereqs.pm 
new/CPAN-Meta-2.133380/lib/CPAN/Meta/Prereqs.pm
--- old/CPAN-Meta-2.132830/lib/CPAN/Meta/Prereqs.pm     2013-10-10 
22:04:44.000000000 +0200
+++ new/CPAN-Meta-2.133380/lib/CPAN/Meta/Prereqs.pm     2013-12-04 
05:01:20.000000000 +0100
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 package CPAN::Meta::Prereqs;
-our $VERSION = '2.132830'; # VERSION
+our $VERSION = '2.133380'; # VERSION
 
 
 use Carp qw(confess);
@@ -174,7 +174,7 @@
 
 =pod
 
-=encoding utf-8
+=encoding UTF-8
 
 =head1 NAME
 
@@ -182,7 +182,7 @@
 
 =head1 VERSION
 
-version 2.132830
+version 2.133380
 
 =head1 DESCRIPTION
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CPAN-Meta-2.132830/lib/CPAN/Meta/Spec.pm 
new/CPAN-Meta-2.133380/lib/CPAN/Meta/Spec.pm
--- old/CPAN-Meta-2.132830/lib/CPAN/Meta/Spec.pm        2013-10-10 
22:04:44.000000000 +0200
+++ new/CPAN-Meta-2.133380/lib/CPAN/Meta/Spec.pm        2013-12-04 
05:01:20.000000000 +0100
@@ -7,7 +7,7 @@
 use strict;
 use warnings;
 package CPAN::Meta::Spec;
-our $VERSION = '2.132830'; # VERSION
+our $VERSION = '2.133380'; # VERSION
 
 1;
 
@@ -20,7 +20,7 @@
 
 =pod
 
-=encoding utf-8
+=encoding UTF-8
 
 =head1 NAME
 
@@ -28,7 +28,7 @@
 
 =head1 VERSION
 
-version 2.132830
+version 2.133380
 
 =head1 SYNOPSIS
 
@@ -315,7 +315,7 @@
 
   license => [ 'perl_5' ]
 
-  license => [ 'apache_2', 'mozilla_1_0' ]
+  license => [ 'apache_2_0', 'mozilla_1_0' ]
 
 (Spec 2) [required] {List of one or more License Strings}
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CPAN-Meta-2.132830/lib/CPAN/Meta/Validator.pm 
new/CPAN-Meta-2.133380/lib/CPAN/Meta/Validator.pm
--- old/CPAN-Meta-2.132830/lib/CPAN/Meta/Validator.pm   2013-10-10 
22:04:44.000000000 +0200
+++ new/CPAN-Meta-2.133380/lib/CPAN/Meta/Validator.pm   2013-12-04 
05:01:20.000000000 +0100
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 package CPAN::Meta::Validator;
-our $VERSION = '2.132830'; # VERSION
+our $VERSION = '2.133380'; # VERSION
 
 
 #--------------------------------------------------------------------------#
@@ -815,7 +815,7 @@
 
 =pod
 
-=encoding utf-8
+=encoding UTF-8
 
 =head1 NAME
 
@@ -823,7 +823,7 @@
 
 =head1 VERSION
 
-version 2.132830
+version 2.133380
 
 =head1 SYNOPSIS
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CPAN-Meta-2.132830/lib/CPAN/Meta.pm 
new/CPAN-Meta-2.133380/lib/CPAN/Meta.pm
--- old/CPAN-Meta-2.132830/lib/CPAN/Meta.pm     2013-10-10 22:04:44.000000000 
+0200
+++ new/CPAN-Meta-2.133380/lib/CPAN/Meta.pm     2013-12-04 05:01:20.000000000 
+0100
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 package CPAN::Meta;
-our $VERSION = '2.132830'; # VERSION
+our $VERSION = '2.133380'; # VERSION
 
 
 use Carp qw(carp croak);
@@ -340,7 +340,7 @@
 
 =pod
 
-=encoding utf-8
+=encoding UTF-8
 
 =head1 NAME
 
@@ -348,7 +348,7 @@
 
 =head1 VERSION
 
-version 2.132830
+version 2.133380
 
 =head1 SYNOPSIS
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CPAN-Meta-2.132830/perlcritic.rc 
new/CPAN-Meta-2.133380/perlcritic.rc
--- old/CPAN-Meta-2.132830/perlcritic.rc        2013-10-10 22:04:44.000000000 
+0200
+++ new/CPAN-Meta-2.133380/perlcritic.rc        2013-12-04 05:01:20.000000000 
+0100
@@ -7,6 +7,9 @@
 [TestingAndDebugging::ProhibitNoStrict]
 allow = refs
 
+[Variables::ProhibitEvilVariables]
+variables = $DB::single
+
 # Turn these off
 [-BuiltinFunctions::ProhibitStringyEval]
 [-ControlStructures::ProhibitPostfixControls]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CPAN-Meta-2.132830/t/00-compile.t 
new/CPAN-Meta-2.133380/t/00-compile.t
--- old/CPAN-Meta-2.132830/t/00-compile.t       2013-10-10 22:04:44.000000000 
+0200
+++ new/CPAN-Meta-2.133380/t/00-compile.t       1970-01-01 01:00:00.000000000 
+0100
@@ -1,55 +0,0 @@
-use strict;
-use warnings;
-
-# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.033
-
-use Test::More  tests => 7 + ($ENV{AUTHOR_TESTING} ? 1 : 0);
-
-
-
-my @module_files = (
-    'CPAN/Meta.pm',
-    'CPAN/Meta/Converter.pm',
-    'CPAN/Meta/Feature.pm',
-    'CPAN/Meta/History.pm',
-    'CPAN/Meta/Prereqs.pm',
-    'CPAN/Meta/Spec.pm',
-    'CPAN/Meta/Validator.pm'
-);
-
-
-
-# fake home for cpan-testers
-use File::Temp;
-local $ENV{HOME} = File::Temp::tempdir( CLEANUP => 1 );
-
-
-use File::Spec;
-use IPC::Open3;
-use IO::Handle;
-
-my @warnings;
-for my $lib (@module_files)
-{
-    # see L<perlfaq8/How can I capture STDERR from an external command?>
-    open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!";
-    my $stderr = IO::Handle->new;
-
-    my $pid = open3($stdin, '>&STDERR', $stderr, $^X, '-Mblib', '-e', "require 
q[$lib]");
-    binmode $stderr, ':crlf' if $^O eq 'MSWin32';
-    my @_warnings = <$stderr>;
-    waitpid($pid, 0);
-    is($? >> 8, 0, "$lib loaded ok");
-
-    if (@_warnings)
-    {
-        warn @_warnings;
-        push @warnings, @_warnings;
-    }
-}
-
-
-
-is(scalar(@warnings), 0, 'no warnings found') if $ENV{AUTHOR_TESTING};
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CPAN-Meta-2.132830/t/00-report-prereqs.t 
new/CPAN-Meta-2.133380/t/00-report-prereqs.t
--- old/CPAN-Meta-2.132830/t/00-report-prereqs.t        2013-10-10 
22:04:44.000000000 +0200
+++ new/CPAN-Meta-2.133380/t/00-report-prereqs.t        2013-12-04 
05:01:20.000000000 +0100
@@ -3,6 +3,8 @@
 use strict;
 use warnings;
 
+# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.010
+
 use Test::More tests => 1;
 
 use ExtUtils::MakeMaker;
@@ -10,6 +12,7 @@
 use List::Util qw/max/;
 
 my @modules = qw(
+  CPAN::Meta
   CPAN::Meta::Requirements
   CPAN::Meta::YAML
   Carp
@@ -20,8 +23,6 @@
   File::Spec::Functions
   File::Temp
   IO::Dir
-  IO::Handle
-  IPC::Open3
   JSON::PP
   List::Util
   Parse::CPAN::Meta
@@ -35,20 +36,46 @@
   warnings
 );
 
+my %exclude = map {; $_ => 1 } qw(
+
+);
+
+my ($source) = grep { -f $_ } qw/MYMETA.json MYMETA.yml META.json/;
+$source = "META.yml" unless defined $source;
+
 # replace modules with dynamic results from MYMETA.json if we can
 # (hide CPAN::Meta from prereq scanner)
 my $cpan_meta = "CPAN::Meta";
-if ( -f "MYMETA.json" && eval "require $cpan_meta" ) { ## no critic
-  if ( my $meta = eval { CPAN::Meta->load_file("MYMETA.json") } ) {
+my $cpan_meta_req = "CPAN::Meta::Requirements";
+my $all_requires;
+if ( -f $source && eval "require $cpan_meta" ) { ## no critic
+  if ( my $meta = eval { CPAN::Meta->load_file($source) } ) {
+
+    # Get ALL modules mentioned in META (any phase/type)
     my $prereqs = $meta->prereqs;
-    delete $prereqs->{develop};
+    delete $prereqs->{develop} if not $ENV{AUTHOR_TESTING};
     my %uniq = map {$_ => 1} map { keys %$_ } map { values %$_ } values 
%$prereqs;
     $uniq{$_} = 1 for @modules; # don't lose any static ones
-    @modules = sort keys %uniq;
+    @modules = sort grep { ! $exclude{$_} } keys %uniq;
+
+    # If verifying, merge 'requires' only for major phases
+    if ( 1 ) {
+      $prereqs = $meta->effective_prereqs; # get the object, not the hash
+      if (eval "require $cpan_meta_req; 1") { ## no critic
+        $all_requires = $cpan_meta_req->new;
+        for my $phase ( qw/configure build test runtime/ ) {
+          $all_requires->add_requirements(
+            $prereqs->requirements_for($phase, 'requires')
+          );
+        }
+      }
+    }
   }
 }
 
 my @reports = [qw/Version Module/];
+my @dep_errors;
+my $req_hash = defined($all_requires) ? $all_requires->as_string_hash : {};
 
 for my $mod ( @modules ) {
   next if $mod eq 'perl';
@@ -60,9 +87,29 @@
     my $ver = MM->parse_version( catfile($prefix, $file) );
     $ver = "undef" unless defined $ver; # Newer MM should do this anyway
     push @reports, [$ver, $mod];
+
+    if ( 1 && $all_requires ) {
+      my $req = $req_hash->{$mod};
+      if ( defined $req && length $req ) {
+        if ( ! defined eval { version->parse($ver) } ) {
+          push @dep_errors, "$mod version '$ver' cannot be parsed (version 
'$req' required)";
+        }
+        elsif ( ! $all_requires->accepts_module( $mod => $ver ) ) {
+          push @dep_errors, "$mod version '$ver' is not in required range 
'$req'";
+        }
+      }
+    }
+
   }
   else {
     push @reports, ["missing", $mod];
+
+    if ( 1 && $all_requires ) {
+      my $req = $req_hash->{$mod};
+      if ( defined $req && length $req ) {
+        push @dep_errors, "$mod is not installed (version '$req' required)";
+      }
+    }
   }
 }
 
@@ -70,7 +117,17 @@
   my $vl = max map { length $_->[0] } @reports;
   my $ml = max map { length $_->[1] } @reports;
   splice @reports, 1, 0, ["-" x $vl, "-" x $ml];
-  diag "Prerequisite Report:\n", map {sprintf("  %*s 
%*s\n",$vl,$_->[0],-$ml,$_->[1])} @reports;
+  diag "\nVersions for all modules listed in $source (including optional 
ones):\n",
+    map {sprintf("  %*s %*s\n",$vl,$_->[0],-$ml,$_->[1])} @reports;
+}
+
+if ( @dep_errors ) {
+  diag join("\n",
+    "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING 
***\n",
+    "The following REQUIRED prerequisites were not satisfied:\n",
+    @dep_errors,
+    "\n"
+  );
 }
 
 pass;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CPAN-Meta-2.132830/t/converter.t 
new/CPAN-Meta-2.133380/t/converter.t
--- old/CPAN-Meta-2.132830/t/converter.t        2013-10-10 22:04:44.000000000 
+0200
+++ new/CPAN-Meta-2.133380/t/converter.t        2013-12-04 05:01:20.000000000 
+0100
@@ -274,4 +274,25 @@
   }
 }
 
+# specific test for multiple licenses
+{
+  my $path = File::Spec->catfile('t','data-test','META-2.json');
+  my $original = Parse::CPAN::Meta->load_file( $path  );
+  ok( $original, "loaded META-2.json" );
+  my $cmc = CPAN::Meta::Converter->new( $original );
+  my $cleaned_up = $cmc->convert( version => "2" );
+  is_deeply(
+      $cleaned_up->{license},
+      [ 'perl_5', 'bsd' ],
+      "multiple license preserved (v2)"
+  );
+
+  $cleaned_up = $cmc->convert( version => "1.4" );
+  is(
+      $cleaned_up->{license},
+      'open_source',
+      "multiple license converted to open_source (v1.4)"
+  );
+}
+
 done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CPAN-Meta-2.132830/t/data-test/META-2.json 
new/CPAN-Meta-2.133380/t/data-test/META-2.json
--- old/CPAN-Meta-2.132830/t/data-test/META-2.json      2013-10-10 
22:04:44.000000000 +0200
+++ new/CPAN-Meta-2.133380/t/data-test/META-2.json      2013-12-04 
05:01:20.000000000 +0100
@@ -22,7 +22,8 @@
    ],
    "release_status" : "stable",
    "license" : [
-      "perl_5"
+      "perl_5",
+      "bsd"
    ],
    "description" : "Module::Build is a system for building, testing, and 
installing Perl modules.  It is meant to be an alternative to 
ExtUtils::MakeMaker... blah blah blah",
    "keywords" : [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CPAN-Meta-2.132830/xt/author/00-compile.t 
new/CPAN-Meta-2.133380/xt/author/00-compile.t
--- old/CPAN-Meta-2.132830/xt/author/00-compile.t       1970-01-01 
01:00:00.000000000 +0100
+++ new/CPAN-Meta-2.133380/xt/author/00-compile.t       2013-12-04 
05:01:20.000000000 +0100
@@ -0,0 +1,59 @@
+use 5.006;
+use strict;
+use warnings;
+
+# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.039
+
+use Test::More  tests => 7 + ($ENV{AUTHOR_TESTING} ? 1 : 0);
+
+
+
+my @module_files = (
+    'CPAN/Meta.pm',
+    'CPAN/Meta/Converter.pm',
+    'CPAN/Meta/Feature.pm',
+    'CPAN/Meta/History.pm',
+    'CPAN/Meta/Prereqs.pm',
+    'CPAN/Meta/Spec.pm',
+    'CPAN/Meta/Validator.pm'
+);
+
+
+
+# fake home for cpan-testers
+use File::Temp;
+local $ENV{HOME} = File::Temp::tempdir( CLEANUP => 1 );
+
+
+my $inc_switch = -d 'blib' ? '-Mblib' : '-Ilib';
+
+use File::Spec;
+use IPC::Open3;
+use IO::Handle;
+
+open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!";
+
+my @warnings;
+for my $lib (@module_files)
+{
+    # see L<perlfaq8/How can I capture STDERR from an external command?>
+    my $stderr = IO::Handle->new;
+
+    my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', 
"require q[$lib]");
+    binmode $stderr, ':crlf' if $^O eq 'MSWin32';
+    my @_warnings = <$stderr>;
+    waitpid($pid, 0);
+    is($?, 0, "$lib loaded ok");
+
+    if (@_warnings)
+    {
+        warn @_warnings;
+        push @warnings, @_warnings;
+    }
+}
+
+
+
+is(scalar(@warnings), 0, 'no warnings found') if $ENV{AUTHOR_TESTING};
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CPAN-Meta-2.132830/xt/author/pod-spell.t 
new/CPAN-Meta-2.133380/xt/author/pod-spell.t
--- old/CPAN-Meta-2.132830/xt/author/pod-spell.t        2013-10-10 
22:04:44.000000000 +0200
+++ new/CPAN-Meta-2.133380/xt/author/pod-spell.t        2013-12-04 
05:01:20.000000000 +0100
@@ -80,9 +80,9 @@
 lib
 CPAN
 Meta
+Converter
+Spec
+History
 Validator
 Feature
-History
-Converter
 Prereqs
-Spec

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to