Hello community,
here is the log from the commit of package perl-Test-CPAN-Meta for
openSUSE:Factory checked in at 2013-06-06 12:45:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Test-CPAN-Meta (Old)
and /work/SRC/openSUSE:Factory/.perl-Test-CPAN-Meta.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Test-CPAN-Meta"
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Test-CPAN-Meta/perl-Test-CPAN-Meta.changes
2011-09-23 12:38:58.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.perl-Test-CPAN-Meta.new/perl-Test-CPAN-Meta.changes
2013-06-06 12:45:39.000000000 +0200
@@ -1,0 +2,18 @@
+Tue Jun 4 14:58:02 UTC 2013 - [email protected]
+
+- updated to 0.23
+ - 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'.
+ - RT#76609: further spelling fix. (Florian Schlichting).
+ - removed DSLIP info.
+ - RT#76609: spelling fix. (Florian Schlichting & Gregor Herrmann).
+ - RT#74317: imported url validation from CPAN::Meta (Alex Hartmaier).
+ - RT#66692: updated license type (Paul Howarth).
+ - updates to examples.
+
+-------------------------------------------------------------------
Old:
----
Test-CPAN-Meta-0.18.tar.gz
New:
----
Test-CPAN-Meta-0.23.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Test-CPAN-Meta.spec ++++++
--- /var/tmp/diff_new_pack.yXbxkg/_old 2013-06-06 12:45:40.000000000 +0200
+++ /var/tmp/diff_new_pack.yXbxkg/_new 2013-06-06 12:45:40.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package perl-Test-CPAN-Meta
#
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,15 +16,14 @@
#
-
Name: perl-Test-CPAN-Meta
-Version: 0.18
-Release: 1
-License: GPL-1.0+ or Artistic-1.0
+Version: 0.23
+Release: 0
%define cpan_name Test-CPAN-Meta
-Summary: Validation of the META.yml file in a CPAN distribution.
-Url: http://search.cpan.org/dist/Test-CPAN-Meta/
+Summary: Validate your CPAN META.yml files.
+License: Artistic-2.0
Group: Development/Libraries/Perl
+Url: http://search.cpan.org/dist/Test-CPAN-Meta/
Source:
http://www.cpan.org/authors/id/B/BA/BARBIE/%{cpan_name}-%{version}.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -32,16 +31,18 @@
BuildRequires: perl-macros
BuildRequires: perl(Parse::CPAN::Meta) >= 0.02
BuildRequires: perl(Test::More) >= 0.70
+#BuildRequires: perl(MyDistro)
+#BuildRequires: perl(Test::CPAN::Meta)
+#BuildRequires: perl(Test::CPAN::Meta::Version)
Requires: perl(Parse::CPAN::Meta) >= 0.02
-Requires: perl(Test::More) >= 0.7
-Recommends: perl(Test::More) >= 0.70
+Requires: perl(Test::More) >= 0.70
Recommends: perl(Test::Pod) >= 1.00
Recommends: perl(Test::Pod::Coverage) >= 0.08
%{perl_requires}
%description
-This module was written to ensure that a META.yml file, provided with a
-standard distribution uploaded to CPAN, meets the specifications that are
+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 the ExtUtils::MakeMaker manpage, the Module::Build
manpage and the Module::Install manpage.
@@ -64,9 +65,6 @@
%perl_process_packlist
%perl_gen_filelist
-%clean
-%{__rm} -rf %{buildroot}
-
%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes examples LICENSE README
++++++ Test-CPAN-Meta-0.18.tar.gz -> Test-CPAN-Meta-0.23.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-CPAN-Meta-0.18/Changes
new/Test-CPAN-Meta-0.23/Changes
--- old/Test-CPAN-Meta-0.18/Changes 2011-02-13 15:00:20.000000000 +0100
+++ new/Test-CPAN-Meta-0.23/Changes 2013-04-07 14:49:35.000000000 +0200
@@ -1,95 +1,119 @@
-# Changes log for Test::CPAN::Meta
+# Changes log for Test-CPAN-Meta
-0.18 13/02/2011
- - documentation clean up.
+0.23 2013-04-07
+ - change file dates changed to meet W3CDTF standards.
-0.17 12/04/2010
- - fixed qr// delimiters due to issues with the NOT SIGN symbol
- (suggested by Ricardo Signes & David Golden).
-
-0.16 18/12/2009
- - 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 12/12/2009
- - clarified spec defined and user defined keys, as promoted by Kevin
- Ryde in RT#52685 (thanks Kevin).
-
-0.14 07/12/2009
- - 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 24/05/2009
- - 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 27/06/2008
- - added spec version 1.4
- - added further check to ensure we have a known spec version
-
-0.11 02/06/2008
- - added 'git' as an accepted url protocol (Mischa Poslawsky).
-
-0.10 28/03/2008
- - 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 17/03/2008
- - it helps when you fix all the versioning too!
-
-0.08 17/03/2008
- - fixed licensing list (adding Artistic2). (Bernhard Schmalhofer)
- - value for license is mandatory, but the actual value could be any
+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 10/01/2008
- - 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 05/11/2007
- - fixed RT#29457: distribution_type is not mandatory in spec 1.2 (domm)
-
-0.05 02/11/2007
- - 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 15/05/2007
- - 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 27/02/2007
- - 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.
+ 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 27/02/2007
- Fixed a bug in detecting module name
+0.02 2007-02-27
+ - Fixed a bug in detecting module name
-0.01 27/02/2007
+0.01 2007-02-27
- Initial release.
- - Devel::Cover = 91.7%
+ - Devel::Cover = 91.7%
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-CPAN-Meta-0.18/INSTALL
new/Test-CPAN-Meta-0.23/INSTALL
--- old/Test-CPAN-Meta-0.18/INSTALL 2011-02-13 15:00:20.000000000 +0100
+++ new/Test-CPAN-Meta-0.23/INSTALL 2013-04-07 14:49:35.000000000 +0200
@@ -11,13 +11,13 @@
CPAN:
% perl -MCPAN -e shell [as root]
- > install Test-YAML-Meta
+ > install Test-CPAN-Meta
> quit
CPANPLUS:
% cpanp
- > i Test-YAML-Meta
+ > i Test-CPAN-Meta
> q
See your local 'perldoc CPAN' or 'perldoc CPANPLUS' for
@@ -27,29 +27,29 @@
OBTAINING THE MODULE
--------------------
-The latest release version of Test-YAML-Meta can be downloaded
+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-YAML-Meta/
+ http://search.cpan.org/dist/Test-CPAN-Meta/
Phrasebook is distributed as a gzipped tar archive file:
- Test-YAML-Meta-<version>.tar.gz
+ Test-CPAN-Meta-<version>.tar.gz
where <version> 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-YAML-Meta-0.01.tar.gz
+ tar zxf Test-CPAN-Meta-0.01.tar.gz
or
- gunzip Test-YAML-Meta-0.01.tar.gz
- tar xf Test-YAML-Meta-0.01.tar
+ 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-YAML-Meta-0.01
+ cd Test-CPAN-Meta-0.01
INSTALLING MANUALLY
@@ -88,7 +88,7 @@
+ result of `perl -V'
+ output from 'make test' - ideally do 'make test TEST_VERBOSE=1 >& errs'
-Send those to [email protected] and I'll get back to you as
+Send those to [email protected] and I'll get back to you as
soon as I'm able.
If it worked, then become root and type:
@@ -102,7 +102,7 @@
% cpantest -g pass -nc -p `basename \`pwd\`` -auto
Or:
- % cpantest -g pass -nc -p Test-YAML-Meta-0.01 -auto
+ % 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.
@@ -110,4 +110,3 @@
Cheers,
Barbie.
http://www.missbarbell.co.uk/
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-CPAN-Meta-0.18/LICENSE
new/Test-CPAN-Meta-0.23/LICENSE
--- old/Test-CPAN-Meta-0.18/LICENSE 2011-02-13 15:00:20.000000000 +0100
+++ new/Test-CPAN-Meta-0.23/LICENSE 2013-04-07 14:49:35.000000000 +0200
@@ -1,11 +1,6 @@
LICENSE FOR Test-CPAN-Meta
-This software is copyright � 2007-2011 Barbie for Miss Barbell Productions.
-
-This library is free software; you can redistribute it and/or modify
-it under the terms of the Artistic License 2.0.
-
-The full text of the license can be found at the following URL:
-
-http://www.perlfoundation.org/artistic_license_2_0
+This software is copyright � 2007-2013 Barbie for Miss Barbell Productions.
+This distribution is free software; you can redistribute it and/or
+modify it under the Artistic Licence v2.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-CPAN-Meta-0.18/MANIFEST
new/Test-CPAN-Meta-0.23/MANIFEST
--- old/Test-CPAN-Meta-0.18/MANIFEST 2011-02-13 15:00:20.000000000 +0100
+++ new/Test-CPAN-Meta-0.23/MANIFEST 2013-04-07 14:49:35.000000000 +0200
@@ -1,12 +1,13 @@
Changes
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 This list of files
+MANIFEST
META.yml
README
t/01use.t
@@ -18,6 +19,7 @@
t/91podcover.t
t/94metatest.t
t/95changedate.t
+t/98metatest.t
t/samples/00-META.yml
t/samples/01-META.yml
t/samples/02-META.yml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-CPAN-Meta-0.18/META.yml
new/Test-CPAN-Meta-0.23/META.yml
--- old/Test-CPAN-Meta-0.18/META.yml 2011-02-13 15:00:20.000000000 +0100
+++ new/Test-CPAN-Meta-0.23/META.yml 2013-04-07 14:49:35.000000000 +0200
@@ -1,41 +1,42 @@
--- #YAML:1.0
name: Test-CPAN-Meta
-version: 0.18
-abstract: A test module to validate a CPAN META.yml file.
+version: 0.23
+abstract: Validate your CPAN META.yml files
author:
- Barbie <[email protected]>
-license: perl
+license: artistic_2
distribution_type: module
installdirs: site
requires:
+ perl: 5.006
Parse::CPAN::Meta: 0.02
- Test::More: 0.70
Test::Builder: 0
recommends:
- Test::More: 0.70
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.18
+ version: 0.23
Test::CPAN::Meta::Version:
file: lib/Test/CPAN/Meta/Version.pm
- version: 0.18
+ version: 0.23
no_index:
directory:
- t
- examples
resources:
- license: http://dev.perl.org/licenses/
+ 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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-CPAN-Meta-0.18/Makefile.PL
new/Test-CPAN-Meta-0.23/Makefile.PL
--- old/Test-CPAN-Meta-0.18/Makefile.PL 2011-02-13 15:00:20.000000000 +0100
+++ new/Test-CPAN-Meta-0.23/Makefile.PL 2013-04-07 14:49:35.000000000 +0200
@@ -1,15 +1,27 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+use 5.006;
+
use ExtUtils::MakeMaker;
+
WriteMakefile(
- 'NAME' => 'Test::CPAN::Meta',
- 'VERSION_FROM' => 'lib/Test/CPAN/Meta.pm',
- 'PREREQ_PM' => {
- Parse::CPAN::Meta => 0.02,
- Test::Builder => 0,
- Test::More => 0.70, # for testing
- },
- NO_META => 1,
-
- ($] >= 5.005 ? ## Add these new keywords supported since 5.005
- (ABSTRACT => 'CPAN META.yml testing module',
- AUTHOR => 'Barbie <[email protected]>') : ()),
+ AUTHOR => 'Barbie <[email protected]>',
+ 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'
+
+ }
);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-CPAN-Meta-0.18/README
new/Test-CPAN-Meta-0.23/README
--- old/Test-CPAN-Meta-0.18/README 2011-02-13 15:00:20.000000000 +0100
+++ new/Test-CPAN-Meta-0.23/README 2013-04-07 14:49:35.000000000 +0200
@@ -1,11 +1,11 @@
-Test::CPAN::Meta
-================
+Test-CPAN-Meta
+==============
DESCRIPTION
-Validation of the META.yml file in a CPAN distribution.
+Validate your CPAN META.yml files.
-This module was written to ensure that a META.yml file, provided with a
+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.
@@ -20,18 +20,20 @@
The distribution requires the following modules:
- Parse::CPAN::Meta >= 0.02
- Test::Builder >= 0
+ Parse::CPAN::Meta
+ Test::Builder
For testing purposes, the following modules are required:
- Test::More >= 0.70
+ IO::File
+ Test::More
For testing purposes, the following modules are desireable, but not essential:
- Test::Pod >= 1.00
- Test::Pod::Coverage >= 0.08
- Pod::Coverage
+ Test::CPAN::Meta
+ Test::CPAN::Meta::JSON
+ Test::Pod
+ Test::Pod::Coverage
INSTALLATION
@@ -61,17 +63,9 @@
However, it would help greatly if you are able to pinpoint problems or even
supply a patch.
-Fixes are dependant upon their severity and my availablity. Should a fix not
+Fixes are dependent upon their severity and my availability. Should a fix not
be forthcoming, please feel free to (politely) remind me.
-DSLIP
-
- b - Beta testing
- d - Developer
- p - Perl-only
- O - Object oriented
- p - Standard-Perl: user may choose between GPL and Artistic
-
AUTHOR
Barbie <[email protected]>
@@ -79,11 +73,7 @@
COPYRIGHT AND LICENSE
- Copyright (C) 2007,2008 Barbie for Miss Barbell Productions.
-
- This module is free software; you can redistribute it and/or
- modify it under the same terms as Perl itself.
+ Copyright (C) 2007-2013 Barbie for Miss Barbell Productions
-The full text of the licenses can be found in the Artistic file included with
-this distribution, or in perlartistic file available with your Perl
-installation.
+ This distribution is free software; you can redistribute it and/or
+ modify it under the Artistic Licence v2.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-CPAN-Meta-0.18/examples/94metatest.t
new/Test-CPAN-Meta-0.23/examples/94metatest.t
--- old/Test-CPAN-Meta-0.18/examples/94metatest.t 2011-02-13
15:00:20.000000000 +0100
+++ new/Test-CPAN-Meta-0.23/examples/94metatest.t 2013-04-07
14:49:35.000000000 +0200
@@ -1,24 +1,28 @@
+#!/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 0.12";
-plan skip_all => "Test::CPAN::Meta 0.12 required for testing META.yml" if $@;
+eval "use Test::CPAN::Meta";
+plan skip_all => "Test::CPAN::Meta required for testing META.yml" if $@;
-plan no_plan;
+plan 'no_plan';
-my $yaml = meta_spec_ok(undef,undef,@_);
+my $meta = meta_spec_ok(undef,undef,@_);
-use MyDistro;
+use MyDistro; # enter your module name here
+my $version = $MyDistro::VERSION; # enter your module name here
-is($yaml->{version},$MyDistro::VERSION,
+is($meta->{version},$version,
'META.yml distribution version matches');
-if($yaml->{provides}) {
- for my $mod (keys %{$yaml->{provides}}) {
- is($yaml->{provides}{$mod}{version},$MyDistro::VERSION,
+if($meta->{provides}) {
+ for my $mod (keys %{$meta->{provides}}) {
+ is($meta->{provides}{$mod}{version},$version,
"META.yml entry [$mod] version matches");
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-CPAN-Meta-0.18/examples/98metatest.t
new/Test-CPAN-Meta-0.23/examples/98metatest.t
--- old/Test-CPAN-Meta-0.18/examples/98metatest.t 1970-01-01
01:00:00.000000000 +0100
+++ new/Test-CPAN-Meta-0.23/examples/98metatest.t 2013-04-07
14:49:35.000000000 +0200
@@ -0,0 +1,13 @@
+#!/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();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-CPAN-Meta-0.18/lib/Test/CPAN/Meta/Version.pm
new/Test-CPAN-Meta-0.23/lib/Test/CPAN/Meta/Version.pm
--- old/Test-CPAN-Meta-0.18/lib/Test/CPAN/Meta/Version.pm 2011-02-13
15:00:20.000000000 +0100
+++ new/Test-CPAN-Meta-0.23/lib/Test/CPAN/Meta/Version.pm 2013-04-07
14:49:35.000000000 +0200
@@ -4,13 +4,13 @@
use strict;
use vars qw($VERSION);
-$VERSION = '0.18';
+$VERSION = '0.23';
#----------------------------------------------------------------------------
=head1 NAME
-Test::CPAN::Meta::Version - Validation of META.yml specification elements.
+Test::CPAN::Meta::Version - Validate CPAN META data against the specification
=head1 SYNOPSIS
@@ -18,26 +18,23 @@
=head1 DESCRIPTION
-This module was written to ensure that a META.yml file, provided with a
+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
-L<ExtUtils::MakeMaker>, L<Module::Build> and L<Module::Install>.
+slowly being introduced to module uploads, via the use of package makers and
+installers such as L<ExtUtils::MakeMaker>, L<Module::Build> and
+L<Module::Install>.
This module is meant to be used together with L<Test::CPAN::Meta>, however
the code is self contained enough that you can access it directly.
See L<CPAN::Meta> for further details of the CPAN Meta Specification.
-=head1 ABSTRACT
-
-Validation of META.yml data against the CPAN Meta Specification.
-
=cut
#----------------------------------------------------------------------------
#############################################################################
-#Specification Definitions
#
+#Specification Definitions #
#############################################################################
my %known_specs = (
@@ -130,7 +127,7 @@
# additional user defined key/value pairs
# note we can only validate the key name, as the structure is user defined
- ':key' => { name => \&keyword },
+ ':key' => { name => \&keyword, value => \&anything },
},
'1.3' => {
@@ -191,7 +188,7 @@
# additional user defined key/value pairs
# note we can only validate the key name, as the structure is user defined
- ':key' => { name => \&keyword },
+ ':key' => { name => \&keyword, value => \&anything },
},
# v1.2 is misleading, it seems to assume that a number of fields where created
@@ -256,7 +253,7 @@
# additional user defined key/value pairs
# note we can only validate the key name, as the structure is user defined
- ':key' => { name => \&keyword },
+ ':key' => { name => \&keyword, value => \&anything },
},
# note that the 1.1 spec doesn't specify optional or mandatory fields, what
@@ -281,7 +278,7 @@
# additional user defined key/value pairs
# note we can only validate the key name, as the structure is user defined
- ':key' => { name => \&keyword },
+ ':key' => { name => \&keyword, value => \&anything },
},
# note that the 1.0 spec doesn't specify optional or mandatory fields, what
@@ -303,24 +300,24 @@
# additional user defined key/value pairs
# note we can only validate the key name, as the structure is user defined
- ':key' => { name => \&keyword },
+ ':key' => { name => \&keyword, value => \&anything },
},
);
#############################################################################
-#Code
#
+#Code #
#############################################################################
=head1 CLASS CONSTRUCTOR
=over
-=item * new( yaml => $yaml [, spec => $version] )
+=item * new( data => $data [, spec => $version] )
-The constructor must be passed a valid YAML data structure.
+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 YAML data structure meets the respective
+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.
@@ -334,7 +331,7 @@
# create an attributes hash
my $atts = {
'spec' => $hash{spec},
- 'yaml' => $hash{yaml},
+ 'data' => $hash{data},
};
# create the object
@@ -349,7 +346,7 @@
=item * parse()
-Using the YAML data structure provided with the constructure, attempts to
+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.
@@ -364,10 +361,10 @@
sub parse {
my $self = shift;
- my $data = $self->{yaml};
+ my $data = $self->{data};
unless($self->{spec}) {
- $self->{spec} = $data->{'meta-spec'} &&
$data->{'meta-spec'}->{'version'} ? $data->{'meta-spec'}->{'version'} : '1.0';
+ $self->{spec} = $data->{'meta-spec'} &&
$data->{'meta-spec'}{'version'} ? $data->{'meta-spec'}{'version'} : '1.0';
}
$self->check_map($definitions{$self->{spec}},$data);
@@ -386,12 +383,12 @@
=item * check_map($spec,$data)
-Checks whether a map (or hash) part of the YAML data structure conforms to the
+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 YAML data structure conforms to
+Checks whether a list (or array) part of the data structure conforms to
the appropriate specification definition.
=back
@@ -407,7 +404,7 @@
}
if(ref($data) ne 'HASH') {
- $self->_error( "Expected a map structure from YAML string or file." );
+ $self->_error( "Expected a map structure from data string or file." );
return;
}
@@ -440,7 +437,6 @@
$self->check_list($spec->{':key'}{'list'},$data->{$key});
}
-
} else {
$self->_error( "Unknown key, '$key', found in map structure" );
}
@@ -541,10 +537,10 @@
=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].
+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
+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.
@@ -552,13 +548,18 @@
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.
+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
@@ -572,35 +573,27 @@
return 0;
}
-#my $protocol =
qr!(?:http|https|ftp|afs|news|nntp|mid|cid|mailto|wais|prospero|telnet|gopher)!;
-my $protocol = qr!(?:ftp|http|https|git)!;
-my $badproto = qr!(\w+)://!;
-my $proto = qr!$protocol://(?:[\w]+:\w+@)?!;
-my $atom = qr![a-z\d]!i;
-my $domain =
qr!((($atom(($atom|-)*$atom)?)\.)*([a-zA-Z](($atom|-)*$atom)?))!;
-my $ip = qr!((\d+)(\.(\d+)){3})(:(\d+))?!;
-my $enc = qr!%[a-fA-F\d]{2}!;
-my $legal1 = qr|[a-zA-Z\d\$\-_.+!*\'(),#]|;
-my $legal2 = qr![;:@&=]!;
-my $legal3 = qr!((($legal1|$enc)|$legal2)*)!;
-my $path = qr!\/$legal3(\/$legal3)*!;
-my $query = qr!\?$legal3!;
-my $urlregex = qr!(($proto)?($domain|$ip)(($path)?($query)?)?)!;
+sub _uri_split {
+ return $_[0] =~
m,(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?,;
+}
sub url {
my ($self,$key,$value) = @_;
- if(defined $value) {
- if($value && $value =~ /^$badproto$/) {
- $self->_error( "Domain name required for a valid URL." );
+ 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;
}
- if($value && $value =~ /^$badproto/ && $1 !~ $protocol) {
- $self->_error( "Unknown protocol used in URL." );
+ unless ( $auth ) {
+ $self->_error( "'$value' for '$key' does not have a URL
authority" );
return 0;
}
- return 1 if($value && $value =~ /^$urlregex$/);
+ return 1;
+ } else {
+ $value = '<undef>';
}
- $value ||= '';
$self->_error( "'$value' for '$key' is not a valid URL." );
return 0;
}
@@ -710,7 +703,7 @@
sub resource {
my ($self,$key) = @_;
if(defined $key) {
- # a valid user defined key should be alphabetic
+ # 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 {
@@ -723,8 +716,8 @@
sub keyword {
my ($self,$key) = @_;
if(defined $key) {
- return 1 if($key && $key =~ /^([-_a-z]+)$/); # spec defined
- return 1 if($key && $key =~ /^x_([-_a-z]+)$/i); # user defined
+ 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 = '<undef>';
}
@@ -754,6 +747,8 @@
return 0;
}
+sub anything { return 1 }
+
sub _error {
my $self = shift;
my $mess = shift;
@@ -764,7 +759,7 @@
push @{$self->{errors}}, $mess;
}
-q( Currently Listening To: Gary Numan - "This Wreckage" from 'Scarred');
+q( "Before software can be reusable it first has to be usable." - Ralph
Johnson );
__END__
@@ -779,17 +774,9 @@
However, it would help greatly if you are able to pinpoint problems or even
supply a patch.
-Fixes are dependant upon their severity and my availablity. Should a fix not
+Fixes are dependent upon their severity and my availability. Should a fix not
be forthcoming, please feel free to (politely) remind me.
-=head1 DSLIP
-
- b - Beta testing
- d - Developer
- p - Perl-only
- O - Object oriented
- p - Standard-Perl: user may choose between GPL and Artistic
-
=head1 AUTHOR
Barbie, <[email protected]>
@@ -797,9 +784,9 @@
=head1 COPYRIGHT AND LICENSE
- Copyright (C) 2007-2011 Barbie for Miss Barbell Productions
+ Copyright (C) 2007-2013 Barbie for Miss Barbell Productions
- This module is free software; you can redistribute it and/or
+ This distribution is free software; you can redistribute it and/or
modify it under the Artistic Licence v2.
=cut
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-CPAN-Meta-0.18/lib/Test/CPAN/Meta.pm
new/Test-CPAN-Meta-0.23/lib/Test/CPAN/Meta.pm
--- old/Test-CPAN-Meta-0.18/lib/Test/CPAN/Meta.pm 2011-02-13
15:00:20.000000000 +0100
+++ new/Test-CPAN-Meta-0.23/lib/Test/CPAN/Meta.pm 2013-04-07
14:49:35.000000000 +0200
@@ -4,13 +4,13 @@
use strict;
use vars qw($VERSION);
-$VERSION = '0.18';
+$VERSION = '0.23';
#----------------------------------------------------------------------------
=head1 NAME
-Test::CPAN::Meta - Validation of the META.yml file in a CPAN distribution.
+Test::CPAN::Meta - Validate your CPAN META.yml files.
=head1 SYNOPSIS
@@ -48,7 +48,7 @@
=head1 DESCRIPTION
-This module was written to ensure that a META.yml file, provided with a
+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<ExtUtils::MakeMaker>, L<Module::Build> and
@@ -56,16 +56,12 @@
See L<CPAN::Meta> for further details of the CPAN Meta Specification.
-=head1 ABSTRACT
-
-A test module to validate a CPAN META.yml file.
-
=cut
#----------------------------------------------------------------------------
#############################################################################
-#Library Modules
#
+#Library Modules #
#############################################################################
use Parse::CPAN::Meta;
@@ -88,7 +84,7 @@
}
#############################################################################
-#Interface Functions
#
+#Interface Functions #
#############################################################################
=head1 FUNCTIONS
@@ -121,7 +117,7 @@
=cut
sub meta_spec_ok {
- my ($file, $vers, $msg) = @_;
+ my ($file, $vers, $msg) = @_;
$file ||= 'META.yml';
unless($msg) {
@@ -129,7 +125,7 @@
$msg .= " ($vers)" if($vers);
}
- my ($yaml) = eval { Parse::CPAN::Meta::LoadFile($file) };
+ my ($data) = eval { Parse::CPAN::Meta::LoadFile($file) };
if($@) {
$Test->ok(0,"$file contains valid YAML");
@@ -142,7 +138,7 @@
my %hash;
$hash{spec} = $vers if($vers);
- $hash{yaml} = $yaml;
+ $hash{data} = $data;
my $spec = Test::CPAN::Meta::Version->new(%hash);
if(my $result = $spec->parse()) {
@@ -152,10 +148,10 @@
$Test->ok(1,$msg);
}
- return $yaml;
+ return $data;
}
-q( Currently Listening To: Nine Inch Nails - "Head Down" from 'The Slip');
+q( "Before software can be reusable it first has to be usable." - Ralph
Johnson );
__END__
@@ -170,14 +166,14 @@
Test-CPAN-Meta-YAML
All three have slightly different requirements and are intended to be used in
-slightly different environments.
+slightly different environments.
-Test-CPAN-Meta-YAML requires a YAML parser, and currently looks for the YAML
or
+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
+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
@@ -193,21 +189,13 @@
However, it would help greatly if you are able to pinpoint problems or even
supply a patch.
-Fixes are dependant upon their severity and my availablity. Should a fix not
+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 DSLIP
-
- b - Beta testing
- d - Developer
- p - Perl-only
- O - Object oriented
- p - Standard-Perl: user may choose between GPL and Artistic
-
=head1 AUTHOR
Barbie, <[email protected]>
@@ -215,9 +203,9 @@
=head1 COPYRIGHT AND LICENSE
- Copyright (C) 2007-2011 Barbie for Miss Barbell Productions
+ Copyright (C) 2007-2013 Barbie for Miss Barbell Productions
- This module is free software; you can redistribute it and/or
- modify it under the same terms as Perl itself.
+ This distribution is free software; you can redistribute it and/or
+ modify it under the Artistic Licence v2.
=cut
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-CPAN-Meta-0.18/t/01use.t
new/Test-CPAN-Meta-0.23/t/01use.t
--- old/Test-CPAN-Meta-0.18/t/01use.t 2011-02-13 15:00:20.000000000 +0100
+++ new/Test-CPAN-Meta-0.23/t/01use.t 2013-04-07 14:49:35.000000000 +0200
@@ -7,4 +7,3 @@
use_ok( 'Test::CPAN::Meta' );
use_ok( 'Test::CPAN::Meta::Version' );
}
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-CPAN-Meta-0.18/t/02metafiles.t
new/Test-CPAN-Meta-0.23/t/02metafiles.t
--- old/Test-CPAN-Meta-0.18/t/02metafiles.t 2011-02-13 15:00:20.000000000
+0100
+++ new/Test-CPAN-Meta-0.23/t/02metafiles.t 2013-04-07 14:49:35.000000000
+0200
@@ -29,7 +29,7 @@
);
for my $test (@tests) {
- my ($yaml) = eval { Parse::CPAN::Meta::LoadFile($test->{file}) };
+ my ($data) = eval { Parse::CPAN::Meta::LoadFile($test->{file}) };
if($@) {
ok(0,"Cannot load file - $test->{file}");
@@ -37,7 +37,7 @@
next;
}
- my $spec = Test::CPAN::Meta::Version->new(spec => $vers, yaml => $yaml);
+ my $spec = Test::CPAN::Meta::Version->new(spec => $vers, data => $data);
my $result = $spec->parse();
my @errors = $spec->errors();
@@ -52,14 +52,14 @@
}
for my $test (@tests) {
- my ($yaml) = eval { Parse::CPAN::Meta::LoadFile($test->{file}) };
+ 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(yaml => $yaml);
+ my $spec = Test::CPAN::Meta::Version->new(data => $data);
my $result = $spec->parse();
my @errors = $spec->errors();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-CPAN-Meta-0.18/t/03metaversion.t
new/Test-CPAN-Meta-0.23/t/03metaversion.t
--- old/Test-CPAN-Meta-0.18/t/03metaversion.t 2011-02-13 15:00:20.000000000
+0100
+++ new/Test-CPAN-Meta-0.23/t/03metaversion.t 2013-04-07 14:49:35.000000000
+0200
@@ -13,7 +13,7 @@
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','test://module-build.sourceforge.net/META-spec-v1.3.html'),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);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-CPAN-Meta-0.18/t/04metatester.t
new/Test-CPAN-Meta-0.23/t/04metatester.t
--- old/Test-CPAN-Meta-0.18/t/04metatester.t 2011-02-13 15:00:20.000000000
+0100
+++ new/Test-CPAN-Meta-0.23/t/04metatester.t 2013-04-07 14:49:35.000000000
+0200
@@ -44,4 +44,3 @@
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");
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-CPAN-Meta-0.18/t/90podtest.t
new/Test-CPAN-Meta-0.23/t/90podtest.t
--- old/Test-CPAN-Meta-0.18/t/90podtest.t 2011-02-13 15:00:20.000000000
+0100
+++ new/Test-CPAN-Meta-0.23/t/90podtest.t 2013-04-07 14:49:35.000000000
+0200
@@ -1,3 +1,6 @@
+#!/usr/bin/perl -w
+use strict;
+
use Test::More;
# Skip if doing a regular install
@@ -7,4 +10,3 @@
eval "use Test::Pod 1.00";
plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
all_pod_files_ok();
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-CPAN-Meta-0.18/t/91podcover.t
new/Test-CPAN-Meta-0.23/t/91podcover.t
--- old/Test-CPAN-Meta-0.18/t/91podcover.t 2011-02-13 15:00:20.000000000
+0100
+++ new/Test-CPAN-Meta-0.23/t/91podcover.t 2013-04-07 14:49:35.000000000
+0200
@@ -1,3 +1,6 @@
+#!/usr/bin/perl -w
+use strict;
+
use Test::More;
# Skip if doing a regular install
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-CPAN-Meta-0.18/t/94metatest.t
new/Test-CPAN-Meta-0.23/t/94metatest.t
--- old/Test-CPAN-Meta-0.18/t/94metatest.t 2011-02-13 15:00:20.000000000
+0100
+++ new/Test-CPAN-Meta-0.23/t/94metatest.t 2013-04-07 14:49:35.000000000
+0200
@@ -1,3 +1,6 @@
+#!/usr/bin/perl -w
+use strict;
+
use Test::More;
# Skip if doing a regular install
@@ -7,16 +10,19 @@
eval "use Test::CPAN::Meta";
plan skip_all => "Test::CPAN::Meta required for testing META.yml" if $@;
-plan no_plan;
+plan 'no_plan';
+
+my $meta = meta_spec_ok(undef,undef,@_);
-my $yaml = meta_spec_ok(undef,undef,@_);
+use Test::CPAN::Meta;
+my $version = $Test::CPAN::Meta::VERSION;
-is($yaml->{version},$Test::CPAN::Meta::VERSION,
+is($meta->{version},$version,
'META.yml distribution version matches');
-if($yaml->{provides}) {
- for my $mod (keys %{$yaml->{provides}}) {
- is($yaml->{provides}{$mod}{version},$Test::CPAN::Meta::VERSION,
+if($meta->{provides}) {
+ for my $mod (keys %{$meta->{provides}}) {
+ is($meta->{provides}{$mod}{version},$version,
"META.yml entry [$mod] version matches");
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-CPAN-Meta-0.18/t/95changedate.t
new/Test-CPAN-Meta-0.23/t/95changedate.t
--- old/Test-CPAN-Meta-0.18/t/95changedate.t 2011-02-13 15:00:20.000000000
+0100
+++ new/Test-CPAN-Meta-0.23/t/95changedate.t 2013-04-07 14:49:35.000000000
+0200
@@ -1,6 +1,8 @@
-use Test::More;
+#!/usr/bin/perl -w
+use strict;
+
use IO::File;
-use Test::CPAN::Meta;
+use Test::More;
# Skip if doing a regular install
plan skip_all => "Author tests not required for installation"
@@ -8,13 +10,31 @@
my $fh = IO::File->new('Changes','r') or plan skip_all => "Cannot open
Changes file";
-plan no_plan;
+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!^$Test::CPAN::Meta::VERSION!);
- like($_, qr!\d[\d._]+\s+\d{2}/\d{2}/\d{4}!,'... version has a date');
+ $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');
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-CPAN-Meta-0.18/t/98metatest.t
new/Test-CPAN-Meta-0.23/t/98metatest.t
--- old/Test-CPAN-Meta-0.18/t/98metatest.t 1970-01-01 01:00:00.000000000
+0100
+++ new/Test-CPAN-Meta-0.23/t/98metatest.t 2013-04-07 14:49:35.000000000
+0200
@@ -0,0 +1,13 @@
+#!/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();
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]