Skip Menu |

This queue is for tickets about the ExtUtils-MakeMaker CPAN distribution.

Report information
The Basics
Id: 96038
Status: resolved
Priority: 0/
Queue: ExtUtils-MakeMaker

People
Owner: Nobody in particular
Requestors: shay [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 6.98
Fixed in: (no value)



Subject: META_MERGE trouble
I'm trying to roll out a new libnet release from https://github.com/steve-m-hay/perl-libnet but the generated META.json and META.yml files have missing resources (the value is just an empty {}). My META_MERGE section says: META_MERGE => { 'meta-spec' => { version => 2 }, resources => { repository => 'https://github.com/steve-m-hay/perl-libnet' } } If I delete the 'meta-spec' key/value then the resources appear as expected, but now the prereqs->test->requires items end up in prereqs->build->requires instead (and the meta-spec is set to 2 anyway)! What is the correct incantation to get prereqs and resources both correct at the same time, or is this a bug in EU::MM? (I'm using version 6.98.)
Attached a minimal example to reproduce. Run "perl Makefile.PL" as-is and it writes MYMETA.json like MYMETA1.json attached here, with resources blank. Comment out 'meta-spec' and retry, it writes MYMETA.json like MYMETA2.json attached here, with test prereqs in the wrong place.
Subject: Foo.tar.gz
Download Foo.tar.gz
application/x-gzip 415b

Message body not shown because it is not plain text.

Subject: MYMETA1.json
{ "abstract" : "unknown", "author" : [ "unknown" ], "dynamic_config" : 0, "generated_by" : "ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.140640", "license" : [ "unknown" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Foo", "no_index" : { "directory" : [ "t", "inc" ] }, "prereqs" : { "build" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "configure" : { "requires" : { "Config" : "0" } }, "runtime" : { "requires" : { "Carp" : "0" } }, "test" : { "requires" : { "Test" : "0" } } }, "release_status" : "stable", "resources" : {}, "version" : "" }
Subject: MYMETA2.json
{ "abstract" : "unknown", "author" : [ "unknown" ], "dynamic_config" : 0, "generated_by" : "ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.140640", "license" : [ "unknown" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Foo", "no_index" : { "directory" : [ "t", "inc" ] }, "prereqs" : { "build" : { "requires" : { "ExtUtils::MakeMaker" : "0", "Test" : "0" } }, "configure" : { "requires" : { "Config" : "0" } }, "runtime" : { "requires" : { "Carp" : "0" } } }, "release_status" : "stable", "resources" : { "repository" : { "url" : "https://github.com/steve-m-hay/Foo" } }, "version" : "" }
On 2014-05-28 10:57:40, SHAY wrote: Show quoted text
> I'm trying to roll out a new libnet release from > https://github.com/steve-m-hay/perl-libnet but the generated META.json > and META.yml files have missing resources (the value is just an empty > {}). My META_MERGE section says: > > META_MERGE => { > 'meta-spec' => { > version => 2 > }, > > resources => { > repository => 'https://github.com/steve-m-hay/perl-libnet' > } > }
resources->repository is a hashref in metaspec 2, not a string -- you should set resources->repository->web (and the type and url keys too - see CPAN::Meta::Spec. Here's an example: https://metacpan.org/source/ETHER/Dist-Zilla-PluginBundle-Author-ETHER-0.064/META.json#L258 Show quoted text
> If I delete the 'meta-spec' key/value then the resources appear as > expected, but now the prereqs->test->requires items end up in prereqs-
> >build->requires instead (and the meta-spec is set to 2 anyway)!
I suspect that your data is being interpreted as v1.4, then upscaled to v2 within CPAN::Meta. or something like that.
CC: shay [...] cpan.org
Subject: Re: [rt.cpan.org #96038] META_MERGE trouble
Date: Thu, 29 May 2014 18:32:57 +0100
To: bug-ExtUtils-MakeMaker [...] rt.cpan.org
From: Steve Hay <steve.m.hay [...] googlemail.com>
On 29 May 2014 17:36, Karen Etheridge via RT <bug-ExtUtils-MakeMaker@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=96038 > > > On 2014-05-28 10:57:40, SHAY wrote:
>> I'm trying to roll out a new libnet release from >> https://github.com/steve-m-hay/perl-libnet but the generated META.json >> and META.yml files have missing resources (the value is just an empty >> {}). My META_MERGE section says: >> >> META_MERGE => { >> 'meta-spec' => { >> version => 2 >> }, >> >> resources => { >> repository => 'https://github.com/steve-m-hay/perl-libnet' >> } >> }
> > resources->repository is a hashref in metaspec 2, not a string -- you should set resources->repository->web (and the type and url keys too - see CPAN::Meta::Spec. > Here's an example: https://metacpan.org/source/ETHER/Dist-Zilla-PluginBundle-Author-ETHER-0.064/META.json#L258 >
Ah, right. Thanks. I actually had a hash ref originally but "simplified" it along the lines of what I'd seen elsewhere after seeing repository information displayed as plain text rather than a link in search.cpan.org, e.g. http://search.cpan.org/~shay/Win32-UTCFileTime-1.57/ Seems like all I actually needed to do was change the git:// URL to an http:// one and all will be well.
Problem now resolved as suggested. Thanks again.