summaryrefslogtreecommitdiff
path: root/cpan/CPAN-Meta/lib/CPAN/Meta
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2015-06-11 16:28:11 +0100
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2015-06-11 16:28:11 +0100
commit2b771c51706b5815f1928ec88c49b535095adea6 (patch)
tree575c0e4775e4b2a3a493cc5ce1cba3abe6b7a0ff /cpan/CPAN-Meta/lib/CPAN/Meta
parent89d84ff965b644c21c4c0633253e4cb21f72b62c (diff)
downloadperl-2b771c51706b5815f1928ec88c49b535095adea6.tar.gz
Update CPAN-Meta to CPAN release 2.150005
[DELTA] 2.150005 2015-06-09 19:08:44-06:00 America/Denver [TESTING] - Changed some test data from UTF-8 to ASCII 2.150004 2015-05-19 11:25:53-04:00 America/New_York (TRIAL RELEASE) [DOCUMENTED] - Noted explicitly that historical META spec files are licensed under the same terms as Perl [TESTING] - Added test for 'x_deprecated' field in "provides" [META] - declared extra developer prereq 2.150003 2015-04-21 19:41:15-04:00 America/New_York (TRIAL RELEASE) [CHANGED] - Serialized CPAN::Meta objects now include a x_serialization_backend entry 2.150002 2015-04-19 01:00:10+02:00 Europe/Berlin (TRIAL RELEASE) [CHANGED] - Metadata merging now does deep hash merging as long as keys don't conflict
Diffstat (limited to 'cpan/CPAN-Meta/lib/CPAN/Meta')
-rw-r--r--cpan/CPAN-Meta/lib/CPAN/Meta/Converter.pm10
-rw-r--r--cpan/CPAN-Meta/lib/CPAN/Meta/Feature.pm11
-rw-r--r--cpan/CPAN-Meta/lib/CPAN/Meta/History.pm4
-rw-r--r--cpan/CPAN-Meta/lib/CPAN/Meta/History/Meta_1_0.pod3
-rw-r--r--cpan/CPAN-Meta/lib/CPAN/Meta/History/Meta_1_1.pod3
-rw-r--r--cpan/CPAN-Meta/lib/CPAN/Meta/History/Meta_1_2.pod3
-rw-r--r--cpan/CPAN-Meta/lib/CPAN/Meta/History/Meta_1_3.pod3
-rw-r--r--cpan/CPAN-Meta/lib/CPAN/Meta/History/Meta_1_4.pod3
-rw-r--r--cpan/CPAN-Meta/lib/CPAN/Meta/Merge.pm25
-rw-r--r--cpan/CPAN-Meta/lib/CPAN/Meta/Prereqs.pm15
-rw-r--r--cpan/CPAN-Meta/lib/CPAN/Meta/Spec.pm4
-rw-r--r--cpan/CPAN-Meta/lib/CPAN/Meta/Validator.pm11
12 files changed, 65 insertions, 30 deletions
diff --git a/cpan/CPAN-Meta/lib/CPAN/Meta/Converter.pm b/cpan/CPAN-Meta/lib/CPAN/Meta/Converter.pm
index 8b32b1360a..03806bc82b 100644
--- a/cpan/CPAN-Meta/lib/CPAN/Meta/Converter.pm
+++ b/cpan/CPAN-Meta/lib/CPAN/Meta/Converter.pm
@@ -3,7 +3,7 @@ use strict;
use warnings;
package CPAN::Meta::Converter;
-our $VERSION = '2.150001';
+our $VERSION = '2.150005';
#pod =head1 SYNOPSIS
#pod
@@ -388,6 +388,8 @@ sub _clean_version {
sub _bad_version_hook {
my ($v) = @_;
+ $v =~ s{^\s*}{};
+ $v =~ s{\s*$}{};
$v =~ s{[a-z]+$}{}; # strip trailing alphabetics
my $vobj = eval { version->new($v) };
return defined($vobj) ? $vobj : version->new(0); # or give up
@@ -803,7 +805,7 @@ my %up_convert = (
# CHANGED TO MANDATORY
'dynamic_config' => \&_keep_or_one,
# ADDED MANDATORY
- 'release_status' => \&_release_status_from_version,
+ 'release_status' => \&_release_status,
# PRIOR OPTIONAL
'keywords' => \&_keep,
'no_index' => \&_no_index_directory,
@@ -1497,7 +1499,7 @@ CPAN::Meta::Converter - Convert CPAN distribution metadata structures
=head1 VERSION
-version 2.150001
+version 2.150005
=head1 SYNOPSIS
@@ -1634,4 +1636,4 @@ the same terms as the Perl 5 programming language system itself.
__END__
-# vim: ts=2 sts=2 sw=2 et:
+# vim: ts=2 sts=2 sw=2 et :
diff --git a/cpan/CPAN-Meta/lib/CPAN/Meta/Feature.pm b/cpan/CPAN-Meta/lib/CPAN/Meta/Feature.pm
index 4bfbb19b4c..9dac4f4218 100644
--- a/cpan/CPAN-Meta/lib/CPAN/Meta/Feature.pm
+++ b/cpan/CPAN-Meta/lib/CPAN/Meta/Feature.pm
@@ -3,7 +3,7 @@ use strict;
use warnings;
package CPAN::Meta::Feature;
-our $VERSION = '2.150001';
+our $VERSION = '2.150005';
use CPAN::Meta::Prereqs;
@@ -67,8 +67,6 @@ sub prereqs { $_[0]{prereqs} }
# ABSTRACT: an optional feature provided by a CPAN distribution
-__END__
-
=pod
=encoding UTF-8
@@ -79,7 +77,7 @@ CPAN::Meta::Feature - an optional feature provided by a CPAN distribution
=head1 VERSION
-version 2.150001
+version 2.150005
=head1 DESCRIPTION
@@ -144,3 +142,8 @@ This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
+
+__END__
+
+
+# vim: ts=2 sts=2 sw=2 et :
diff --git a/cpan/CPAN-Meta/lib/CPAN/Meta/History.pm b/cpan/CPAN-Meta/lib/CPAN/Meta/History.pm
index 3d7e558519..f4cac5e59a 100644
--- a/cpan/CPAN-Meta/lib/CPAN/Meta/History.pm
+++ b/cpan/CPAN-Meta/lib/CPAN/Meta/History.pm
@@ -4,7 +4,7 @@ use strict;
use warnings;
package CPAN::Meta::History;
-our $VERSION = '2.150001';
+our $VERSION = '2.150005';
1;
@@ -22,7 +22,7 @@ CPAN::Meta::History - history of CPAN Meta Spec changes
=head1 VERSION
-version 2.150001
+version 2.150005
=head1 DESCRIPTION
diff --git a/cpan/CPAN-Meta/lib/CPAN/Meta/History/Meta_1_0.pod b/cpan/CPAN-Meta/lib/CPAN/Meta/History/Meta_1_0.pod
index 1052c3eb44..cd3bb9c3f6 100644
--- a/cpan/CPAN-Meta/lib/CPAN/Meta/History/Meta_1_0.pod
+++ b/cpan/CPAN-Meta/lib/CPAN/Meta/History/Meta_1_0.pod
@@ -7,7 +7,8 @@ CPAN::Meta::History::Meta_1_0 - Version 1.0 metadata specification for META.yml
=head1 PREFACE
This is a historical copy of the version 1.0 specification for F<META.yml>
-files, copyright by Ken Williams.
+files, copyright by Ken Williams and licensed under the same terms as Perl
+itself.
Modifications from the original:
diff --git a/cpan/CPAN-Meta/lib/CPAN/Meta/History/Meta_1_1.pod b/cpan/CPAN-Meta/lib/CPAN/Meta/History/Meta_1_1.pod
index 69f3411518..7b4b2f41ce 100644
--- a/cpan/CPAN-Meta/lib/CPAN/Meta/History/Meta_1_1.pod
+++ b/cpan/CPAN-Meta/lib/CPAN/Meta/History/Meta_1_1.pod
@@ -7,7 +7,8 @@ CPAN::Meta::History::Meta_1_1 - Version 1.1 metadata specification for META.yml
=head1 PREFACE
This is a historical copy of the version 1.1 specification for F<META.yml>
-files, copyright by Ken Williams.
+files, copyright by Ken Williams and licensed under the same terms as Perl
+itself.
Modifications from the original:
diff --git a/cpan/CPAN-Meta/lib/CPAN/Meta/History/Meta_1_2.pod b/cpan/CPAN-Meta/lib/CPAN/Meta/History/Meta_1_2.pod
index 69cd5bb586..48867b2b35 100644
--- a/cpan/CPAN-Meta/lib/CPAN/Meta/History/Meta_1_2.pod
+++ b/cpan/CPAN-Meta/lib/CPAN/Meta/History/Meta_1_2.pod
@@ -7,7 +7,8 @@ CPAN::Meta::History::Meta_1_2 - Version 1.2 metadata specification for META.yml
=head1 PREFACE
This is a historical copy of the version 1.2 specification for F<META.yml>
-files, copyright by Ken Williams.
+files, copyright by Ken Williams and licensed under the same terms as Perl
+itself.
Modifications from the original:
diff --git a/cpan/CPAN-Meta/lib/CPAN/Meta/History/Meta_1_3.pod b/cpan/CPAN-Meta/lib/CPAN/Meta/History/Meta_1_3.pod
index deff28dc82..b075adccde 100644
--- a/cpan/CPAN-Meta/lib/CPAN/Meta/History/Meta_1_3.pod
+++ b/cpan/CPAN-Meta/lib/CPAN/Meta/History/Meta_1_3.pod
@@ -7,7 +7,8 @@ CPAN::Meta::History::Meta_1_3 - Version 1.3 metadata specification for META.yml
=head1 PREFACE
This is a historical copy of the version 1.3 specification for F<META.yml>
-files, copyright by Ken Williams.
+files, copyright by Ken Williams and licensed under the same terms as Perl
+itself.
Modifications from the original:
diff --git a/cpan/CPAN-Meta/lib/CPAN/Meta/History/Meta_1_4.pod b/cpan/CPAN-Meta/lib/CPAN/Meta/History/Meta_1_4.pod
index a84fb3dd8a..471296ce29 100644
--- a/cpan/CPAN-Meta/lib/CPAN/Meta/History/Meta_1_4.pod
+++ b/cpan/CPAN-Meta/lib/CPAN/Meta/History/Meta_1_4.pod
@@ -7,7 +7,8 @@ CPAN::Meta::History::Meta_1_4 - Version 1.4 metadata specification for META.yml
=head1 PREFACE
This is a historical copy of the version 1.4 specification for F<META.yml>
-files, copyright by Ken Williams.
+files, copyright by Ken Williams and licensed under the same terms as Perl
+itself.
Modifications from the original:
diff --git a/cpan/CPAN-Meta/lib/CPAN/Meta/Merge.pm b/cpan/CPAN-Meta/lib/CPAN/Meta/Merge.pm
index f4c12869c4..05a18ea973 100644
--- a/cpan/CPAN-Meta/lib/CPAN/Meta/Merge.pm
+++ b/cpan/CPAN-Meta/lib/CPAN/Meta/Merge.pm
@@ -3,15 +3,24 @@ use warnings;
package CPAN::Meta::Merge;
-our $VERSION = '2.150001';
+our $VERSION = '2.150005';
use Carp qw/croak/;
use Scalar::Util qw/blessed/;
use CPAN::Meta::Converter 2.141170;
+sub _is_identical {
+ my ($left, $right) = @_;
+ return
+ (not defined $left and not defined $right)
+ # if either of these are references, we compare the serialized value
+ || (defined $left and defined $right and $left eq $right);
+}
+
sub _identical {
my ($left, $right, $path) = @_;
- croak sprintf "Can't merge attribute %s: '%s' does not equal '%s'", join('.', @{$path}), $left, $right unless $left eq $right;
+ croak sprintf "Can't merge attribute %s: '%s' does not equal '%s'", join('.', @{$path}), $left, $right
+ unless _is_identical($left, $right);
return $left;
}
@@ -50,6 +59,13 @@ sub _uniq_map {
if (not exists $left->{$key}) {
$left->{$key} = $right->{$key};
}
+ # identical strings or references are merged identically
+ elsif (_is_identical($left->{$key}, $right->{$key})) {
+ 1; # do nothing - keep left
+ }
+ elsif (ref $left->{$key} eq 'HASH' and ref $right->{$key} eq 'HASH') {
+ $left->{$key} = _uniq_map($left->{$key}, $right->{$key}, [ @{$path}, $key ]);
+ }
else {
croak 'Duplication of element ' . join '.', @{$path}, $key;
}
@@ -219,6 +235,9 @@ sub merge {
# ABSTRACT: Merging CPAN Meta fragments
+
+# vim: ts=2 sts=2 sw=2 et :
+
__END__
=pod
@@ -231,7 +250,7 @@ CPAN::Meta::Merge - Merging CPAN Meta fragments
=head1 VERSION
-version 2.150001
+version 2.150005
=head1 SYNOPSIS
diff --git a/cpan/CPAN-Meta/lib/CPAN/Meta/Prereqs.pm b/cpan/CPAN-Meta/lib/CPAN/Meta/Prereqs.pm
index 75035107f8..8a13eb13c8 100644
--- a/cpan/CPAN-Meta/lib/CPAN/Meta/Prereqs.pm
+++ b/cpan/CPAN-Meta/lib/CPAN/Meta/Prereqs.pm
@@ -3,7 +3,7 @@ use strict;
use warnings;
package CPAN::Meta::Prereqs;
-our $VERSION = '2.150001';
+our $VERSION = '2.150005';
#pod =head1 DESCRIPTION
#pod
@@ -163,7 +163,7 @@ sub with_merged_prereqs {
#pod
#pod my $new_reqs = $prereqs->merged_requirements( \@phases, \@types );
#pod my $new_reqs = $prereqs->merged_requirements( \@phases );
-#pod my $new_reqs = $preerqs->merged_requirements();
+#pod my $new_reqs = $prereqs->merged_requirements();
#pod
#pod This method joins together all requirements across a number of phases
#pod and types into a new L<CPAN::Meta::Requirements> object. If arguments
@@ -275,8 +275,6 @@ sub clone {
# ABSTRACT: a set of distribution prerequisites by phase and type
-__END__
-
=pod
=encoding UTF-8
@@ -287,7 +285,7 @@ CPAN::Meta::Prereqs - a set of distribution prerequisites by phase and type
=head1 VERSION
-version 2.150001
+version 2.150005
=head1 DESCRIPTION
@@ -353,7 +351,7 @@ will not alter them.
my $new_reqs = $prereqs->merged_requirements( \@phases, \@types );
my $new_reqs = $prereqs->merged_requirements( \@phases );
- my $new_reqs = $preerqs->merged_requirements();
+ my $new_reqs = $prereqs->merged_requirements();
This method joins together all requirements across a number of phases
and types into a new L<CPAN::Meta::Requirements> object. If arguments
@@ -417,3 +415,8 @@ This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
+
+__END__
+
+
+# vim: ts=2 sts=2 sw=2 et :
diff --git a/cpan/CPAN-Meta/lib/CPAN/Meta/Spec.pm b/cpan/CPAN-Meta/lib/CPAN/Meta/Spec.pm
index ec68f178ed..9056940b51 100644
--- a/cpan/CPAN-Meta/lib/CPAN/Meta/Spec.pm
+++ b/cpan/CPAN-Meta/lib/CPAN/Meta/Spec.pm
@@ -8,7 +8,7 @@ use strict;
use warnings;
package CPAN::Meta::Spec;
-our $VERSION = '2.150001';
+our $VERSION = '2.150005';
1;
@@ -29,7 +29,7 @@ CPAN::Meta::Spec - specification for CPAN distribution metadata
=head1 VERSION
-version 2.150001
+version 2.150005
=head1 SYNOPSIS
diff --git a/cpan/CPAN-Meta/lib/CPAN/Meta/Validator.pm b/cpan/CPAN-Meta/lib/CPAN/Meta/Validator.pm
index cc0409e6e4..eddaa10730 100644
--- a/cpan/CPAN-Meta/lib/CPAN/Meta/Validator.pm
+++ b/cpan/CPAN-Meta/lib/CPAN/Meta/Validator.pm
@@ -3,7 +3,7 @@ use strict;
use warnings;
package CPAN::Meta::Validator;
-our $VERSION = '2.150001';
+our $VERSION = '2.150005';
#pod =head1 SYNOPSIS
#pod
@@ -986,8 +986,6 @@ sub _error {
# ABSTRACT: validate CPAN distribution metadata structures
-__END__
-
=pod
=encoding UTF-8
@@ -998,7 +996,7 @@ CPAN::Meta::Validator - validate CPAN distribution metadata structures
=head1 VERSION
-version 2.150001
+version 2.150005
=head1 SYNOPSIS
@@ -1205,3 +1203,8 @@ This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
+
+__END__
+
+
+# vim: ts=2 sts=2 sw=2 et :