diff options
author | Chris 'BinGOs' Williams <chris@bingosnet.co.uk> | 2013-07-18 12:30:07 +0100 |
---|---|---|
committer | Chris 'BinGOs' Williams <chris@bingosnet.co.uk> | 2013-07-18 12:30:07 +0100 |
commit | 342e471005ed70e116b7424940356bf271a058c9 (patch) | |
tree | a8a9efc68b5324584409a1e096784ec2bfe7faa3 | |
parent | dd686e5619f8ad9e1e46ec0e80539edbcb73c8ea (diff) | |
download | perl-342e471005ed70e116b7424940356bf271a058c9.tar.gz |
Update Parse-CPAN-Meta to CPAN version 1.4405
[DELTA]
1.4405 2013-07-17 21:43:34 America/New_York
- Fixed incorrect "return ... or die ..." constructs
- Converted distribution to Dist::Zilla management
- Noted new repository location in the Github Perl-Toolchain-Gang
organization
-rw-r--r-- | MANIFEST | 5 | ||||
-rwxr-xr-x | Porting/Maintainers.pl | 7 | ||||
-rw-r--r-- | cpan/Parse-CPAN-Meta/Changes | 6 | ||||
-rw-r--r-- | cpan/Parse-CPAN-Meta/lib/Parse/CPAN/Meta.pm | 71 | ||||
-rw-r--r-- | cpan/Parse-CPAN-Meta/t/01_compile.t | 30 | ||||
-rw-r--r-- | cpan/Parse-CPAN-Meta/t/02_api.t | 16 | ||||
-rw-r--r-- | cpan/Parse-CPAN-Meta/t/data/META-VR.json (renamed from cpan/Parse-CPAN-Meta/t/data/VR-META.json) | 0 | ||||
-rw-r--r-- | cpan/Parse-CPAN-Meta/t/data/META-VR.yml (renamed from cpan/Parse-CPAN-Meta/t/data/VR-META.yml) | 0 |
8 files changed, 79 insertions, 56 deletions
@@ -1710,13 +1710,12 @@ cpan/parent/t/parent-returns-false.t tests for parent.pm cpan/parent/t/parent.t tests for parent.pm cpan/Parse-CPAN-Meta/Changes cpan/Parse-CPAN-Meta/lib/Parse/CPAN/Meta.pm -cpan/Parse-CPAN-Meta/t/01_compile.t 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/VR-META.json -cpan/Parse-CPAN-Meta/t/data/VR-META.yml +cpan/Parse-CPAN-Meta/t/data/META-VR.json +cpan/Parse-CPAN-Meta/t/data/META-VR.yml 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 084d72e04c..c852804f2c 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -1309,8 +1309,13 @@ use File::Glob qw(:case); 'Parse::CPAN::Meta' => { 'MAINTAINER' => 'dagolden', - 'DISTRIBUTION' => 'DAGOLDEN/Parse-CPAN-Meta-1.4404.tar.gz', + 'DISTRIBUTION' => 'DAGOLDEN/Parse-CPAN-Meta-1.4405.tar.gz', 'FILES' => q[cpan/Parse-CPAN-Meta], + 'EXCLUDED' => [ + qw(t/00-compile.t), + qw[t/00-report-prereqs.t], + qr{^xt}, + ], 'UPSTREAM' => 'cpan', }, diff --git a/cpan/Parse-CPAN-Meta/Changes b/cpan/Parse-CPAN-Meta/Changes index 90f11dbfe2..1a66352aeb 100644 --- a/cpan/Parse-CPAN-Meta/Changes +++ b/cpan/Parse-CPAN-Meta/Changes @@ -1,5 +1,11 @@ Changes for Perl programming language extension Parse-CPAN-Meta +1.4405 2013-07-17 21:43:34 America/New_York + - Fixed incorrect "return ... or die ..." constructs + - Converted distribution to Dist::Zilla management + - Noted new repository location in the Github Perl-Toolchain-Gang + organization + 1.4404 Sun Apr 05 2012 - Protected tests from user PERL_YAML/JSON_BACKEND diff --git a/cpan/Parse-CPAN-Meta/lib/Parse/CPAN/Meta.pm b/cpan/Parse-CPAN-Meta/lib/Parse/CPAN/Meta.pm index 4a7d097757..530924f013 100644 --- a/cpan/Parse-CPAN-Meta/lib/Parse/CPAN/Meta.pm +++ b/cpan/Parse-CPAN-Meta/lib/Parse/CPAN/Meta.pm @@ -1,6 +1,8 @@ +use strict; package Parse::CPAN::Meta; +# ABSTRACT: Parse META.yml and META.json CPAN metadata files +our $VERSION = '1.4405'; # VERSION -use strict; use Carp 'croak'; # UTF Support? @@ -17,7 +19,6 @@ BEGIN { # Class structure require 5.004; require Exporter; - $Parse::CPAN::Meta::VERSION = '1.4404'; @Parse::CPAN::Meta::ISA = qw{ Exporter }; @Parse::CPAN::Meta::EXPORT_OK = qw{ Load LoadFile }; } @@ -108,15 +109,17 @@ sub _can_load { # Create an object from a file sub LoadFile ($) { require CPAN::Meta::YAML; - return CPAN::Meta::YAML::LoadFile(shift) + my $object = CPAN::Meta::YAML::LoadFile(shift) or die CPAN::Meta::YAML->errstr; + return $object; } # Parse a document from a string. sub Load ($) { require CPAN::Meta::YAML; - return CPAN::Meta::YAML::Load(shift) + my $object = CPAN::Meta::YAML::Load(shift) or die CPAN::Meta::YAML->errstr; + return $object; } 1; @@ -125,10 +128,16 @@ __END__ =pod +=encoding utf-8 + =head1 NAME Parse::CPAN::Meta - Parse META.yml and META.json CPAN metadata files +=head1 VERSION + +version 1.4405 + =head1 SYNOPSIS ############################################# @@ -171,6 +180,8 @@ All error reporting is done with exceptions (die'ing). Note that META files are expected to be in UTF-8 encoding, only. When converted string data, it must first be decoded from UTF-8. +=for Pod::Coverage HAVE_UTF8 IO_LAYER + =head1 METHODS =head2 load_file @@ -248,29 +259,61 @@ old, an exception will be thrown. =head2 PERL_YAML_BACKEND By default, L<CPAN::Meta::YAML> will be used for deserializing YAML data. If -the C<PERL_YAML_BACKEND> environment variable is defined, then it is intepreted +the C<PERL_YAML_BACKEND> environment variable is defined, then it is interpreted as a module to use for deserialization. The given module must be installed, must load correctly and must implement the C<Load()> function or an exception will be thrown. +=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan + =head1 SUPPORT -Bugs should be reported via the CPAN bug tracker at +=head2 Bugs / Feature Requests + +Please report any bugs or feature requests through the issue tracker +at L<https://rt.cpan.org/Public/Dist/Display.html?Name=Parse-CPAN-Meta>. +You will be notified automatically of any progress on your issue. + +=head2 Source Code + +This is open source software. The code repository is available for +public review and contribution under the terms of the license. + +L<http://github.com/Perl-Toolchain-Gang/Parse-CPAN-Meta> -L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Parse-CPAN-Meta> + git clone git://github.com/Perl-Toolchain-Gang/Parse-CPAN-Meta.git =head1 AUTHOR -Adam Kennedy E<lt>adamk@cpan.orgE<gt> +Adam Kennedy <adamk@cpan.org> + +=head1 CONTRIBUTORS + +=over 4 + +=item * + +David Golden <dagolden@cpan.org> + +=item * + +Joshua ben Jore <jjore@cpan.org> + +=item * + +Ricardo SIGNES <rjbs@cpan.org> + +=item * + +Steffen Müller <smueller@cpan.org> -=head1 COPYRIGHT +=back -Copyright 2006 - 2010 Adam Kennedy. +=head1 COPYRIGHT AND LICENSE -This program is free software; you can redistribute -it and/or modify it under the same terms as Perl itself. +This software is copyright (c) 2013 by Adam Kennedy and Contributors. -The full text of the license can be found in the -LICENSE file included with this module. +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 diff --git a/cpan/Parse-CPAN-Meta/t/01_compile.t b/cpan/Parse-CPAN-Meta/t/01_compile.t deleted file mode 100644 index 4356305487..0000000000 --- a/cpan/Parse-CPAN-Meta/t/01_compile.t +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/perl - -delete $ENV{PERL_YAML_BACKEND}; -delete $ENV{PERL_JSON_BACKEND}; - -BEGIN { - if( $ENV{PERL_CORE} ) { - chdir 't'; - @INC = ('../lib', 'lib'); - } - else { - unshift @INC, 't/lib/'; - } -} - -use strict; -BEGIN { - $| = 1; - $^W = 1; -} - -use File::Spec::Functions ':ALL'; -use Test::More tests => 3; - -# Check their perl version -ok( $] >= 5.004, "Your perl is new enough" ); - -# Does the module load -use_ok( 'Parse::CPAN::Meta' ); -use_ok( 'Parse::CPAN::Meta::Test' ); diff --git a/cpan/Parse-CPAN-Meta/t/02_api.t b/cpan/Parse-CPAN-Meta/t/02_api.t index 4ffb3d1f8b..e9c62e3f92 100644 --- a/cpan/Parse-CPAN-Meta/t/02_api.t +++ b/cpan/Parse-CPAN-Meta/t/02_api.t @@ -58,8 +58,8 @@ my $want = { "version" => "0.101010", }; -my $meta_json = catfile( test_data_directory(), 'VR-META.json' ); -my $meta_yaml = catfile( test_data_directory(), 'VR-META.yml' ); +my $meta_json = catfile( test_data_directory(), 'META-VR.json' ); +my $meta_yaml = catfile( test_data_directory(), 'META-VR.yml' ); ### YAML tests { @@ -73,7 +73,7 @@ my $meta_yaml = catfile( test_data_directory(), 'VR-META.yml' ); { local $ENV{PERL_YAML_BACKEND}; # ensure we get CPAN::META::YAML - my $yaml = load_ok( 'VR-META.yml', $meta_yaml, 100); + 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"); } @@ -84,7 +84,7 @@ SKIP: { local $ENV{PERL_YAML_BACKEND} = 'YAML'; is(Parse::CPAN::Meta->yaml_backend(), 'YAML', 'yaml_backend()'); - my $yaml = load_ok( 'VR-META.yml', $meta_yaml, 100); + 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"); } @@ -103,7 +103,7 @@ SKIP: { # JSON tests with JSON::PP local $ENV{PERL_JSON_BACKEND}; # ensure we get JSON::PP - my $json = load_ok( 'VR-META.json', $meta_json, 100); + 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"); } @@ -112,7 +112,7 @@ SKIP: { # JSON tests with JSON::PP, take 2 local $ENV{PERL_JSON_BACKEND} = 0; # request JSON::PP - my $json = load_ok( 'VR-META.json', $meta_json, 100); + 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"); } @@ -121,7 +121,7 @@ SKIP: { # JSON tests with JSON::PP, take 3 local $ENV{PERL_JSON_BACKEND} = 'JSON::PP'; # request JSON::PP - my $json = load_ok( 'VR-META.json', $meta_json, 100); + 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'"); } @@ -132,7 +132,7 @@ SKIP: { local $ENV{PERL_JSON_BACKEND} = 1; is(Parse::CPAN::Meta->json_backend(), 'JSON', 'json_backend()'); - my $json = load_ok( 'VR-META.json', $meta_json, 100); + 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/data/VR-META.json b/cpan/Parse-CPAN-Meta/t/data/META-VR.json index fbe9eca82f..fbe9eca82f 100644 --- a/cpan/Parse-CPAN-Meta/t/data/VR-META.json +++ b/cpan/Parse-CPAN-Meta/t/data/META-VR.json diff --git a/cpan/Parse-CPAN-Meta/t/data/VR-META.yml b/cpan/Parse-CPAN-Meta/t/data/META-VR.yml index 56d50ddc3d..56d50ddc3d 100644 --- a/cpan/Parse-CPAN-Meta/t/data/VR-META.yml +++ b/cpan/Parse-CPAN-Meta/t/data/META-VR.yml |