summaryrefslogtreecommitdiff
path: root/cpan
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2013-05-30 16:43:05 +0100
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2013-05-30 16:43:05 +0100
commita0831c789c50dc6b99cdf7105350e36292ac26fd (patch)
treea4101ab42ad101ba653625ad82af277dd3ed0da6 /cpan
parent1d06a9432846fff5390c0fb945a874297c1f76a4 (diff)
downloadperl-a0831c789c50dc6b99cdf7105350e36292ac26fd.tar.gz
Update CPAN-Meta to CPAN version 2.131490
[DELTA] 2.131490 2013-05-29 14:15:16 America/New_York [BUGFIX] - Downconversion of custom resources was not dropping the leading "x_". Now "x_MailingList" will downconvert correctly to "MailingList". [SPEC] - Per the Lancaster Consensus, the 'file' subkey of a package listed in 'provides' must refer to an actual file in the distribution, either the .pm file that provides the package or another file (*.PL) that generates it
Diffstat (limited to 'cpan')
-rw-r--r--cpan/CPAN-Meta/Changes14
-rw-r--r--cpan/CPAN-Meta/lib/CPAN/Meta.pm28
-rw-r--r--cpan/CPAN-Meta/lib/CPAN/Meta/Converter.pm36
-rw-r--r--cpan/CPAN-Meta/lib/CPAN/Meta/Feature.pm28
-rw-r--r--cpan/CPAN-Meta/lib/CPAN/Meta/History.pm28
-rw-r--r--cpan/CPAN-Meta/lib/CPAN/Meta/Prereqs.pm28
-rw-r--r--cpan/CPAN-Meta/lib/CPAN/Meta/Spec.pm41
-rw-r--r--cpan/CPAN-Meta/lib/CPAN/Meta/Validator.pm28
-rw-r--r--cpan/CPAN-Meta/t/converter.t16
9 files changed, 157 insertions, 90 deletions
diff --git a/cpan/CPAN-Meta/Changes b/cpan/CPAN-Meta/Changes
index 060dd89806..82c15c7a75 100644
--- a/cpan/CPAN-Meta/Changes
+++ b/cpan/CPAN-Meta/Changes
@@ -1,5 +1,19 @@
Revision history for CPAN-Meta
+2.131490 2013-05-29 14:15:16 America/New_York
+
+ [BUGFIX]
+
+ - Downconversion of custom resources was not dropping the leading "x_".
+ Now "x_MailingList" will downconvert correctly to "MailingList".
+
+ [SPEC]
+
+ - Per the Lancaster Consensus, the 'file' subkey of a package listed in
+ 'provides' must refer to an actual file in the distribution, either the
+ .pm file that provides the package or another file (*.PL) that
+ generates it
+
2.130880 2013-03-29 09:51:00 America/New_York
[BUGFIX]
diff --git a/cpan/CPAN-Meta/lib/CPAN/Meta.pm b/cpan/CPAN-Meta/lib/CPAN/Meta.pm
index 76ca474281..b6d65db369 100644
--- a/cpan/CPAN-Meta/lib/CPAN/Meta.pm
+++ b/cpan/CPAN-Meta/lib/CPAN/Meta.pm
@@ -2,7 +2,7 @@ use 5.006;
use strict;
use warnings;
package CPAN::Meta;
-our $VERSION = '2.130880'; # VERSION
+our $VERSION = '2.131490'; # VERSION
use Carp qw(carp croak);
@@ -348,7 +348,7 @@ CPAN::Meta - the distribution metadata for a CPAN dist
=head1 VERSION
-version 2.130880
+version 2.131490
=head1 SYNOPSIS
@@ -713,15 +713,7 @@ Ansgar Burchardt <ansgar@cpan.org>
=item *
-Michael G. Schwern <mschwern@cpan.org>
-
-=item *
-
-Randy Sims <randys@thepierianspring.org>
-
-=item *
-
-Ævar Arnfjörð Bjarmason <avar@cpan.org>
+Avar Arnfjord Bjarmason <avar@cpan.org>
=item *
@@ -749,7 +741,11 @@ Ken Williams <kwilliams@cpan.org>
=item *
-Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯 <daxim@cpan.org>
+Kenichi Ishigaki <ishigaki@cpan.org>
+
+=item *
+
+Lars Dieckow <daxim@cpan.org>
=item *
@@ -759,6 +755,14 @@ Leon Timmermans <leont@cpan.org>
Mark Fowler <markf@cpan.org>
+=item *
+
+Michael G. Schwern <mschwern@cpan.org>
+
+=item *
+
+Randy Sims <randys@thepierianspring.org>
+
=back
=head1 COPYRIGHT AND LICENSE
diff --git a/cpan/CPAN-Meta/lib/CPAN/Meta/Converter.pm b/cpan/CPAN-Meta/lib/CPAN/Meta/Converter.pm
index fc05d8e6a6..9e4d4a1260 100644
--- a/cpan/CPAN-Meta/lib/CPAN/Meta/Converter.pm
+++ b/cpan/CPAN-Meta/lib/CPAN/Meta/Converter.pm
@@ -2,7 +2,7 @@ use 5.006;
use strict;
use warnings;
package CPAN::Meta::Converter;
-our $VERSION = '2.130880'; # VERSION
+our $VERSION = '2.131490'; # VERSION
use CPAN::Meta::Validator;
@@ -80,6 +80,12 @@ sub _ucfirst_custom {
return $key;
}
+sub _no_prefix_ucfirst_custom {
+ my $key = shift;
+ $key =~ s/^x_//;
+ return _ucfirst_custom($key);
+}
+
sub _change_meta_spec {
my ($element, undef, undef, $version) = @_;
$element->{version} = $version;
@@ -653,7 +659,7 @@ my $resource_downgrade_spec = {
homepage => \&_url_or_drop,
bugtracker => sub { return $_[0]->{web} },
repository => sub { return $_[0]->{url} || $_[0]->{web} },
- ':custom' => \&_ucfirst_custom,
+ ':custom' => \&_no_prefix_ucfirst_custom,
};
sub _downgrade_resources {
@@ -1274,7 +1280,7 @@ CPAN::Meta::Converter - Convert CPAN distribution metadata structures
=head1 VERSION
-version 2.130880
+version 2.131490
=head1 SYNOPSIS
@@ -1392,15 +1398,7 @@ Ansgar Burchardt <ansgar@cpan.org>
=item *
-Michael G. Schwern <mschwern@cpan.org>
-
-=item *
-
-Randy Sims <randys@thepierianspring.org>
-
-=item *
-
-Ævar Arnfjörð Bjarmason <avar@cpan.org>
+Avar Arnfjord Bjarmason <avar@cpan.org>
=item *
@@ -1428,7 +1426,11 @@ Ken Williams <kwilliams@cpan.org>
=item *
-Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯 <daxim@cpan.org>
+Kenichi Ishigaki <ishigaki@cpan.org>
+
+=item *
+
+Lars Dieckow <daxim@cpan.org>
=item *
@@ -1438,6 +1440,14 @@ Leon Timmermans <leont@cpan.org>
Mark Fowler <markf@cpan.org>
+=item *
+
+Michael G. Schwern <mschwern@cpan.org>
+
+=item *
+
+Randy Sims <randys@thepierianspring.org>
+
=back
=head1 COPYRIGHT AND LICENSE
diff --git a/cpan/CPAN-Meta/lib/CPAN/Meta/Feature.pm b/cpan/CPAN-Meta/lib/CPAN/Meta/Feature.pm
index 1960f482f9..e87e4f6c6f 100644
--- a/cpan/CPAN-Meta/lib/CPAN/Meta/Feature.pm
+++ b/cpan/CPAN-Meta/lib/CPAN/Meta/Feature.pm
@@ -2,7 +2,7 @@ use 5.006;
use strict;
use warnings;
package CPAN::Meta::Feature;
-our $VERSION = '2.130880'; # VERSION
+our $VERSION = '2.131490'; # VERSION
use CPAN::Meta::Prereqs;
@@ -44,7 +44,7 @@ CPAN::Meta::Feature - an optional feature provided by a CPAN distribution
=head1 VERSION
-version 2.130880
+version 2.131490
=head1 DESCRIPTION
@@ -111,15 +111,7 @@ Ansgar Burchardt <ansgar@cpan.org>
=item *
-Michael G. Schwern <mschwern@cpan.org>
-
-=item *
-
-Randy Sims <randys@thepierianspring.org>
-
-=item *
-
-Ævar Arnfjörð Bjarmason <avar@cpan.org>
+Avar Arnfjord Bjarmason <avar@cpan.org>
=item *
@@ -147,7 +139,11 @@ Ken Williams <kwilliams@cpan.org>
=item *
-Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯 <daxim@cpan.org>
+Kenichi Ishigaki <ishigaki@cpan.org>
+
+=item *
+
+Lars Dieckow <daxim@cpan.org>
=item *
@@ -157,6 +153,14 @@ Leon Timmermans <leont@cpan.org>
Mark Fowler <markf@cpan.org>
+=item *
+
+Michael G. Schwern <mschwern@cpan.org>
+
+=item *
+
+Randy Sims <randys@thepierianspring.org>
+
=back
=head1 COPYRIGHT AND LICENSE
diff --git a/cpan/CPAN-Meta/lib/CPAN/Meta/History.pm b/cpan/CPAN-Meta/lib/CPAN/Meta/History.pm
index b793884620..8000e83607 100644
--- a/cpan/CPAN-Meta/lib/CPAN/Meta/History.pm
+++ b/cpan/CPAN-Meta/lib/CPAN/Meta/History.pm
@@ -3,7 +3,7 @@ use 5.006;
use strict;
use warnings;
package CPAN::Meta::History;
-our $VERSION = '2.130880'; # VERSION
+our $VERSION = '2.131490'; # VERSION
1;
@@ -21,7 +21,7 @@ CPAN::Meta::History - history of CPAN Meta Spec changes
=head1 VERSION
-version 2.130880
+version 2.131490
=head1 DESCRIPTION
@@ -315,15 +315,7 @@ Ansgar Burchardt <ansgar@cpan.org>
=item *
-Michael G. Schwern <mschwern@cpan.org>
-
-=item *
-
-Randy Sims <randys@thepierianspring.org>
-
-=item *
-
-Ævar Arnfjörð Bjarmason <avar@cpan.org>
+Avar Arnfjord Bjarmason <avar@cpan.org>
=item *
@@ -351,7 +343,11 @@ Ken Williams <kwilliams@cpan.org>
=item *
-Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯 <daxim@cpan.org>
+Kenichi Ishigaki <ishigaki@cpan.org>
+
+=item *
+
+Lars Dieckow <daxim@cpan.org>
=item *
@@ -361,6 +357,14 @@ Leon Timmermans <leont@cpan.org>
Mark Fowler <markf@cpan.org>
+=item *
+
+Michael G. Schwern <mschwern@cpan.org>
+
+=item *
+
+Randy Sims <randys@thepierianspring.org>
+
=back
=head1 COPYRIGHT AND LICENSE
diff --git a/cpan/CPAN-Meta/lib/CPAN/Meta/Prereqs.pm b/cpan/CPAN-Meta/lib/CPAN/Meta/Prereqs.pm
index f5fca200a2..65909587f3 100644
--- a/cpan/CPAN-Meta/lib/CPAN/Meta/Prereqs.pm
+++ b/cpan/CPAN-Meta/lib/CPAN/Meta/Prereqs.pm
@@ -2,7 +2,7 @@ use 5.006;
use strict;
use warnings;
package CPAN::Meta::Prereqs;
-our $VERSION = '2.130880'; # VERSION
+our $VERSION = '2.131490'; # VERSION
use Carp qw(confess);
@@ -151,7 +151,7 @@ CPAN::Meta::Prereqs - a set of distribution prerequisites by phase and type
=head1 VERSION
-version 2.130880
+version 2.131490
=head1 DESCRIPTION
@@ -272,15 +272,7 @@ Ansgar Burchardt <ansgar@cpan.org>
=item *
-Michael G. Schwern <mschwern@cpan.org>
-
-=item *
-
-Randy Sims <randys@thepierianspring.org>
-
-=item *
-
-Ævar Arnfjörð Bjarmason <avar@cpan.org>
+Avar Arnfjord Bjarmason <avar@cpan.org>
=item *
@@ -308,7 +300,11 @@ Ken Williams <kwilliams@cpan.org>
=item *
-Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯 <daxim@cpan.org>
+Kenichi Ishigaki <ishigaki@cpan.org>
+
+=item *
+
+Lars Dieckow <daxim@cpan.org>
=item *
@@ -318,6 +314,14 @@ Leon Timmermans <leont@cpan.org>
Mark Fowler <markf@cpan.org>
+=item *
+
+Michael G. Schwern <mschwern@cpan.org>
+
+=item *
+
+Randy Sims <randys@thepierianspring.org>
+
=back
=head1 COPYRIGHT AND LICENSE
diff --git a/cpan/CPAN-Meta/lib/CPAN/Meta/Spec.pm b/cpan/CPAN-Meta/lib/CPAN/Meta/Spec.pm
index a7397cd988..35d045a0fd 100644
--- a/cpan/CPAN-Meta/lib/CPAN/Meta/Spec.pm
+++ b/cpan/CPAN-Meta/lib/CPAN/Meta/Spec.pm
@@ -3,7 +3,7 @@ use 5.006;
use strict;
use warnings;
package CPAN::Meta::Spec;
-our $VERSION = '2.130880'; # VERSION
+our $VERSION = '2.131490'; # VERSION
1;
@@ -21,7 +21,7 @@ CPAN::Meta::Spec - specification for CPAN distribution metadata
=head1 VERSION
-version 2.130880
+version 2.131490
=head1 SYNOPSIS
@@ -659,19 +659,22 @@ PAUSE, CPAN, and search.cpan.org to build indexes saying in which
distribution various packages can be found.
The keys of C<provides> are package names that can be found within
-the distribution. The values are Maps with the following valid subkeys:
+the distribution. If a package name key is provided, it must
+have a Map with the following valid subkeys:
=over
=item file
-This field is required. The value must contain a Unix-style relative
-file path from the root of the distribution to the module containing the
-package.
+This field is required. It must contain a Unix-style relative file path
+from the root of the distribution directory to a file that contains or
+generates the package.
=item version
-This field contains a I<Version> String for the package, if one exists.
+If it exists, this field must contains a I<Version> String for the
+package. If the package does not have a C<$VERSION>, this field must
+be omitted.
=back
@@ -1147,15 +1150,7 @@ Ansgar Burchardt <ansgar@cpan.org>
=item *
-Michael G. Schwern <mschwern@cpan.org>
-
-=item *
-
-Randy Sims <randys@thepierianspring.org>
-
-=item *
-
-Ævar Arnfjörð Bjarmason <avar@cpan.org>
+Avar Arnfjord Bjarmason <avar@cpan.org>
=item *
@@ -1183,7 +1178,11 @@ Ken Williams <kwilliams@cpan.org>
=item *
-Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯 <daxim@cpan.org>
+Kenichi Ishigaki <ishigaki@cpan.org>
+
+=item *
+
+Lars Dieckow <daxim@cpan.org>
=item *
@@ -1193,6 +1192,14 @@ Leon Timmermans <leont@cpan.org>
Mark Fowler <markf@cpan.org>
+=item *
+
+Michael G. Schwern <mschwern@cpan.org>
+
+=item *
+
+Randy Sims <randys@thepierianspring.org>
+
=back
=head1 COPYRIGHT AND LICENSE
diff --git a/cpan/CPAN-Meta/lib/CPAN/Meta/Validator.pm b/cpan/CPAN-Meta/lib/CPAN/Meta/Validator.pm
index 264658fdd9..d5b502c6e1 100644
--- a/cpan/CPAN-Meta/lib/CPAN/Meta/Validator.pm
+++ b/cpan/CPAN-Meta/lib/CPAN/Meta/Validator.pm
@@ -2,7 +2,7 @@ use 5.006;
use strict;
use warnings;
package CPAN::Meta::Validator;
-our $VERSION = '2.130880'; # VERSION
+our $VERSION = '2.131490'; # VERSION
#--------------------------------------------------------------------------#
@@ -840,7 +840,7 @@ CPAN::Meta::Validator - validate CPAN distribution metadata structures
=head1 VERSION
-version 2.130880
+version 2.131490
=head1 SYNOPSIS
@@ -1053,15 +1053,7 @@ Ansgar Burchardt <ansgar@cpan.org>
=item *
-Michael G. Schwern <mschwern@cpan.org>
-
-=item *
-
-Randy Sims <randys@thepierianspring.org>
-
-=item *
-
-Ævar Arnfjörð Bjarmason <avar@cpan.org>
+Avar Arnfjord Bjarmason <avar@cpan.org>
=item *
@@ -1089,7 +1081,11 @@ Ken Williams <kwilliams@cpan.org>
=item *
-Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯 <daxim@cpan.org>
+Kenichi Ishigaki <ishigaki@cpan.org>
+
+=item *
+
+Lars Dieckow <daxim@cpan.org>
=item *
@@ -1099,6 +1095,14 @@ Leon Timmermans <leont@cpan.org>
Mark Fowler <markf@cpan.org>
+=item *
+
+Michael G. Schwern <mschwern@cpan.org>
+
+=item *
+
+Randy Sims <randys@thepierianspring.org>
+
=back
=head1 COPYRIGHT AND LICENSE
diff --git a/cpan/CPAN-Meta/t/converter.t b/cpan/CPAN-Meta/t/converter.t
index 30fe9b3314..a5a55a23f7 100644
--- a/cpan/CPAN-Meta/t/converter.t
+++ b/cpan/CPAN-Meta/t/converter.t
@@ -166,6 +166,22 @@ for my $f ( reverse sort @files ) {
);
}
+# specific test for round-tripping resources
+{
+ my $path = File::Spec->catfile('t','data','resources.yml');
+ my $original = Parse::CPAN::Meta->load_file( $path );
+ ok( $original, "loaded resources.yml" );
+ my $cmc1 = CPAN::Meta::Converter->new( $original );
+ my $converted = $cmc1->convert( version => 2 );
+ my $cmc2 = CPAN::Meta::Converter->new( $converted );
+ my $roundtrip = $cmc2->convert( version => 1.4 );
+ is_deeply(
+ $roundtrip->{resources},
+ $original->{resources},
+ "round-trip of resources (1.4->2->1.4)"
+ );
+}
+
# specific test for object conversion
{
my $path = File::Spec->catfile('t','data','resources.yml');