summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MANIFEST12
-rwxr-xr-xPorting/Maintainers.pl2
-rw-r--r--cpan/Parse-CPAN-Meta/corpus/BadMETA.yml (renamed from cpan/Parse-CPAN-Meta/t/data/BadMETA.yml)0
-rw-r--r--cpan/Parse-CPAN-Meta/corpus/META-VR.json (renamed from cpan/Parse-CPAN-Meta/t/data/META-VR.json)0
-rw-r--r--cpan/Parse-CPAN-Meta/corpus/META-VR.yml (renamed from cpan/Parse-CPAN-Meta/t/data/META-VR.yml)0
-rw-r--r--cpan/Parse-CPAN-Meta/corpus/bareyaml.meta (renamed from cpan/Parse-CPAN-Meta/t/data/bareyaml.meta)0
-rw-r--r--cpan/Parse-CPAN-Meta/corpus/json.meta (renamed from cpan/Parse-CPAN-Meta/t/data/json.meta)0
-rw-r--r--cpan/Parse-CPAN-Meta/corpus/yaml.meta (renamed from cpan/Parse-CPAN-Meta/t/data/yaml.meta)0
-rw-r--r--cpan/Parse-CPAN-Meta/lib/Parse/CPAN/Meta.pm19
-rw-r--r--cpan/Parse-CPAN-Meta/t/02_api.t33
-rw-r--r--cpan/Parse-CPAN-Meta/t/lib/Parse/CPAN/Meta/Test.pm2
11 files changed, 46 insertions, 22 deletions
diff --git a/MANIFEST b/MANIFEST
index 8b4aefcc6d..7122981350 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1697,17 +1697,17 @@ cpan/parent/t/parent-classfromfile.t tests for parent.pm
cpan/parent/t/parent-pmc.t tests for parent.pm
cpan/parent/t/parent-returns-false.t tests for parent.pm
cpan/parent/t/parent.t tests for parent.pm
+cpan/Parse-CPAN-Meta/corpus/BadMETA.yml
+cpan/Parse-CPAN-Meta/corpus/bareyaml.meta
+cpan/Parse-CPAN-Meta/corpus/json.meta
+cpan/Parse-CPAN-Meta/corpus/META-VR.json
+cpan/Parse-CPAN-Meta/corpus/META-VR.yml
+cpan/Parse-CPAN-Meta/corpus/yaml.meta
cpan/Parse-CPAN-Meta/lib/Parse/CPAN/Meta.pm
cpan/Parse-CPAN-Meta/t/02_api.t
cpan/Parse-CPAN-Meta/t/03_functions.t
cpan/Parse-CPAN-Meta/t/04_export.t
cpan/Parse-CPAN-Meta/t/05_errors.t
-cpan/Parse-CPAN-Meta/t/data/BadMETA.yml
-cpan/Parse-CPAN-Meta/t/data/bareyaml.meta
-cpan/Parse-CPAN-Meta/t/data/json.meta
-cpan/Parse-CPAN-Meta/t/data/META-VR.json
-cpan/Parse-CPAN-Meta/t/data/META-VR.yml
-cpan/Parse-CPAN-Meta/t/data/yaml.meta
cpan/Parse-CPAN-Meta/t/lib/Parse/CPAN/Meta/Test.pm
cpan/perlfaq/lib/perlfaq1.pod General Questions About Perl
cpan/perlfaq/lib/perlfaq2.pod Obtaining and Learning about Perl
diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index 1f42462710..bccc88a79e 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -874,7 +874,7 @@ use File::Glob qw(:case);
},
'Parse::CPAN::Meta' => {
- 'DISTRIBUTION' => 'DAGOLDEN/Parse-CPAN-Meta-1.4414.tar.gz',
+ 'DISTRIBUTION' => 'DAGOLDEN/Parse-CPAN-Meta-1.4417.tar.gz',
'FILES' => q[cpan/Parse-CPAN-Meta],
'EXCLUDED' => [
qw[t/00-report-prereqs.t],
diff --git a/cpan/Parse-CPAN-Meta/t/data/BadMETA.yml b/cpan/Parse-CPAN-Meta/corpus/BadMETA.yml
index 79fece368c..79fece368c 100644
--- a/cpan/Parse-CPAN-Meta/t/data/BadMETA.yml
+++ b/cpan/Parse-CPAN-Meta/corpus/BadMETA.yml
diff --git a/cpan/Parse-CPAN-Meta/t/data/META-VR.json b/cpan/Parse-CPAN-Meta/corpus/META-VR.json
index fbe9eca82f..fbe9eca82f 100644
--- a/cpan/Parse-CPAN-Meta/t/data/META-VR.json
+++ b/cpan/Parse-CPAN-Meta/corpus/META-VR.json
diff --git a/cpan/Parse-CPAN-Meta/t/data/META-VR.yml b/cpan/Parse-CPAN-Meta/corpus/META-VR.yml
index 56d50ddc3d..56d50ddc3d 100644
--- a/cpan/Parse-CPAN-Meta/t/data/META-VR.yml
+++ b/cpan/Parse-CPAN-Meta/corpus/META-VR.yml
diff --git a/cpan/Parse-CPAN-Meta/t/data/bareyaml.meta b/cpan/Parse-CPAN-Meta/corpus/bareyaml.meta
index 7e4f430b9c..7e4f430b9c 100644
--- a/cpan/Parse-CPAN-Meta/t/data/bareyaml.meta
+++ b/cpan/Parse-CPAN-Meta/corpus/bareyaml.meta
diff --git a/cpan/Parse-CPAN-Meta/t/data/json.meta b/cpan/Parse-CPAN-Meta/corpus/json.meta
index fbe9eca82f..fbe9eca82f 100644
--- a/cpan/Parse-CPAN-Meta/t/data/json.meta
+++ b/cpan/Parse-CPAN-Meta/corpus/json.meta
diff --git a/cpan/Parse-CPAN-Meta/t/data/yaml.meta b/cpan/Parse-CPAN-Meta/corpus/yaml.meta
index 56d50ddc3d..56d50ddc3d 100644
--- a/cpan/Parse-CPAN-Meta/t/data/yaml.meta
+++ b/cpan/Parse-CPAN-Meta/corpus/yaml.meta
diff --git a/cpan/Parse-CPAN-Meta/lib/Parse/CPAN/Meta.pm b/cpan/Parse-CPAN-Meta/lib/Parse/CPAN/Meta.pm
index 7888d1c3cb..77a0764772 100644
--- a/cpan/Parse-CPAN-Meta/lib/Parse/CPAN/Meta.pm
+++ b/cpan/Parse-CPAN-Meta/lib/Parse/CPAN/Meta.pm
@@ -2,7 +2,8 @@ use 5.008001;
use strict;
package Parse::CPAN::Meta;
# ABSTRACT: Parse META.yml and META.json CPAN metadata files
-our $VERSION = '1.4414'; # VERSION
+
+our $VERSION = '1.4417';
use Exporter;
use Carp 'croak';
@@ -110,12 +111,12 @@ sub _can_load {
# Kept for backwards compatibility only
# Create an object from a file
-sub LoadFile ($) {
+sub LoadFile ($) { ## no critic
return Load(_slurp(shift));
}
# Parse a document from a string.
-sub Load ($) {
+sub Load ($) { ## no critic
require CPAN::Meta::YAML;
my $object = eval { CPAN::Meta::YAML::Load(shift) };
croak $@ if $@;
@@ -136,7 +137,7 @@ Parse::CPAN::Meta - Parse META.yml and META.json CPAN metadata files
=head1 VERSION
-version 1.4414
+version 1.4417
=head1 SYNOPSIS
@@ -283,7 +284,7 @@ will be thrown.
=head2 Bugs / Feature Requests
Please report any bugs or feature requests through the issue tracker
-at L<http://rt.cpan.org/Public/Dist/Display.html?Name=Parse-CPAN-Meta>.
+at L<https://github.com/Perl-Toolchain-Gang/Parse-CPAN-Meta/issues>.
You will be notified automatically of any progress on your issue.
=head2 Source Code
@@ -311,6 +312,8 @@ David Golden <dagolden@cpan.org>
=head1 CONTRIBUTORS
+=for stopwords Graham Knop Joshua ben Jore Karen Etheridge Neil Bowers Ricardo Signes Steffen Mueller
+
=over 4
=item *
@@ -323,6 +326,10 @@ Joshua ben Jore <jjore@cpan.org>
=item *
+Karen Etheridge <ether@cpan.org>
+
+=item *
+
Neil Bowers <neil@bowers.com>
=item *
@@ -337,7 +344,7 @@ Steffen Mueller <smueller@cpan.org>
=head1 COPYRIGHT AND LICENSE
-This software is copyright (c) 2014 by Adam Kennedy and Contributors.
+This software is copyright (c) 2015 by Adam Kennedy and Contributors.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
diff --git a/cpan/Parse-CPAN-Meta/t/02_api.t b/cpan/Parse-CPAN-Meta/t/02_api.t
index 72bfccf67f..5f94bc74fa 100644
--- a/cpan/Parse-CPAN-Meta/t/02_api.t
+++ b/cpan/Parse-CPAN-Meta/t/02_api.t
@@ -54,12 +54,13 @@ my $meta_yaml = catfile( test_data_directory(), 'META-VR.yml' );
my $yaml_meta = catfile( test_data_directory(), 'yaml.meta' );
my $json_meta = catfile( test_data_directory(), 'json.meta' );
my $bare_yaml_meta = catfile( test_data_directory(), 'bareyaml.meta' );
+my $bad_yaml_meta = catfile( test_data_directory(), 'BadMETA.yml' );
### YAML tests
{
local $ENV{PERL_YAML_BACKEND}; # ensure we get CPAN::META::YAML
- is(Parse::CPAN::Meta->yaml_backend(), 'CPAN::Meta::YAML', 'yaml_backend()');
+ is(Parse::CPAN::Meta->yaml_backend(), 'CPAN::Meta::YAML', 'yaml_backend(): CPAN::Meta::YAML');
my $from_yaml = Parse::CPAN::Meta->load_file( $meta_yaml );
is_deeply($from_yaml, $want, "load from YAML file results in expected data");
}
@@ -67,7 +68,8 @@ my $bare_yaml_meta = catfile( test_data_directory(), 'bareyaml.meta' );
{
local $ENV{PERL_YAML_BACKEND}; # ensure we get CPAN::META::YAML
- is(Parse::CPAN::Meta->yaml_backend(), 'CPAN::Meta::YAML', 'yaml_backend()');
+ note '';
+ is(Parse::CPAN::Meta->yaml_backend(), 'CPAN::Meta::YAML', 'yaml_backend(): CPAN::Meta::YAML');
my $from_yaml = Parse::CPAN::Meta->load_file( $yaml_meta );
is_deeply($from_yaml, $want, "load from YAML .meta file results in expected data");
}
@@ -75,7 +77,8 @@ my $bare_yaml_meta = catfile( test_data_directory(), 'bareyaml.meta' );
{
local $ENV{PERL_YAML_BACKEND}; # ensure we get CPAN::META::YAML
- is(Parse::CPAN::Meta->yaml_backend(), 'CPAN::Meta::YAML', 'yaml_backend()');
+ note '';
+ is(Parse::CPAN::Meta->yaml_backend(), 'CPAN::Meta::YAML', 'yaml_backend(): CPAN::Meta::YAML');
my $from_yaml = Parse::CPAN::Meta->load_file( $bare_yaml_meta );
is_deeply($from_yaml, $want, "load from bare YAML .meta file results in expected data");
}
@@ -83,6 +86,8 @@ my $bare_yaml_meta = catfile( test_data_directory(), 'bareyaml.meta' );
{
local $ENV{PERL_YAML_BACKEND}; # ensure we get CPAN::META::YAML
+ note '';
+ is(Parse::CPAN::Meta->yaml_backend(), 'CPAN::Meta::YAML', 'yaml_backend(): CPAN::Meta::YAML');
my $yaml = load_ok( 'META-VR.yml', $meta_yaml, 100);
my $from_yaml = Parse::CPAN::Meta->load_yaml_string( $yaml );
is_deeply($from_yaml, $want, "load from YAML str results in expected data");
@@ -91,17 +96,20 @@ my $bare_yaml_meta = catfile( test_data_directory(), 'bareyaml.meta' );
{
local $ENV{PERL_YAML_BACKEND}; # ensure we get CPAN::META::YAML
- my @yaml = Parse::CPAN::Meta::LoadFile( 't/data/BadMETA.yml' );
+ note '';
+ is(Parse::CPAN::Meta->yaml_backend(), 'CPAN::Meta::YAML', 'yaml_backend(): CPAN::Meta::YAML');
+ my @yaml = Parse::CPAN::Meta::LoadFile( $bad_yaml_meta );
is($yaml[0]{author}[0], 'Olivier Mengu\xE9', "Bad UTF-8 is replaced");
}
SKIP: {
+ note '';
skip "YAML module not installed", 2
unless eval "require YAML; 1";
local $ENV{PERL_YAML_BACKEND} = 'YAML';
- is(Parse::CPAN::Meta->yaml_backend(), 'YAML', 'yaml_backend()');
+ is(Parse::CPAN::Meta->yaml_backend(), 'YAML', 'yaml_backend(): YAML');
my $yaml = load_ok( 'META-VR.yml', $meta_yaml, 100);
my $from_yaml = Parse::CPAN::Meta->load_yaml_string( $yaml );
is_deeply($from_yaml, $want, "load_yaml_string using PERL_YAML_BACKEND");
@@ -112,7 +120,8 @@ SKIP: {
# JSON tests with JSON::PP
local $ENV{PERL_JSON_BACKEND}; # ensure we get JSON::PP
- is(Parse::CPAN::Meta->json_backend(), 'JSON::PP', 'json_backend()');
+ note '';
+ is(Parse::CPAN::Meta->json_backend(), 'JSON::PP', 'json_backend(): JSON::PP');
my $from_json = Parse::CPAN::Meta->load_file( $meta_json );
is_deeply($from_json, $want, "load from JSON file results in expected data");
}
@@ -121,7 +130,8 @@ SKIP: {
# JSON tests with JSON::PP
local $ENV{PERL_JSON_BACKEND}; # ensure we get JSON::PP
- is(Parse::CPAN::Meta->json_backend(), 'JSON::PP', 'json_backend()');
+ note '';
+ is(Parse::CPAN::Meta->json_backend(), 'JSON::PP', 'json_backend(): JSON::PP');
my $from_json = Parse::CPAN::Meta->load_file( $json_meta );
is_deeply($from_json, $want, "load from JSON .meta file results in expected data");
}
@@ -130,6 +140,8 @@ SKIP: {
# JSON tests with JSON::PP
local $ENV{PERL_JSON_BACKEND}; # ensure we get JSON::PP
+ note '';
+ is(Parse::CPAN::Meta->json_backend(), 'JSON::PP', 'json_backend(): JSON::PP');
my $json = load_ok( 'META-VR.json', $meta_json, 100);
my $from_json = Parse::CPAN::Meta->load_json_string( $json );
is_deeply($from_json, $want, "load from JSON str results in expected data");
@@ -139,6 +151,8 @@ SKIP: {
# JSON tests with JSON::PP, take 2
local $ENV{PERL_JSON_BACKEND} = 0; # request JSON::PP
+ note '';
+ is(Parse::CPAN::Meta->json_backend(), 'JSON::PP', 'json_backend(): JSON::PP');
my $json = load_ok( 'META-VR.json', $meta_json, 100);
my $from_json = Parse::CPAN::Meta->load_json_string( $json );
is_deeply($from_json, $want, "load_json_string with PERL_JSON_BACKEND = 0");
@@ -148,17 +162,20 @@ SKIP: {
# JSON tests with JSON::PP, take 3
local $ENV{PERL_JSON_BACKEND} = 'JSON::PP'; # request JSON::PP
+ note '';
+ is(Parse::CPAN::Meta->json_backend(), 'JSON::PP', 'json_backend(): JSON::PP');
my $json = load_ok( 'META-VR.json', $meta_json, 100);
my $from_json = Parse::CPAN::Meta->load_json_string( $json );
is_deeply($from_json, $want, "load_json_string with PERL_JSON_BACKEND = 'JSON::PP'");
}
SKIP: {
+ note '';
skip "JSON module version 2.5 not installed", 2
unless eval "require JSON; JSON->VERSION(2.5); 1";
local $ENV{PERL_JSON_BACKEND} = 1;
- is(Parse::CPAN::Meta->json_backend(), 'JSON', 'json_backend()');
+ is(Parse::CPAN::Meta->json_backend(), 'JSON', 'json_backend(): JSON');
my $json = load_ok( 'META-VR.json', $meta_json, 100);
my $from_json = Parse::CPAN::Meta->load_json_string( $json );
is_deeply($from_json, $want, "load_json_string with PERL_JSON_BACKEND = 1");
diff --git a/cpan/Parse-CPAN-Meta/t/lib/Parse/CPAN/Meta/Test.pm b/cpan/Parse-CPAN-Meta/t/lib/Parse/CPAN/Meta/Test.pm
index 46024db5d7..b6bb4f7455 100644
--- a/cpan/Parse-CPAN-Meta/t/lib/Parse/CPAN/Meta/Test.pm
+++ b/cpan/Parse-CPAN-Meta/t/lib/Parse/CPAN/Meta/Test.pm
@@ -16,7 +16,7 @@ BEGIN {
}
sub test_data_directory {
- return( File::Spec->catdir(qw(t data)) );
+ return( "corpus" );
}
# 22 tests per call to yaml_ok