Test-CPAN-Meta-0.25/0000755000175000017500000000000012522337624013222 5ustar barbiebarbieTest-CPAN-Meta-0.25/INSTALL0000644000175000017500000000562712522337623014264 0ustar barbiebarbieInstallation Instructions The instructions are basically as per any Perl module. INSTALLING AUTOMATICALLY ------------------------ The easiest way to install is via CPAN, CPANPLUS or cpanminus: CPAN: % perl -MCPAN -e shell [as root] > install Test::CPAN::Meta > quit CPANPLUS: % cpanp > i Test::CPAN::Meta > q cpanminus: % cpanm Test::CPAN::Meta See your local documentation ('perldoc CPAN', 'perldoc CPANPLUS' or 'perldoc cpanm') for further instructions on setting up and configuring your chosen installer. OBTAINING THE MODULE -------------------- The latest release version of Test-CPAN-Meta can be downloaded from any CPAN site: http://www.cpan.org/modules/by-authors/id/B/BA/BARBIE/ http://search.cpan.org/dist/Test-CPAN-Meta/ Phrasebook is distributed as a gzipped tar archive file: Test-CPAN-Meta-.tar.gz where represents the current version number, e.g. 0.01. To install the module, unpack the distribution archive to create an installation directory. Something like this: tar zxf Test-CPAN-Meta-0.01.tar.gz or gunzip Test-CPAN-Meta-0.01.tar.gz tar xf Test-CPAN-Meta-0.01.tar You can then 'cd' into the directory created, cd Test-CPAN-Meta-0.01 INSTALLING MANUALLY ------------------- The 'make install' (done later) will install the modules and scripts on your system. You may need administrator privileges to perform this task. Alternately you can install the module to a local directory (see ExtUtils::MakeMaker for full details), e.g. % perl Makefile.PL PREFIX=/home/me/ Don't forget to update your PERL5LIB environment variable if you do this, or add a line to your script to tell Perl where to find the files, e.g. use lib qw( /home/me/lib/perl5/site_perl/5.6.0 ); If you're not after a custom location, just do: % perl Makefile.PL If you are lacking any of the prerequisite modules, running that program will tell you. All prerequisites are available from CPAN. When you have them all: % make && make test If there are any failures, it's best if you contact me. It may help other people who have the same problem. I don't tend to read the Perl newsgroups or PerlMonks, so it's no use posting there. When you report your trouble, be sure to send me the following information; + result of `perl -V' + output from 'make test' - ideally do 'make test TEST_VERBOSE=1 >& errs' Send those to bug-Test-CPAN-Meta@rt.cpan.org and I'll get back to you as soon as I'm able. If it worked, then become root and type: # make install Congratulations. You've just installed Test::CPAN::Meta. If you have a copy of cpantest installed, type: % cpantest -g pass -nc -p `basename \`pwd\`` -auto Or: % cpantest -g pass -nc -p Test-CPAN-Meta-0.01 -auto That will tell both me and other potential users that the module built correctly on your machine. Cheers, Barbie. http://www.missbarbell.co.uk/ Test-CPAN-Meta-0.25/Changes0000644000175000017500000001174112522337623014520 0ustar barbiebarbieRevision history for Test-CPAN-Meta =================================== 0.25 2015-05-06 - POD fixes (by Olivier Mengué (DOLMEN)). - removed Test::CPAN::Meta from the recommends list, as CPAN.pm tries to install it first. (RT#104023 Steve Hay (SHAY)). 0.24 2015-01-13 - extended META test suite. - added META.json and tests. - documentation updates 0.23 2013-04-07 - change file dates changed to meet W3CDTF standards. 0.22 2012-08-12 - updated INSTALL instructions. - added minimum perl version (5.006). - reworked Makefile.PL for clarity. - implemented Perl::Critic suggestions. - added meta_yaml_ok test and example. - several Version.pm updates, including new() parameter name change: 'yaml' is now 'data'. 0.21 2012-04-19 - RT#76609: further spelling fix. (Florian Schlichting). - removed DSLIP info. 0.20 2012-04-17 - RT#76609: spelling fix. (Florian Schlichting & Gregor Herrmann). 0.19 2012-04-13 - RT#74317: imported url validation from CPAN::Meta (Alex Hartmaier). - RT#66692: updated license type (Paul Howarth). - updates to examples. 0.18 2011-02-13 - documentation clean up. 0.17 2010-04-12 - fixed qr// delimiters due to issues with the NOT SIGN symbol (suggested by Ricardo Signes & David Golden). 0.16 2009-12-18 - renamed word() to keyword(). - added identifier() validation. - changed optional_features key from a keyword to an identifier type, thus further clarifying RT#52685 (thanks Kevin). 0.15 2009-12-12 - clarified spec defined and user defined keys, as promoted by Kevin Ryde in RT#52685 (thanks Kevin). 0.14 2009-12-07 - RT#46473: license url with fragment part (Kevin Ryde) - RT#47393: "optional_features" as map rather than list (Kevin Ryde) - above applied to 1.4, 1.3 and 1.2 version of the meta-spec. 0.13 2009-05-24 - added version checking to standard 94metatest.t - added changes file checking, 95changedate.t - added support for v-strings (thanks to David Golden) - relaxed resource keys names, as per spec (thanks to Jonathan Yu) 0.12 2008-06-27 - added spec version 1.4 - added further check to ensure we have a known spec version 0.11 2008-06-02 - added 'git' as an accepted url protocol (Mischa Poslawsky). 0.10 2008-03-28 - purely a cosmetic release to render the Makefile.PL time issues, that have generated bogus FAIL reports in previous releases, null and void. 0.09 2008-03-17 - it helps when you fix all the versioning too! 0.08 2008-03-17 - fixed licensing list (adding Artistic2). (Bernhard Schmalhofer) - value for license is mandatory, but the actual value could be any string. Therefore the license() function now returns 1 if the given value is a known license type, returns 2 if a value is given, or 0 if no value is given. - hashref returned of the parsed META.yml file, by both meta_spec_ok() and meta_yaml_ok(), in the event the user wishes to perform addition checks on the values of the hash keys. (Adam Kennedy) - added t/05metaspec.t test file. 0.07 2008-01-10 - removed dependencies on Test::YAML::Valid, YAML and YAML-Syck, in their place we now use the new Parse::CPAN::Meta module, which has been proposed for including in the Perl Core. - name change from 'Test::YAML::Meta' to 'Test::CPAN::Meta', to follow the better naming convention as per Parse::CPAN::Meta. - added AUTOMATED_TESTING checks to packaging tests. 0.06 2007-11-05 - fixed RT#29457: distribution_type is not mandatory in spec 1.2 (domm) 0.05 2007-11-02 - a curious error report fails validating META.yml the first time, but is okay the second time. As such I'm removing the 93metavalid.t as the test is redundant now. 0.04 2007-05-15 - provided better error reporting (spec chain and validating version) - added a new test file, supplied by Jochen Stenzel, which highlights an error in the way the author line was created. - bumped the Test::More version required, due to a bugfix in Test::Builder:Tester. - provided a cleaner way to report undef values as errors - added lots more tests for edge cases - finally sorted the Test::Builder::Tester tests in 04metatester.t - Devel::Cover = 95.6% 0.03 2007-02-27 - POD & comment updates - removed 92distribution.t test as it can't detect that YAML::Syck is optional - fixed a misunderstanding of mine from the META.yml specification. 0.02 2007-02-27 - Fixed a bug in detecting module name 0.01 2007-02-27 - Initial release. - Devel::Cover = 91.7% Test-CPAN-Meta-0.25/README0000644000175000017500000000410212522337623014076 0ustar barbiebarbieTest-CPAN-Meta ============== DESCRIPTION Validate your CPAN META.yml files. This distribution was written to ensure that a META.yml file, provided with a standard distribution uploaded to CPAN, meets the specifications that are slowly being introduced to module uploads, via the use of package makers and installers such as ExtUtils::MakeMaker, Module::Build and Module::Install. Current CPAN META Specification, 2.0, was finally approved in April 2010, which forms the basis for the contents of a META.json file. The full specification is now included with the CPAN-Meta distribution. http://search.cpan.org/perldoc?CPAN::Meta DEPENDENCIES The distribution requires the following modules: Parse::CPAN::Meta Test::Builder For testing purposes, the following modules are required: IO::File Test::More For testing purposes, the following modules are desireable, but not essential: Test::CPAN::Meta Test::CPAN::Meta::JSON Test::Pod Test::Pod::Coverage INSTALLATION To install this module type the following: perl Makefile.PL make make test make install For more detailed installation instructions, see INSTALL. USAGE Read the pod documentation in the distribution files. CHANGES For a complete list of changes, see the Changes file. SUPPORT There are no known bugs at the time of this release. However, if you spot a bug or are experiencing difficulties that are not explained within the POD documentation, please send an email to barbie@cpan.org or submit a bug to the RT system (http://rt.cpan.org/Public/Dist/Display.html?Name=Test-CPAN-Meta). However, it would help greatly if you are able to pinpoint problems or even supply a patch. Fixes are dependent upon their severity and my availability. Should a fix not be forthcoming, please feel free to (politely) remind me. AUTHOR Barbie for Miss Barbell Productions http://www.missbarbell.co.uk. COPYRIGHT AND LICENSE Copyright (C) 2007-2015 Barbie for Miss Barbell Productions This distribution is free software; you can redistribute it and/or modify it under the Artistic Licence v2. Test-CPAN-Meta-0.25/t/0000755000175000017500000000000012522337624013465 5ustar barbiebarbieTest-CPAN-Meta-0.25/t/01use.t0000644000175000017500000000021512522337623014604 0ustar barbiebarbie#!/usr/bin/perl -w use strict; use Test::More tests => 2; BEGIN { use_ok( 'Test::CPAN::Meta' ); use_ok( 'Test::CPAN::Meta::Version' ); } Test-CPAN-Meta-0.25/t/98metatest.t0000644000175000017500000000046712522337623015667 0ustar barbiebarbie#!/usr/bin/perl -w use strict; use Test::More; # Skip if doing a regular install plan skip_all => "Author tests not required for installation" unless ( $ENV{AUTOMATED_TESTING} ); eval "use Test::CPAN::Meta"; plan skip_all => "Test::CPAN::Meta required for testing META.yml files" if $@; meta_yaml_ok(); Test-CPAN-Meta-0.25/t/02metafiles.t0000644000175000017500000000620612522337623015770 0ustar barbiebarbie#!/usr/bin/perl -w use strict; use Test::More tests => 76; use Test::CPAN::Meta::Version; use Parse::CPAN::Meta; my $vers = '1.3'; my @tests = ( { file => 't/samples/00-META.yml', fail => 0, errors => 0, bad => 0, faults => 0 }, { file => 't/samples/01-META.yml', fail => 0, errors => 0, bad => 0, faults => 0 }, { file => 't/samples/02-META.yml', fail => 1, errors => 2, bad => 1, faults => 1 }, { file => 't/samples/03-META.yml', fail => 0, errors => 0, bad => 0, faults => 0 }, { file => 't/samples/04-META.yml', fail => 1, errors => 1, bad => 1, faults => 1 }, { file => 't/samples/05-META.yml', fail => 0, errors => 0, bad => 0, faults => 0 }, { file => 't/samples/06-META.yml', fail => 1, errors => 3, bad => 1, faults => 3 }, { file => 't/samples/07-META.yml', fail => 0, errors => 0, bad => 0, faults => 0 }, { file => 't/samples/08-META.yml', fail => 0, errors => 0, bad => 0, faults => 0 }, { file => 't/samples/09-META.yml', fail => 1, errors => 1, bad => 1, faults => 1 }, { file => 't/samples/10-META.yml', fail => 1, errors => 1, bad => 1, faults => 1 }, { file => 't/samples/11-META.yml', fail => 1, errors => 2, bad => 1, faults => 1 }, { file => 't/samples/12-META.yml', fail => 1, errors => 1, bad => 0, faults => 0 }, { file => 't/samples/13-META.yml', fail => 1, errors => 1, bad => 0, faults => 0 }, { file => 't/samples/14-META.yml', fail => 1, errors => 1, bad => 0, faults => 0 }, { file => 't/samples/15-META.yml', fail => 1, errors => 1, bad => 0, faults => 0 }, { file => 't/samples/16-META.yml', fail => 0, errors => 0, bad => 0, faults => 0 }, { file => 't/samples/multibyte.yml', fail => 0, errors => 0, bad => 0, faults => 0 }, { file => 't/samples/Template-Provider-Unicode-Japanese.yml', fail => 0, errors => 0, bad => 0, faults => 0 }, ); for my $test (@tests) { my ($data) = eval { Parse::CPAN::Meta::LoadFile($test->{file}) }; if($@) { ok(0,"Cannot load file - $test->{file}"); ok(0,"Cannot load file - $test->{file}"); next; } my $spec = Test::CPAN::Meta::Version->new(spec => $vers, data => $data); my $result = $spec->parse(); my @errors = $spec->errors(); is($result, $test->{fail}, "check result for $test->{file}"); is(scalar(@errors), $test->{errors}, "check errors for $test->{file}"); if(scalar(@errors) != $test->{errors}) { print STDERR "# failed: $test->{file}\n"; print STDERR "# errors: $_\n" for(@errors); } } for my $test (@tests) { my ($data) = eval { Parse::CPAN::Meta::LoadFile($test->{file}) }; if($@) { ok(0,"Cannot load file - $test->{file}"); ok(0,"Cannot load file - $test->{file}"); next; } my $spec = Test::CPAN::Meta::Version->new(data => $data); my $result = $spec->parse(); my @errors = $spec->errors(); is($result, $test->{bad}, "check result for $test->{file}"); is(scalar(@errors), $test->{faults}, "check errors for $test->{file}"); if(scalar(@errors) != $test->{faults}) { print STDERR "# failed: $test->{file}\n"; print STDERR "# errors: $_\n" for(@errors); } } Test-CPAN-Meta-0.25/t/96metatest.t0000644000175000017500000000174612522337623015666 0ustar barbiebarbie#!/usr/bin/perl -w use strict; use Test::More; # Skip if doing a regular install plan skip_all => "Author tests not required for installation" unless ( $ENV{AUTOMATED_TESTING} ); eval "use Test::CPAN::Meta::JSON"; plan skip_all => "Test::CPAN::Meta::JSON required for testing META.json files" if $@; plan 'no_plan'; my $meta = meta_spec_ok(undef,undef,@_); use Test::CPAN::Meta; my $version = $Test::CPAN::Meta::VERSION; is($meta->{version},$version, 'META.json distribution version matches'); if($meta->{provides}) { for my $mod (keys %{$meta->{provides}}) { is($meta->{provides}{$mod}{version},$version, "META.json entry [$mod] version matches distribution version"); eval "require $mod"; my $VERSION = '$' . $mod . '::VERSION'; my $v = eval "$VERSION"; is($meta->{provides}{$mod}{version},$v, "META.json entry [$mod] version matches module version"); isnt($meta->{provides}{$mod}{version},0); } } Test-CPAN-Meta-0.25/t/04metatester.t0000644000175000017500000000347112522337623016177 0ustar barbiebarbie#!/usr/bin/perl -w use strict; use Test::CPAN::Meta; use Test::Builder::Tester tests => 7; my $testfile = 't/samples/00-META.yml'; test_out('ok 1 - t/samples/00-META.yml contains valid YAML'); test_out('ok 2 - t/samples/00-META.yml meets the designated specification (1.3)'); meta_spec_ok($testfile,'1.3'); test_test("$testfile with version 1.3"); test_out('ok 1 - t/samples/00-META.yml contains valid YAML'); test_out('not ok 2 - t/samples/00-META.yml meets the designated specification (1.2)'); test_fail(2); test_err('# ERR: META.yml specification URL does not match version (meta-spec -> url) [Validation: 1.2]'); meta_spec_ok($testfile,'1.2'); test_test("$testfile with version 1.2"); test_out('ok 1 - t/samples/00-META.yml contains valid YAML'); test_out('ok 2 - t/samples/00-META.yml meets the designated specification (1.1)'); meta_spec_ok($testfile,'1.1'); test_test("$testfile with version 1.1"); test_out('ok 1 - t/samples/00-META.yml contains valid YAML'); test_out('ok 2 - t/samples/00-META.yml meets the designated specification (1.0)'); meta_spec_ok($testfile,'1.0'); test_test("$testfile with version 1.0"); test_out('ok 1 - t/samples/00-META.yml contains valid YAML'); test_out('ok 2 - t/samples/00-META.yml meets the designated specification'); meta_spec_ok($testfile); test_test("$testfile with assumed (1.3) version"); test_out('ok 1 - t/samples/00-META.yml contains valid YAML'); test_out('ok 2 - my own test'); meta_spec_ok($testfile,undef,'my own test'); test_test("$testfile with assumed (1.3) version"); test_out('ok 1 - t/samples/00-META.yml contains valid YAML'); test_out('not ok 2 - bad spec version'); test_fail(2); test_err('# ERR: Unknown META.yml specification, cannot validate. [Validation: 0.99]'); meta_spec_ok($testfile,'0.99','bad spec version'); test_test("$testfile with bad spec version 0.99"); Test-CPAN-Meta-0.25/t/95changedate.t0000644000175000017500000000231312522337623016111 0ustar barbiebarbie#!/usr/bin/perl -w use strict; use IO::File; use Test::More; # Skip if doing a regular install plan skip_all => "Author tests not required for installation" unless ( $ENV{AUTOMATED_TESTING} ); my $fh = IO::File->new('Changes','r') or plan skip_all => "Cannot open Changes file"; plan 'no_plan'; use Test::CPAN::Meta; my $version = $Test::CPAN::Meta::VERSION; my $latest = 0; while(<$fh>) { next unless(m!^\d!); $latest = 1 if(m!^$version!); # 2012-08-26T01:02 or 2012-08-26T01:02:03 or 2012-08-26T01:02:03.04 or 2012-08-26T01:02+01:00 like($_, qr!^ \d[\d._]+\s+ # version ( \d{4}-\d{2}-\d{2} # 2012-08-26 - YYYY-MM-DD ( T\d{2}:\d{2} # T01:02 - Thh:mm ( :\d{2} # :02 - :ss ( \.\d+ # .2 - .ss (microseconds) )? )? ( (Z|[-+]\d+:\d+) # +01:00 - timezone )? )? ) \s*$!x,'... version has a date'); } is($latest,1,'... latest version not listed'); Test-CPAN-Meta-0.25/t/samples/0000755000175000017500000000000012522337624015131 5ustar barbiebarbieTest-CPAN-Meta-0.25/t/samples/14-META.yml0000644000175000017500000000147112522337623016626 0ustar barbiebarbie--- #YAML:1.0 name: Test version: 0.01 abstract: brief test file author: - Barbie license: perl distribution_type: module installdirs: site requires: Test::YAML::Valid: 0 Test::More: 0.47 recommends: Test::More: 0.47 Test::Pod: 1.00 Test::Pod::Coverage: 0.08 Test::YAML::Valid: 0.03 build_requires: Test::More: 0.47 provides: Test::YAML::Meta: file: lib/Test/YAML/Meta.pm version: 0.01 Test::YAML::Meta::Version: file: lib/Test/YAML/Meta/Version.pm version: 0.01 no_index: directory: - t - examples meta-spec: version: 1.1 url: http://module-build.sourceforge.net/META-spec-v1.1.html generated_by: Hand 1.0 Test-CPAN-Meta-0.25/t/samples/10-META.yml0000644000175000017500000000147112522337623016622 0ustar barbiebarbie--- #YAML:1.0 name: Test version: test abstract: brief test file author: - Barbie license: perl distribution_type: module installdirs: site requires: Test::YAML::Valid: 0 Test::More: 0.47 recommends: Test::More: 0.47 Test::Pod: 1.00 Test::Pod::Coverage: 0.08 Test::YAML::Valid: 0.03 build_requires: Test::More: 0.47 provides: Test::YAML::Meta: file: lib/Test/YAML/Meta.pm version: 0.01 Test::YAML::Meta::Version: file: lib/Test/YAML/Meta/Version.pm version: 0.01 no_index: directory: - t - examples meta-spec: version: 1.3 url: http://module-build.sourceforge.net/META-spec-v1.3.html generated_by: Hand 1.0 Test-CPAN-Meta-0.25/t/samples/08-META.yml0000644000175000017500000000174012522337623016630 0ustar barbiebarbie--- #YAML:1.0 name: Test version: 0.01_01 abstract: brief test file author: - Barbie license: perl distribution_type: module installdirs: site requires: Test::YAML::Valid: 0 Test::More: 0.47 recommends: Test::More: 0.47 Test::Pod: 1.00 Test::Pod::Coverage: 0.08 Test::YAML::Valid: 0.03 build_requires: Test::More: 0.47 provides: Test::YAML::Meta: file: lib/Test/YAML/Meta.pm version: 0.01 Test::YAML::Meta::Version: file: lib/Test/YAML/Meta/Version.pm version: 0.01 no_index: directory: - t - examples meta-spec: version: 1.3 url: http://module-build.sourceforge.net/META-spec-v1.3.html generated_by: Hand 1.0 resources: license: http://test.example.com homepage: http://test.example.com bugtracker: http://test.example.com repository: http://test.example.com Test-CPAN-Meta-0.25/t/samples/03-META.yml0000644000175000017500000000153512522337623016625 0ustar barbiebarbie--- #YAML:1.0 name: Test-YAML-Meta version: 0.01 abstract: A test module to validate a META.yml file. author: - Barbie license: perl distribution_type: module installdirs: site requires: Test::YAML::Valid: 0 Test::More: 0.47 recommends: Test::More: 0.47 Test::Pod: 1.00 Test::Pod::Coverage: 0.08 Test::YAML::Valid: 0.03 build_requires: Test::More: 0.47 provides: Test::YAML::Meta: file: lib/Test/YAML/Meta.pm version: 0.01 Test::YAML::Meta::Version: file: lib/Test/YAML/Meta/Version.pm version: 0.01 private: directory: - t - examples meta-spec: version: 1.3 url: http://module-build.sourceforge.net/META-spec-v1.3.html generated_by: Hand 1.0 Test-CPAN-Meta-0.25/t/samples/06-META.yml0000644000175000017500000000131012522337623016617 0ustar barbiebarbie--- #YAML:1.0 name: Test version: 0.01_01 abstract: brief test file author: - Barbie license: perl distribution_type: module installdirs: site requires: Test-More: 0.47 recommends: Test-More: 0.47 build_requires: Test-More: 0.47 provides: Test::YAML::Meta: file: lib/Test/YAML/Meta.pm version: 0.01 Test::YAML::Meta::Version: file: lib/Test/YAML/Meta/Version.pm version: 0.01 no_index: directory: - t - examples meta-spec: version: 1.3 url: http://module-build.sourceforge.net/META-spec-v1.3.html generated_by: Hand 1.0 Test-CPAN-Meta-0.25/t/samples/multibyte.yml0000644000175000017500000000072012522337623017670 0ustar barbiebarbie--- abstract: Perl-compatible regular expression engine author: - "Ævar Arnfjörð Bjarmason " build_requires: Config: 0 Test::More: 0 XSLoader: 0 distribution_type: module generated_by: Module::Install version 0.65 license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.3.html version: 1.3 name: re-engine-PCRE no_index: directory: - inc - t requires: perl: 5.9.5 tests: t/*.t t/*/*.t version: 0.10 Test-CPAN-Meta-0.25/t/samples/00-META.yml0000644000175000017500000000153612522337623016623 0ustar barbiebarbie--- #YAML:1.0 name: Test-YAML-Meta version: 0.01 abstract: A test module to validate a META.yml file. author: - Barbie license: perl distribution_type: module installdirs: site requires: Test::YAML::Valid: 0 Test::More: 0.47 recommends: Test::More: 0.47 Test::Pod: 1.00 Test::Pod::Coverage: 0.08 Test::YAML::Valid: 0.03 build_requires: Test::More: 0.47 provides: Test::YAML::Meta: file: lib/Test/YAML/Meta.pm version: 0.01 Test::YAML::Meta::Version: file: lib/Test/YAML/Meta/Version.pm version: 0.01 no_index: directory: - t - examples meta-spec: version: 1.3 url: http://module-build.sourceforge.net/META-spec-v1.3.html generated_by: Hand 1.0 Test-CPAN-Meta-0.25/t/samples/11-META.yml0000644000175000017500000000141212522337623016616 0ustar barbiebarbie--- #YAML:1.0 name: PerlPoint-Package version: 0.46 abstract: A framework to write PerlPoint converters. author: Jochen Stenzel (perl@jochen-stenzel.de) license: artistic generated_by: ExtUtils::MakeMaker version 6.32 distribution_type: module requires: Digest::SHA1: 1 File::Spec: 0.8 File::Temp: 0.12 Getopt::Long: 2.24 IO::File: 1 Pod::Simple: 3.02 Storable: 1 Test::Harness: 1.25 Test::More: 0.11 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.2.html version: 1.2 Test-CPAN-Meta-0.25/t/samples/04-META.yml0000644000175000017500000000144712522337623016630 0ustar barbiebarbie--- #YAML:1.0 name: Test-YAML-Meta version: 0.01 abstract: A test module to validate a META.yml file. author: - Barbie license: perl distribution_type: module installdirs: site requires: Test::YAML::Valid: 0 Test::More: 0.47 recommends: Test::More: 0.47 Test::Pod: 1.00 Test::Pod::Coverage: 0.08 Test::YAML::Valid: 0.03 build_requires: Test::More: 0.47 provides: Test::YAML::Meta: Test::YAML::Meta::Version: file: lib/Test/YAML/Meta/Version.pm version: 0.01 no_index: directory: - t - examples meta-spec: version: 1.3 url: http://module-build.sourceforge.net/META-spec-v1.3.html generated_by: Hand 1.0 Test-CPAN-Meta-0.25/t/samples/05-META.yml0000644000175000017500000000046112522337623016624 0ustar barbiebarbie--- #YAML:1.0 name: Test version: 0.01_01 abstract: brief test file author: - Barbie license: perl meta-spec: version: 1.3 url: http://module-build.sourceforge.net/META-spec-v1.3.html generated_by: Hand 1.0 Test-CPAN-Meta-0.25/t/samples/02-META.yml0000644000175000017500000000134412522337623016622 0ustar barbiebarbie--- #YAML:1.0 name: Test-YAML-Meta version: 0.01 abstract: A test module to validate a META.yml file. author: - Barbie license: perl distribution_type: module installdirs: site requires: Test::YAML::Valid: 0 Test::More: 0.47 recommends: Test::More: 0.47 Test::Pod: 1.00 Test::Pod::Coverage: 0.08 Test::YAML::Valid: 0.03 build_requires: Test::More: 0.47 provides: Test::YAML::Meta: file: lib/Test/YAML/Meta.pm version: 0.01 Test::YAML::Meta::Version: file: lib/Test/YAML/Meta/Version.pm version: 0.01 no_index: directory: - t - examples Test-CPAN-Meta-0.25/t/samples/16-META.yml0000644000175000017500000000147112522337623016630 0ustar barbiebarbie--- #YAML:1.0 name: Test version: 0.01 abstract: brief test file author: - Barbie license: perl distribution_type: module installdirs: site requires: Test::YAML::Valid: 0 Test::More: 0.47 recommends: Test::More: 0.47 Test::Pod: 1.00 Test::Pod::Coverage: 0.08 Test::YAML::Valid: 0.03 build_requires: Test::More: 0.47 provides: Test::YAML::Meta: file: lib/Test/YAML/Meta.pm version: 0.01 Test::YAML::Meta::Version: file: lib/Test/YAML/Meta/Version.pm version: 0.01 no_index: directory: - t - examples meta-spec: version: 1.3 url: http://module-build.sourceforge.net/META-spec-v1.3.html generated_by: Hand 1.0 Test-CPAN-Meta-0.25/t/samples/01-META.yml0000644000175000017500000000170112522337623016616 0ustar barbiebarbie--- #YAML:1.0 name: Test-YAML-Meta version: 0.01 abstract: A test module to validate a META.yml file. author: - Barbie license: perl distribution_type: module installdirs: site requires: Test::YAML::Valid: 0 Test::More: 0.47 recommends: Test::More: 0.47 Test::Pod: 1.00 Test::Pod::Coverage: 0.08 Test::YAML::Valid: 0.03 build_requires: Test::More: 0.47 provides: Test::YAML::Meta: file: lib/Test/YAML/Meta.pm version: 0.01 Test::YAML::Meta::Version: file: lib/Test/YAML/Meta/Version.pm version: 0.01 32Test::_YAML24::MetaVersion: file: lib/32Test/_YAML24/MetaVersion.pm version: 0.01 no_index: directory: - t - examples meta-spec: version: 1.3 url: http://module-build.sourceforge.net/META-spec-v1.3.html generated_by: Hand 1.0 Test-CPAN-Meta-0.25/t/samples/15-META.yml0000644000175000017500000000147112522337623016627 0ustar barbiebarbie--- #YAML:1.0 name: Test version: 0.01 abstract: brief test file author: - Barbie license: perl distribution_type: module installdirs: site requires: Test::YAML::Valid: 0 Test::More: 0.47 recommends: Test::More: 0.47 Test::Pod: 1.00 Test::Pod::Coverage: 0.08 Test::YAML::Valid: 0.03 build_requires: Test::More: 0.47 provides: Test::YAML::Meta: file: lib/Test/YAML/Meta.pm version: 0.01 Test::YAML::Meta::Version: file: lib/Test/YAML/Meta/Version.pm version: 0.01 no_index: directory: - t - examples meta-spec: version: 1.2 url: http://module-build.sourceforge.net/META-spec-v1.2.html generated_by: Hand 1.0 Test-CPAN-Meta-0.25/t/samples/12-META.yml0000644000175000017500000000137412522337623016626 0ustar barbiebarbie--- #YAML:1.0 name: Test-YAML-Meta version: 0.01 abstract: A test module to validate a META.yml file. author: - Barbie license: perl distribution_type: module installdirs: site requires: Test::YAML::Valid: 0 Test::More: 0.47 recommends: Test::More: 0.47 Test::Pod: 1.00 Test::Pod::Coverage: 0.08 Test::YAML::Valid: 0.03 build_requires: Test::More: 0.47 provides: Test::YAML::Meta: file: lib/Test/YAML/Meta.pm version: 0.01 Test::YAML::Meta::Version: file: lib/Test/YAML/Meta/Version.pm version: 0.01 no_index: directory: - t - examples generated_by: Hand 1.0 Test-CPAN-Meta-0.25/t/samples/07-META.yml0000644000175000017500000000220012522337623016617 0ustar barbiebarbie--- #YAML:1.0 name: Test version: 0.01_01 abstract: brief test file author: - Barbie license: perl distribution_type: module installdirs: site requires: Test::YAML::Valid: 0 Test::More: 0.47 recommends: Test::More: 0.47 Test::Pod: 1.00 Test::Pod::Coverage: 0.08 Test::YAML::Valid: 0.03 build_requires: Test::More: 0.47 provides: Test::YAML::Meta: file: lib/Test/YAML/Meta.pm version: 0.01 Test::YAML::Meta::Version: file: lib/Test/YAML/Meta/Version.pm version: 0.01 no_index: directory: - t - examples meta-spec: version: 1.3 url: http://module-build.sourceforge.net/META-spec-v1.3.html generated_by: Hand 1.0 optional_features: foo: description: test requires_packages: test requires_os: test excludes_os: test requires: Test::More: 0.47 recommends: Test::More: 0.47 build_requires: Test::More: 0.47 conflicts: Test::More: 0.47 Test-CPAN-Meta-0.25/t/samples/Template-Provider-Unicode-Japanese.yml0000644000175000017500000000071612522337623024332 0ustar barbiebarbie--- abstract: Decode all templates by Unicode::Japanese author: - Hironori Yoshida C<< >> distribution_type: module generated_by: Module::Install version 0.65 license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.3.html version: 1.3 name: Template-Provider-Unicode-Japanese no_index: directory: - inc - t requires: Template::Config: 0 Unicode::Japanese: 0 perl: 5.6.0 version: 0 version: 1.2.1 Test-CPAN-Meta-0.25/t/samples/09-META.yml0000644000175000017500000000172012522337623016627 0ustar barbiebarbie--- #YAML:1.0 name: Test version: 0.01_01 abstract: brief test file author: - Barbie license: perl distribution_type: module installdirs: site requires: Test::YAML::Valid: 0 Test::More: 0.47 recommends: Test::More: 0.47 Test::Pod: 1.00 Test::Pod::Coverage: 0.08 Test::YAML::Valid: 0.03 build_requires: Test::More: 0.47 provides: Test::YAML::Meta: file: lib/Test/YAML/Meta.pm version: 0.01 Test::YAML::Meta::Version: file: lib/Test/YAML/Meta/Version.pm version: 0.01 no_index: directory: - t - examples meta-spec: version: 1.3 url: http://module-build.sourceforge.net/META-spec-v1.3.html generated_by: Hand 1.0 resources: license: test:// homepage: http://test.example.com bugtracker: http://test.example.com repository: http://test.example.com Test-CPAN-Meta-0.25/t/samples/13-META.yml0000644000175000017500000000147112522337623016625 0ustar barbiebarbie--- #YAML:1.0 name: Test version: 0.01 abstract: brief test file author: - Barbie license: perl distribution_type: module installdirs: site requires: Test::YAML::Valid: 0 Test::More: 0.47 recommends: Test::More: 0.47 Test::Pod: 1.00 Test::Pod::Coverage: 0.08 Test::YAML::Valid: 0.03 build_requires: Test::More: 0.47 provides: Test::YAML::Meta: file: lib/Test/YAML/Meta.pm version: 0.01 Test::YAML::Meta::Version: file: lib/Test/YAML/Meta/Version.pm version: 0.01 no_index: directory: - t - examples meta-spec: version: 1.0 url: http://module-build.sourceforge.net/META-spec-v1.0.html generated_by: Hand 1.0 Test-CPAN-Meta-0.25/t/91podcover.t0000644000175000017500000000051312522337623015643 0ustar barbiebarbie#!/usr/bin/perl -w use strict; use Test::More; # Skip if doing a regular install plan skip_all => "Author tests not required for installation" unless ( $ENV{AUTOMATED_TESTING} ); eval "use Test::Pod::Coverage 0.08"; plan skip_all => "Test::Pod::Coverage 0.08 required for testing POD coverage" if $@; all_pod_coverage_ok(); Test-CPAN-Meta-0.25/t/05metaspec.t0000644000175000017500000000043312522337623015617 0ustar barbiebarbie#!/usr/bin/perl -w use strict; use Test::More tests => 3; use Test::CPAN::Meta; my $vers = '1.3'; my $test = 't/samples/00-META.yml'; my $meta = meta_spec_ok($test,$vers); #use Data::Dumper; #diag(Dumper($meta)); is($meta->{license}, 'perl', 'hash value for license matches'); Test-CPAN-Meta-0.25/t/03metaversion.t0000644000175000017500000001234312522337623016353 0ustar barbiebarbie#!/usr/bin/perl -w use strict; use Test::More tests => 108; use Test::CPAN::Meta::Version; my $spec = Test::CPAN::Meta::Version->new(spec => '1.3'); is($spec->header('header','--- #YAML:1.0'),1,'valid YAML header'); is($spec->header('header','--- #YAML:1.1'),0); is($spec->header('header',''),0); is($spec->header('header',undef),0); is($spec->url('url','http://module-build.sourceforge.net/META-spec-v1.3.html'),1,'valid URL'); is($spec->url('url','http://'),0); is($spec->url('url','://module-build.sourceforge.net/META-spec-v1.3.html'),0); is($spec->url('url','test://'),0); is($spec->url('url','test^example^com'),0); is($spec->url('url',''),0); is($spec->url('url',undef),0); is($spec->url('url','http://www.gnu.org/licenses/#GPL'),1,'valid URL: http://www.gnu.org/licenses/#GPL'); is($spec->urlspec('spec','http://module-build.sourceforge.net/META-spec-v1.3.html'),1,'valid specification URL'); is($spec->urlspec('spec','http://module-build.sourceforge.net/META-spec-v1.2.html'),0); is($spec->urlspec('spec','test.html'),0); is($spec->urlspec('spec',''),0); is($spec->urlspec('spec',undef),0); is($spec->string('string','string'),1,'valid string'); is($spec->string('string','0'),1); is($spec->string('string',''),0); is($spec->string('string',undef),0); is($spec->string_or_undef('string_or_undef','string'),1,'valid string or undef'); is($spec->string_or_undef('string_or_undef','0'),1); is($spec->string_or_undef('string_or_undef',''),0); is($spec->string_or_undef('string_or_undef',undef),1); is($spec->file('file','file'),1,'valid file'); is($spec->file('file',''),1); is($spec->file('file',undef),0); is($spec->exversion('exversion','0'),1,'valid extended version'); is($spec->exversion('exversion','<= 5, >=2, ==3, !=4, >1, <6'),1); is($spec->exversion('exversion','='),0); is($spec->exversion('exversion',''),0); is($spec->exversion('exversion',undef),0); is($spec->exversion('exversion'),0); is($spec->version('version','0'),1,'valid basic version'); is($spec->version('version','0.00'),1); is($spec->version('version','0.00_00'),1); is($spec->version('version','0.0.0'),1); is($spec->version('version','v0.0.0'),1); is($spec->version('version','<6'),1); is($spec->version('version','!4'),0); is($spec->version('version',''),0); is($spec->version('version',undef),0); is($spec->version('version'),0); is($spec->boolean('boolean','0'),1, 'boolean = 0'); is($spec->boolean('boolean','1'),1, 'boolean = 1'); is($spec->boolean('boolean','true'),1, 'boolean = true'); is($spec->boolean('boolean','false'),1, 'boolean = false'); is($spec->boolean('boolean','blah'),0, 'boolean = blah'); is($spec->boolean('boolean',''),0, 'boolean = (blank)'); is($spec->boolean('boolean',undef),0, 'boolean = (undef value)'); is($spec->boolean('boolean'),0, 'boolean = (undef)'); for my $value (qw( perl gpl apache artistic artistic2 artistic-2.0 lgpl bsd gpl mit mozilla open_source unrestricted restrictive unknown )) { is($spec->license('license',$value),1,'license test = ' . $value); } is($spec->license('license','blah'),2); is($spec->license('license',''),0); is($spec->license('license',undef),0); is($spec->resource('MailListing'),1,'valid resource - CamelCase'); is($spec->resource('MAILListing'),1,'valid resource - Caps start'); is($spec->resource('mailLISTing'),1,'valid resource - Caps middle'); is($spec->resource('mailListing'),1,'valid resource - 1 cap middle'); is($spec->resource('maillisting'),0); is($spec->resource(''),0); is($spec->resource(undef),0); is($spec->keyword($_),1,"valid keyword $_") for(qw(test X_TEST x_test test-test test_test)); is($spec->keyword($_),0,"invalid keyword $_") for(qw(X-TEST Test TEST test:)); is($spec->keyword(''),0,'invalid keyword '); is($spec->keyword(undef),0,'invalid keyword '); is($spec->identifier($_),1,"valid identifier $_") for(qw(test Test TEST X_TEST x_test test_test)); is($spec->identifier($_),0,"invalid identifier $_") for(qw(X-TEST test-test test:)); is($spec->identifier(''),0,'invalid identifier '); is($spec->identifier(undef),0,'invalid identifier '); is($spec->module('Test'),1,'valid module name'); is($spec->module('Test::CPAN::Meta'),1); is($spec->module('Test-YAML-Meta'),0); is($spec->module(''),0); is($spec->module(undef),0); my $hash_spec = { file => { list => { value => 'string' } }, directory => { list => { value => 'string' } }, 'package' => { list => { value => 'string' } }, namespace => { list => { value => 'string' } }, }; my $list_spec = { value => 'string' }; my $hash_test = { 'directory' => [ 't', 'examples' ] }; my $list_test = [ 't', 'examples' ]; my $this = scalar($spec->errors); eval { $spec->check_map($hash_spec,$hash_test); }; my $that = scalar($spec->errors); is($that-$this,0, 'valid map check - hash vs hash'); $this = $that; eval { $spec->check_list($list_spec,$list_test); }; $that = scalar($spec->errors); is($that-$this,0, 'valid list check - array vs array'); $this = $that; eval { $spec->check_map($hash_spec,$list_test); }; $that = scalar($spec->errors); is($that-$this,1, 'invalid map check - hash vs array'); $this = $that; eval { $spec->check_list($list_spec,$hash_test); }; $that = scalar($spec->errors); is($that-$this,1, 'invalid list check - array vs hash'); Test-CPAN-Meta-0.25/t/94metatest.t0000644000175000017500000000172012522337623015654 0ustar barbiebarbie#!/usr/bin/perl -w use strict; use Test::More; # Skip if doing a regular install plan skip_all => "Author tests not required for installation" unless ( $ENV{AUTOMATED_TESTING} ); eval "use Test::CPAN::Meta"; plan skip_all => "Test::CPAN::Meta required for testing META.yml" if $@; plan 'no_plan'; my $meta = meta_spec_ok(undef,undef,@_); use Test::CPAN::Meta; my $version = $Test::CPAN::Meta::VERSION; is($meta->{version},$version, 'META.yml distribution version matches'); if($meta->{provides}) { for my $mod (keys %{$meta->{provides}}) { is($meta->{provides}{$mod}{version},$version, "META.yml entry [$mod] version matches distribution version"); eval "require $mod"; my $VERSION = '$' . $mod . '::VERSION'; my $v = eval "$VERSION"; is($meta->{provides}{$mod}{version},$v, "META.yml entry [$mod] version matches module version"); isnt($meta->{provides}{$mod}{version},0); } } Test-CPAN-Meta-0.25/t/90podtest.t0000644000175000017500000000045312522337623015506 0ustar barbiebarbie#!/usr/bin/perl -w use strict; use Test::More; # Skip if doing a regular install plan skip_all => "Author tests not required for installation" unless ( $ENV{AUTOMATED_TESTING} ); eval "use Test::Pod 1.00"; plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; all_pod_files_ok(); Test-CPAN-Meta-0.25/lib/0000755000175000017500000000000012522337624013770 5ustar barbiebarbieTest-CPAN-Meta-0.25/lib/Test/0000755000175000017500000000000012522337624014707 5ustar barbiebarbieTest-CPAN-Meta-0.25/lib/Test/CPAN/0000755000175000017500000000000012522337624015430 5ustar barbiebarbieTest-CPAN-Meta-0.25/lib/Test/CPAN/Meta/0000755000175000017500000000000012522337624016316 5ustar barbiebarbieTest-CPAN-Meta-0.25/lib/Test/CPAN/Meta/Version.pm0000644000175000017500000006314312522337623020307 0ustar barbiebarbiepackage Test::CPAN::Meta::Version; use warnings; use strict; use vars qw($VERSION); $VERSION = '0.25'; #---------------------------------------------------------------------------- =head1 NAME Test::CPAN::Meta::Version - Validate CPAN META data against the specification =head1 SYNOPSIS use Test::CPAN::Meta::Version; =head1 DESCRIPTION This distribution was written to ensure that a META.yml file, provided with a standard distribution uploaded to CPAN, meets the specifications that are slowly being introduced to module uploads, via the use of package makers and installers such as L, L and L. This module is meant to be used together with L, however the code is self contained enough that you can access it directly. See L for further details of the CPAN Meta Specification. =cut #---------------------------------------------------------------------------- ############################################################################# #Specification Definitions # ############################################################################# my %known_specs = ( '1.4' => 'http://module-build.sourceforge.net/META-spec-v1.4.html', '1.3' => 'http://module-build.sourceforge.net/META-spec-v1.3.html', '1.2' => 'http://module-build.sourceforge.net/META-spec-v1.2.html', '1.1' => 'http://module-build.sourceforge.net/META-spec-v1.1.html', '1.0' => 'http://module-build.sourceforge.net/META-spec-v1.0.html' ); my %known_urls = map {$known_specs{$_} => $_} keys %known_specs; my $module_map1 = { 'map' => { ':key' => { name => \&module, value => \&exversion } } }; my $module_map2 = { 'map' => { ':key' => { name => \&module, value => \&version } } }; my $no_index_1_3 = { 'map' => { file => { list => { value => \&string } }, directory => { list => { value => \&string } }, 'package' => { list => { value => \&string } }, namespace => { list => { value => \&string } }, } }; my $no_index_1_2 = { 'map' => { file => { list => { value => \&string } }, dir => { list => { value => \&string } }, 'package' => { list => { value => \&string } }, namespace => { list => { value => \&string } }, } }; my $no_index_1_1 = { 'map' => { ':key' => { name => \&keyword, list => { value => \&string } }, } }; my %definitions = ( '1.4' => { # 'header' => { mandatory => 1, value => \&header }, 'meta-spec' => { mandatory => 1, 'map' => { version => { mandatory => 1, value => \&version}, url => { mandatory => 1, value => \&urlspec } } }, 'name' => { mandatory => 1, value => \&string }, 'version' => { mandatory => 1, value => \&version }, 'abstract' => { mandatory => 1, value => \&string }, 'author' => { mandatory => 1, list => { value => \&string } }, 'license' => { mandatory => 1, value => \&license }, 'generated_by' => { mandatory => 1, value => \&string }, 'distribution_type' => { value => \&string }, 'dynamic_config' => { value => \&boolean }, 'requires' => $module_map1, 'recommends' => $module_map1, 'build_requires' => $module_map1, 'configure_requires' => $module_map1, 'conflicts' => $module_map2, 'optional_features' => { 'map' => { ':key' => { name => \&identifier, 'map' => { description => { value => \&string }, requires_packages => { value => \&string }, requires_os => { value => \&string }, excludes_os => { value => \&string }, requires => $module_map1, recommends => $module_map1, build_requires => $module_map1, conflicts => $module_map2, } } } }, 'provides' => { 'map' => { ':key' => { name => \&module, 'map' => { file => { mandatory => 1, value => \&file }, version => { value => \&version } } } } }, 'no_index' => $no_index_1_3, 'private' => $no_index_1_3, 'keywords' => { list => { value => \&string } }, 'resources' => { 'map' => { license => { value => \&url }, homepage => { value => \&url }, bugtracker => { value => \&url }, repository => { value => \&url }, ':key' => { value => \&string, name => \&resource }, } }, # additional user defined key/value pairs # note we can only validate the key name, as the structure is user defined ':key' => { name => \&keyword, value => \&anything }, }, '1.3' => { # 'header' => { mandatory => 1, value => \&header }, 'meta-spec' => { mandatory => 1, 'map' => { version => { mandatory => 1, value => \&version}, url => { mandatory => 1, value => \&urlspec } } }, 'name' => { mandatory => 1, value => \&string }, 'version' => { mandatory => 1, value => \&version }, 'abstract' => { mandatory => 1, value => \&string }, 'author' => { mandatory => 1, list => { value => \&string } }, 'license' => { mandatory => 1, value => \&license }, 'generated_by' => { mandatory => 1, value => \&string }, 'distribution_type' => { value => \&string }, 'dynamic_config' => { value => \&boolean }, 'requires' => $module_map1, 'recommends' => $module_map1, 'build_requires' => $module_map1, 'conflicts' => $module_map2, 'optional_features' => { 'map' => { ':key' => { name => \&identifier, 'map' => { description => { value => \&string }, requires_packages => { value => \&string }, requires_os => { value => \&string }, excludes_os => { value => \&string }, requires => $module_map1, recommends => $module_map1, build_requires => $module_map1, conflicts => $module_map2, } } } }, 'provides' => { 'map' => { ':key' => { name => \&module, 'map' => { file => { mandatory => 1, value => \&file }, version => { value => \&version } } } } }, 'no_index' => $no_index_1_3, 'private' => $no_index_1_3, 'keywords' => { list => { value => \&string } }, 'resources' => { 'map' => { license => { value => \&url }, homepage => { value => \&url }, bugtracker => { value => \&url }, repository => { value => \&url }, ':key' => { value => \&string, name => \&resource }, } }, # additional user defined key/value pairs # note we can only validate the key name, as the structure is user defined ':key' => { name => \&keyword, value => \&anything }, }, # v1.2 is misleading, it seems to assume that a number of fields where created # within v1.1, when they were created within v1.2. This may have been an # original mistake, and that a v1.1 was retro fitted into the timeline, when # v1.2 was originally slated as v1.1. But I could be wrong ;) '1.2' => { # 'header' => { mandatory => 1, value => \&header }, 'meta-spec' => { mandatory => 1, 'map' => { version => { mandatory => 1, value => \&version}, url => { mandatory => 1, value => \&urlspec } } }, 'name' => { mandatory => 1, value => \&string }, 'version' => { mandatory => 1, value => \&version }, 'license' => { mandatory => 1, value => \&license }, 'generated_by' => { mandatory => 1, value => \&string }, 'author' => { mandatory => 1, list => { value => \&string } }, 'abstract' => { mandatory => 1, value => \&string }, 'distribution_type' => { value => \&string }, 'dynamic_config' => { value => \&boolean }, 'keywords' => { list => { value => \&string } }, 'private' => $no_index_1_2, '$no_index' => $no_index_1_2, 'requires' => $module_map1, 'recommends' => $module_map1, 'build_requires' => $module_map1, 'conflicts' => $module_map2, 'optional_features' => { 'map' => { ':key' => { name => \&identifier, 'map' => { description => { value => \&string }, requires_packages => { value => \&string }, requires_os => { value => \&string }, excludes_os => { value => \&string }, requires => $module_map1, recommends => $module_map1, build_requires => $module_map1, conflicts => $module_map2, } } } }, 'provides' => { 'map' => { ':key' => { name => \&module, 'map' => { file => { mandatory => 1, value => \&file }, version => { value => \&version } } } } }, 'resources' => { 'map' => { license => { value => \&url }, homepage => { value => \&url }, bugtracker => { value => \&url }, repository => { value => \&url }, ':key' => { value => \&string, name => \&resource }, } }, # additional user defined key/value pairs # note we can only validate the key name, as the structure is user defined ':key' => { name => \&keyword, value => \&anything }, }, # note that the 1.1 spec doesn't specify optional or mandatory fields, what # appears below is assumed from later specifications. '1.1' => { # 'header' => { mandatory => 1, value => \&header }, 'name' => { mandatory => 1, value => \&string }, 'version' => { mandatory => 1, value => \&version }, 'license' => { mandatory => 1, value => \&license }, 'license_uri' => { mandatory => 0, value => \&url }, 'generated_by' => { mandatory => 1, value => \&string }, 'distribution_type' => { value => \&string }, 'dynamic_config' => { value => \&boolean }, 'private' => $no_index_1_1, 'requires' => $module_map1, 'recommends' => $module_map1, 'build_requires' => $module_map1, 'conflicts' => $module_map2, # additional user defined key/value pairs # note we can only validate the key name, as the structure is user defined ':key' => { name => \&keyword, value => \&anything }, }, # note that the 1.0 spec doesn't specify optional or mandatory fields, what # appears below is assumed from later specifications. '1.0' => { # 'header' => { mandatory => 1, value => \&header }, 'name' => { mandatory => 1, value => \&string }, 'version' => { mandatory => 1, value => \&version }, 'license' => { mandatory => 1, value => \&license }, 'generated_by' => { mandatory => 1, value => \&string }, 'distribution_type' => { value => \&string }, 'dynamic_config' => { value => \&boolean }, 'requires' => $module_map1, 'recommends' => $module_map1, 'build_requires' => $module_map1, 'conflicts' => $module_map2, # additional user defined key/value pairs # note we can only validate the key name, as the structure is user defined ':key' => { name => \&keyword, value => \&anything }, }, ); ############################################################################# #Code # ############################################################################# =head1 CLASS CONSTRUCTOR =over =item * new( data => $data [, spec => $version] ) The constructor must be passed a valid data structure. Optionally you may also provide a specification version. This version is then use to ensure that the given data structure meets the respective specification definition. If no version is provided the module will attempt to deduce the appropriate specification version from the data structure itself. =back =cut sub new { my ($class,%hash) = @_; # create an attributes hash my $atts = { 'spec' => $hash{spec}, 'data' => $hash{data}, }; # create the object my $self = bless $atts, $class; } =head1 METHODS =head2 Main Methods =over =item * parse() Using the given data structure provided with the constructor, attempts to parse and validate according to the appropriate specification definition. Returns 1 if any errors found, otherwise returns 0. =item * errors() Returns a list of the errors found during parsing. =back =cut sub parse { my $self = shift; my $data = $self->{data}; unless($self->{spec}) { $self->{spec} = $data->{'meta-spec'} && $data->{'meta-spec'}{'version'} ? $data->{'meta-spec'}{'version'} : '1.0'; } $self->check_map($definitions{$self->{spec}},$data); return defined $self->{errors} ? 1 : 0; } sub errors { my $self = shift; return () unless($self->{errors}); return @{$self->{errors}}; } =head2 Check Methods =over =item * check_map($spec,$data) Checks whether a map (or hash) part of the data structure conforms to the appropriate specification definition. =item * check_list($spec,$data) Checks whether a list (or array) part of the data structure conforms to the appropriate specification definition. =back =cut sub check_map { my ($self,$spec,$data) = @_; if(ref($spec) ne 'HASH') { $self->_error( "Unknown META.yml specification, cannot validate." ); return; } if(ref($data) ne 'HASH') { $self->_error( "Expected a map structure from data string or file." ); return; } for my $key (keys %$spec) { next unless($spec->{$key}->{mandatory}); next if(defined $data->{$key}); push @{$self->{stack}}, $key; $self->_error( "Missing mandatory field, '$key'" ); pop @{$self->{stack}}; } for my $key (keys %$data) { push @{$self->{stack}}, $key; if($spec->{$key}) { if($spec->{$key}{value}) { $spec->{$key}{value}->($self,$key,$data->{$key}); } elsif($spec->{$key}{'map'}) { $self->check_map($spec->{$key}{'map'},$data->{$key}); } elsif($spec->{$key}{'list'}) { $self->check_list($spec->{$key}{'list'},$data->{$key}); } } elsif ($spec->{':key'}) { $spec->{':key'}{name}->($self,$key,$key); if($spec->{':key'}{value}) { $spec->{':key'}{value}->($self,$key,$data->{$key}); } elsif($spec->{':key'}{'map'}) { $self->check_map($spec->{':key'}{'map'},$data->{$key}); } elsif($spec->{':key'}{'list'}) { $self->check_list($spec->{':key'}{'list'},$data->{$key}); } } else { $self->_error( "Unknown key, '$key', found in map structure" ); } pop @{$self->{stack}}; } } sub check_list { my ($self,$spec,$data) = @_; if(ref($data) ne 'ARRAY') { $self->_error( "Expected a list structure" ); return; } if(defined $spec->{mandatory}) { if(!defined $data->[0]) { $self->_error( "Missing entries from mandatory list" ); } } for my $value (@$data) { push @{$self->{stack}}, $value; if(defined $spec->{value}) { $spec->{value}->($self,'list',$value); } elsif(defined $spec->{'map'}) { $self->check_map($spec->{'map'},$value); } elsif(defined $spec->{'list'}) { $self->check_list($spec->{'list'},$value); } elsif ($spec->{':key'}) { $self->check_map($spec,$value); } else { $self->_error( "Unknown value type, '$value', found in list structure" ); } pop @{$self->{stack}}; } } =head2 Validator Methods =over =item * header($self,$key,$value) Validates that the YAML header is valid. Note: No longer used as we now read the YAML data structure, not the file. =item * url($self,$key,$value) Validates that a given value is in an acceptable URL format =item * urlspec($self,$key,$value) Validates that the URL to a META.yml specification is a known one. =item * string_or_undef($self,$key,$value) Validates that the value is either a string or an undef value. Bit of a catchall function for parts of the data structure that are completely user defined. =item * string($self,$key,$value) Validates that a string exists for the given key. =item * file($self,$key,$value) Validate that a file is passed for the given key. This may be made more thorough in the future. For now it acts like \&string. =item * exversion($self,$key,$value) Validates a list of versions, e.g. '<= 5, >=2, ==3, !=4, >1, <6, 0'. =item * version($self,$key,$value) Validates a single version string. Versions of the type '5.8.8' and '0.00_00' are both valid. A leading 'v' like 'v1.2.3' is also valid. =item * boolean($self,$key,$value) Validates for a boolean value. Currently these values are '1', '0', 'true', 'false', however the latter 2 may be removed. =item * license($self,$key,$value) Validates that a value is given for the license. Returns 1 if an known license type, or 2 if a value is given but the license type is not a recommended one. =item * resource($self,$key,$value) Validates that the given key is in CamelCase, to indicate a user defined keyword. =item * keyword($self,$key,$value) Validates that key is in an acceptable format for the META.yml specification, i.e. any in the character class [-_a-z]. For user defined keys, although not explicitly stated in the specifications (v1.0 - v1.4), the convention is to precede the key with a pattern matching qr{\Ax_}i. Following this any character from the character class [-_a-zA-Z] can be used. This clarification has been added to v2.0 of the specification. =item * identifier($self,$key,$value) Validates that key is in an acceptable format for the META.yml specification, for an identifier, i.e. any that matches the regular expression qr/[a-z][a-z_]/i. =item * module($self,$key,$value) Validates that a given key is in an acceptable module name format, e.g. 'Test::CPAN::Meta::Version'. =item * anything($self,$key,$value) Usually reserved for user defined structures, allowing them to be considered valid without a need for a specification definition for the structure. =back =cut sub header { my ($self,$key,$value) = @_; if(defined $value) { return 1 if($value && $value =~ /^--- #YAML:1.0/); } $self->_error( "file does not have a valid YAML header." ); return 0; } sub _uri_split { return $_[0] =~ m,(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?,; } sub url { my ($self,$key,$value) = @_; if($value) { my ($scheme, $auth, $path, $query, $frag) = _uri_split($value); unless ( $scheme ) { $self->_error( "'$value' for '$key' does not have a URL scheme" ); return 0; } unless ( $auth ) { $self->_error( "'$value' for '$key' does not have a URL authority" ); return 0; } return 1; } else { $value = ''; } $self->_error( "'$value' for '$key' is not a valid URL." ); return 0; } sub urlspec { my ($self,$key,$value) = @_; if(defined $value) { return 1 if($value && $known_specs{$self->{spec}} eq $value); if($value && $known_urls{$value}) { $self->_error( 'META.yml specification URL does not match version' ); return 0; } } $self->_error( 'Unknown META.yml specification' ); return 0; } sub string { my ($self,$key,$value) = @_; if(defined $value) { return 1 if($value || $value =~ /^0$/); } $self->_error( "value is an undefined string" ); return 0; } sub string_or_undef { my ($self,$key,$value) = @_; return 1 unless(defined $value); return 1 if($value || $value =~ /^0$/); $self->_error( "No string defined for '$key'" ); return 0; } sub file { my ($self,$key,$value) = @_; return 1 if(defined $value); $self->_error( "No file defined for '$key'" ); return 0; } sub exversion { my ($self,$key,$value) = @_; if(defined $value && ($value || $value =~ /0/)) { my $pass = 1; for(split(",",$value)) { $self->version($key,$_) or ($pass = 0); } return $pass; } $value = '' unless(defined $value); $self->_error( "'$value' for '$key' is not a valid version." ); return 0; } sub version { my ($self,$key,$value) = @_; if(defined $value) { return 0 unless($value || $value =~ /0/); return 1 if($value =~ /^\s*((<|<=|>=|>|!=|==)\s*)?v?\d+((\.\d+((_|\.)\d+)?)?)/); } else { $value = ''; } $self->_error( "'$value' for '$key' is not a valid version." ); return 0; } sub boolean { my ($self,$key,$value) = @_; if(defined $value) { return 1 if($value =~ /^(0|1|true|false)$/); } else { $value = ''; } $self->_error( "'$value' for '$key' is not a boolean value." ); return 0; } my %licenses = ( 'perl' => 'http://dev.perl.org/licenses/', 'gpl' => 'http://www.opensource.org/licenses/gpl-license.php', 'apache' => 'http://apache.org/licenses/LICENSE-2.0', 'artistic' => 'http://opensource.org/licenses/artistic-license.php', 'artistic2' => 'http://opensource.org/licenses/artistic-license-2.0.php', 'artistic-2.0' => 'http://opensource.org/licenses/artistic-license-2.0.php', 'lgpl' => 'http://www.opensource.org/licenses/lgpl-license.phpt', 'bsd' => 'http://www.opensource.org/licenses/bsd-license.php', 'gpl' => 'http://www.opensource.org/licenses/gpl-license.php', 'mit' => 'http://opensource.org/licenses/mit-license.php', 'mozilla' => 'http://opensource.org/licenses/mozilla1.1.php', 'open_source' => undef, 'unrestricted' => undef, 'restrictive' => undef, 'unknown' => undef, ); sub license { my ($self,$key,$value) = @_; if(defined $value) { return 1 if($value && exists $licenses{$value}); return 2 if($value); } else { $value = ''; } $self->_error( "License '$value' is unknown" ); return 0; } sub resource { my ($self,$key) = @_; if(defined $key) { # a valid user defined key should be alphabetic # and contain at least one capital case letter. return 1 if($key && $key =~ /^[a-z]+$/i && $key =~ /[A-Z]/); } else { $key = ''; } $self->_error( "Resource '$key' must be in CamelCase." ); return 0; } sub keyword { my ($self,$key) = @_; if(defined $key) { return 1 if($key && $key =~ /^([a-z][-_a-z]*)$/); # spec defined return 1 if($key && $key =~ /^x_([a-z][-_a-z]*)$/i); # user defined } else { $key = ''; } $self->_error( "Key '$key' is not a legal keyword." ); return 0; } sub identifier { my ($self,$key) = @_; if(defined $key) { return 1 if($key && $key =~ /^([a-z][_a-z]+)$/i); # spec 2.0 defined } else { $key = ''; } $self->_error( "Key '$key' is not a legal identifier." ); return 0; } sub module { my ($self,$key) = @_; if(defined $key) { return 1 if($key && $key =~ /^[A-Za-z0-9_]+(::[A-Za-z0-9_]+)*$/); } else { $key = ''; } $self->_error( "Key '$key' is not a legal module name." ); return 0; } sub anything { return 1 } sub _error { my $self = shift; my $mess = shift; $mess .= ' ('.join(' -> ',@{$self->{stack}}).')' if($self->{stack}); $mess .= " [Validation: $self->{spec}]"; push @{$self->{errors}}, $mess; } q( "Before software can be reusable it first has to be usable." - Ralph Johnson ); __END__ #---------------------------------------------------------------------------- =head1 BUGS, PATCHES & FIXES There are no known bugs at the time of this release. However, if you spot a bug or are experiencing difficulties that are not explained within the POD documentation, please send an email to barbie@cpan.org or submit a bug to the RT system (http://rt.cpan.org/Public/Dist/Display.html?Name=Test-CPAN-Meta). However, it would help greatly if you are able to pinpoint problems or even supply a patch. Fixes are dependent upon their severity and my availability. Should a fix not be forthcoming, please feel free to (politely) remind me. =head1 AUTHOR Barbie, for Miss Barbell Productions, L =head1 COPYRIGHT AND LICENSE Copyright (C) 2007-2015 Barbie for Miss Barbell Productions This distribution is free software; you can redistribute it and/or modify it under the Artistic Licence v2. =cut Test-CPAN-Meta-0.25/lib/Test/CPAN/Meta.pm0000644000175000017500000001355612522337623016665 0ustar barbiebarbiepackage Test::CPAN::Meta; use warnings; use strict; use vars qw($VERSION); $VERSION = '0.25'; #---------------------------------------------------------------------------- =head1 NAME Test::CPAN::Meta - Validate your CPAN META.yml files. =head1 SYNOPSIS There are two forms this module can be used. The first is a standalone test of your distribution's META.yml file: use Test::More; eval "use Test::CPAN::Meta"; plan skip_all => "Test::CPAN::Meta required for testing META.yml" if $@; meta_yaml_ok(); Note that you may provide an optional label/comment/message/etc to the function, or one will be created automatically. The second form allows you to test other META.yml files, or specify a specific version you wish to test against: use Test::More tests => 6; use Test::CPAN::Meta; # specify a file and specification version meta_spec_ok('META.yml','1.3',$msg); # specify the specification version to validate the local META.yml meta_spec_ok(undef,'1.3',$msg); # specify a file, where the specification version is deduced # from the file itself meta_spec_ok('META.yml',undef,$msg); Note that this form requires you to specify the number of tests you will be running in your test script. Also note that each 'meta_spec_ok' is actually 2 tests under the hood. =head1 DESCRIPTION This distribution was written to ensure that a META.yml file, provided with a standard distribution uploaded to CPAN, meets the specifications that are slowly being introduced to module uploads, via the use of package makers and installers such as L, L and L. See L for further details of the CPAN Meta Specification. =cut #---------------------------------------------------------------------------- ############################################################################# #Library Modules # ############################################################################# use Parse::CPAN::Meta; use Test::Builder; use Test::CPAN::Meta::Version; #---------------------------------------------------------------------------- my $Test = Test::Builder->new(); sub import { my $self = shift; my $caller = caller; no strict 'refs'; *{$caller.'::meta_yaml_ok'} = \&meta_yaml_ok; *{$caller.'::meta_spec_ok'} = \&meta_spec_ok; $Test->exported_to($caller); $Test->plan(@_); } ############################################################################# #Interface Functions # ############################################################################# =head1 FUNCTIONS =over =item * meta_yaml_ok([$msg]) Basic META.yml wrapper around meta_spec_ok. Returns a hash reference to the contents of the parsed META.yml =cut sub meta_yaml_ok { $Test->plan( tests => 2 ); return meta_spec_ok(undef,undef,@_); } =item * meta_spec_ok($file, $version [,$msg]) Validates the named file against the given specification version. Both $file and $version can be undefined. Returns a hash reference to the contents of the given file, after it has been parsed. =back =cut sub meta_spec_ok { my ($file, $vers, $msg) = @_; $file ||= 'META.yml'; unless($msg) { $msg = "$file meets the designated specification"; $msg .= " ($vers)" if($vers); } my ($data) = eval { Parse::CPAN::Meta::LoadFile($file) }; if($@) { $Test->ok(0,"$file contains valid YAML"); $Test->ok(0,$msg); $Test->diag(" ERR: $@"); return; } else { $Test->ok(1,"$file contains valid YAML"); } my %hash; $hash{spec} = $vers if($vers); $hash{data} = $data; my $spec = Test::CPAN::Meta::Version->new(%hash); if(my $result = $spec->parse()) { $Test->ok(0,$msg); $Test->diag(" ERR: $_") for($spec->errors); } else { $Test->ok(1,$msg); } return $data; } q( "Before software can be reusable it first has to be usable." - Ralph Johnson ); __END__ #---------------------------------------------------------------------------- =head1 TESTING META FILES There are currently 3 distributions to test META files: Test-CPAN-Meta Test-CPAN-Meta-JSON Test-CPAN-Meta-YAML All three have slightly different requirements and are intended to be used in slightly different environments. Test-CPAN-Meta-YAML requires a YAML parser, and currently looks for the YAML or YAML::Syck modules. This is the original variant of the 3 and was intended to provide a more complete YAML validation of a META.yml. Test-CPAN-Meta requires the Parse::CPAN::Meta module, which is now part of Perl Core as of perl-5.10.1. This version is intended to be used by those only wishing to rely on core modules to test their META.yml files. Test-CPAN-Meta-JSON is the most recent addition to the family, and is specifically aimed at those distributions that use a META.json Meta file. The distribution requires the JSON module to parse the Meta file. =head1 BUGS, PATCHES & FIXES There are no known bugs at the time of this release. However, if you spot a bug or are experiencing difficulties that are not explained within the POD documentation, please send an email to barbie@cpan.org or submit a bug to the RT system (http://rt.cpan.org/Public/Dist/Display.html?Name=Test-CPAN-Meta). However, it would help greatly if you are able to pinpoint problems or even supply a patch. Fixes are dependent upon their severity and my availability. Should a fix not be forthcoming, please feel free to (politely) remind me. =head1 SEE ALSO Test::YAML::Valid =head1 AUTHOR Barbie, for Miss Barbell Productions, L =head1 COPYRIGHT AND LICENSE Copyright (C) 2007-2015 Barbie for Miss Barbell Productions This distribution is free software; you can redistribute it and/or modify it under the Artistic Licence v2. =cut Test-CPAN-Meta-0.25/LICENSE0000644000175000017500000000032412522337623014225 0ustar barbiebarbieLICENSE FOR Test-CPAN-Meta This software is copyright © 2007-2015 Barbie for Miss Barbell Productions. This distribution is free software; you can redistribute it and/or modify it under the Artistic Licence v2.Test-CPAN-Meta-0.25/examples/0000755000175000017500000000000012522337624015040 5ustar barbiebarbieTest-CPAN-Meta-0.25/examples/98metatest.t0000644000175000017500000000046712522337623017242 0ustar barbiebarbie#!/usr/bin/perl -w use strict; use Test::More; # Skip if doing a regular install plan skip_all => "Author tests not required for installation" unless ( $ENV{AUTOMATED_TESTING} ); eval "use Test::CPAN::Meta"; plan skip_all => "Test::CPAN::Meta required for testing META.yml files" if $@; meta_yaml_ok(); Test-CPAN-Meta-0.25/examples/examples.txt0000644000175000017500000000075512522337623017425 0ustar barbiebarbieTo see examples for this distribution, it is recommended you read the test scripts included under ./t, which cover the basic usage of the modules. I may add further examples should the need ever arise. If you have any example scripts that use the distribution in an unusual way or make good use of all the features available, please feel free to submit one. If submitting an example script, please sure to include the following in your POD: * Author * License * Copyright Thanks, Barbie. Test-CPAN-Meta-0.25/examples/94metatest.t0000644000175000017500000000203512522337623017227 0ustar barbiebarbie#!/usr/bin/perl -w use strict; use Test::More; # Skip if doing a regular install plan skip_all => "Author tests not required for installation" unless ( $ENV{AUTOMATED_TESTING} ); eval "use Test::CPAN::Meta"; plan skip_all => "Test::CPAN::Meta required for testing META.yml" if $@; plan 'no_plan'; my $meta = meta_spec_ok(undef,undef,@_); use MyDistro; # enter your module name here my $version = $MyDistro::VERSION; # enter your module name here is($meta->{version},$version, 'META.yml distribution version matches'); if($meta->{provides}) { for my $mod (keys %{$meta->{provides}}) { is($meta->{provides}{$mod}{version},$version, "META.yml entry [$mod] version matches distribution version"); eval "require $mod"; my $VERSION = '$' . $mod . '::VERSION'; my $v = eval "$VERSION"; is($meta->{provides}{$mod}{version},$v, "META.json entry [$mod] version matches module version"); isnt($meta->{provides}{$mod}{version},0); } } Test-CPAN-Meta-0.25/MANIFEST0000644000175000017500000000144312522337623014354 0ustar barbiebarbieChanges examples/examples.txt examples/94metatest.t examples/98metatest.t INSTALL LICENSE lib/Test/CPAN/Meta.pm lib/Test/CPAN/Meta/Version.pm Makefile.PL MANIFEST META.json META.yml README t/01use.t t/02metafiles.t t/03metaversion.t t/04metatester.t t/05metaspec.t t/90podtest.t t/91podcover.t t/94metatest.t t/95changedate.t t/96metatest.t t/98metatest.t t/samples/00-META.yml t/samples/01-META.yml t/samples/02-META.yml t/samples/03-META.yml t/samples/04-META.yml t/samples/05-META.yml t/samples/06-META.yml t/samples/07-META.yml t/samples/08-META.yml t/samples/09-META.yml t/samples/10-META.yml t/samples/11-META.yml t/samples/12-META.yml t/samples/13-META.yml t/samples/14-META.yml t/samples/15-META.yml t/samples/16-META.yml t/samples/multibyte.yml t/samples/Template-Provider-Unicode-Japanese.yml Test-CPAN-Meta-0.25/META.json0000644000175000017500000000354712522337623014653 0ustar barbiebarbie{ "name": "Test-CPAN-Meta", "version": "0.25", "abstract": "Validate your CPAN META.json files", "author": ["Barbie "], "license": [ "artistic_2" ], "dynamic_config" : 0, "release_status" : "stable", "meta-spec": { "version": "2", "url": "http://search.cpan.org/dist/CPAN-Meta/lib/CPAN/Meta/Spec.pm" }, "generated_by": "The Hand of Barbie 1.0", "keywords" : [ "qa", "cpan", "testing", "meta", "yaml" ], "prereqs" : { "runtime" : { "requires" : { "perl": "5.006", "IO::File": "0", "Parse::CPAN::Meta": "0.02", "Test::More": "0.62", "Test::Builder": "0" } }, "test" : { "requires": { "Test::More": "0.62", "Test::Builder": "0" }, "recommends": { "Test::CPAN::Meta::JSON": "0", "Test::More": "0.70", "Test::Pod": "1.00", "Test::Pod::Coverage": "0.08" } } }, "provides": { "Test::CPAN::Meta": { "file": "lib/Test/CPAN/Meta.pm", "version": "0.25" }, "Test::CPAN::Meta::Version": { "file": "lib/Test/CPAN/Meta/Version.pm", "version": "0.25" } }, "no_index": { "directory": ["t","examples"] }, "resources": { "license": [ "http://www.perlfoundation.org/artistic_license_2_0" ], "bugtracker": { "web": "http://rt.cpan.org/Public/Dist/Display.html?Name=Test-CPAN-Meta" }, "repository": { "url": "git://github.com/barbie/Test-CPAN-Meta.git", "web": "http://github.com/barbie/Test-CPAN-Meta", "type": "git" } } } Test-CPAN-Meta-0.25/META.yml0000644000175000017500000000215612522337623014476 0ustar barbiebarbie--- #YAML:1.0 name: Test-CPAN-Meta version: 0.25 abstract: Validate your CPAN META.yml files author: - Barbie license: artistic_2 distribution_type: module installdirs: site requires: perl: 5.006 Parse::CPAN::Meta: 0.02 Test::Builder: 0 recommends: Test::Pod: 1.00 Test::Pod::Coverage: 0.08 build_requires: IO::File: 0 Test::More: 0.70 Test::Builder::Tester: 0 provides: Test::CPAN::Meta: file: lib/Test/CPAN/Meta.pm version: 0.25 Test::CPAN::Meta::Version: file: lib/Test/CPAN/Meta/Version.pm version: 0.25 no_index: directory: - t - examples resources: license: http://www.perlfoundation.org/artistic_license_2_0 bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=Test-CPAN-Meta repository: http://github.com/barbie/Test-CPAN-Meta meta-spec: version: 1.4 url: http://module-build.sourceforge.net/META-spec-v1.4.html generated_by: The Hand of Barbie 1.0 Test-CPAN-Meta-0.25/Makefile.PL0000644000175000017500000000116312522337623015174 0ustar barbiebarbie#!/usr/bin/perl use strict; use warnings; use 5.006; use ExtUtils::MakeMaker; WriteMakefile( AUTHOR => 'Barbie ', NAME => 'Test::CPAN::Meta', VERSION_FROM => 'lib/Test/CPAN/Meta.pm', ABSTRACT => 'Validate your CPAN META.yml files', NO_META => 1, PREREQ_PM => { # runtime prereqs 'Parse::CPAN::Meta' => '0.02', 'Test::Builder' => '0', # build/test prereqs 'IO::File' => '0', 'Test::Builder::Tester' => '0', 'Test::More' => '0.70' } );