Subject: | Update metadata to meta-spec 2, include web view of repository, correct EUMM version checks |
Attached is a patch to update the META_MERGE section of the Makefile.PL to use CPAN Meta Spec 2 (https://metacpan.org/pod/CPAN::Meta::Spec) and some related changes:
* In Meta Spec 2 the dynamic_config property was clarified to only represent whether prerequisites are dynamically determined by running Makefile.PL (in practice, this is all it ever meant), so we can set it to 0 because this distribution's prerequisites are static.
* In Meta Spec 2 the repository's web view URL can be included.
* Move the license declaration to the EUMM "LICENSE" attribute, because otherwise EUMM defaults that attribute to "unknown" which is then merged with the one specified in META_MERGE, resulting in two licenses in the metadata when using Meta Spec 2 (which allows multiple licenses). Also correct the name to "perl_5".
* Test the version of EUMM using the UNIVERSAL::VERSION method instead of numeric comparisons, which prevents the previous issue of using numeric comparisons with versions which are not strictly numbers.
I've attempted to copy the existing style.
Subject: | meta_spec_2.patch |
From 13d3155e56dc3d912bd613e4368beb5f4abdecba Mon Sep 17 00:00:00 2001
From: Dan Book <grinnz@grinnz.com>
Date: Wed, 26 Sep 2018 17:27:00 -0400
Subject: Update metadata to meta-spec 2, include web view of repository,
correct EUMM version checks
---
Makefile.PL | 37 +++++++++++++++++++++++++++----------
1 file changed, 27 insertions(+), 10 deletions(-)
diff --git a/Makefile.PL b/Makefile.PL
index abf5060..ffc7c33 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -239,22 +239,31 @@ if ($coverage) {
}
}
-# eval to prevent warnings about versions with _ in them
-my $MM_ver = eval $ExtUtils::MakeMaker::VERSION;
-if ($MM_ver > 6.06) {
+if (eval { ExtUtils::MakeMaker->VERSION('6.06'); 1 }) {
$opts{AUTHOR} = 'Tony Cook <tonyc@cpan.org>, Arnar M. Hrafnkelsson';
$opts{ABSTRACT} = 'Perl extension for Generating 24 bit Images';
}
-if ($MM_ver >= 6.46) {
+if (eval { ExtUtils::MakeMaker->VERSION('6.46'); 1 }) {
+ $opts{LICENSE} = "perl_5";
$opts{META_MERGE} =
{
- recommends =>
+ 'meta-spec' =>
{
- "Parse::RecDescent" => 0
+ version => "2",
+ url => "https://metacpan.org/pod/CPAN::Meta::Spec",
},
- license => "perl",
- dynamic_config => 1,
+ prereqs =>
+ {
+ runtime =>
+ {
+ recommends =>
+ {
+ "Parse::RecDescent" => 0
+ },
+ },
+ },
+ dynamic_config => 0,
no_index =>
{
directory =>
@@ -271,8 +280,16 @@ if ($MM_ver >= 6.46) {
resources =>
{
homepage => "http://imager.perl.org/",
- repository => "git://git.imager.perl.org/imager.git",
- bugtracker => "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Imager",
+ repository =>
+ {
+ url => "git://git.imager.perl.org/imager.git",
+ web => "http://git.imager.perl.org/imager.git",
+ type => "git",
+ },
+ bugtracker =>
+ {
+ web => "https://rt.cpan.org/Dist/Display.html?Name=Imager",
+ },
},
};
}
--
2.14.4