Skip Menu |

This queue is for tickets about the MooseX-Types-DateTime-MoreCoercions CPAN distribution.

Report information
The Basics
Id: 90138
Status: resolved
Priority: 0/
Queue: MooseX-Types-DateTime-MoreCoercions

People
Owner: ether [...] cpan.org
Requestors: LVALIUKAS [...] cpan.org
Cc: ether [...] cpan.org
tsibley [...] cpan.org
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: 0.12



Subject: META.yml doesn't include "provides" section
Hello! META.yml of the module doesn't include a "provides" section which is useful for keeping track of module dependency trees with, say, Carton (http://search.cpan.org/perldoc?Carton). This is an easy fix, see the attached patch. I would be thankful if you could release a new version of your module with this tiny update! Regards, LV
Subject: moosex-types-datetime-morecoercions-provides.diff
--- META.yml.orig 2012-12-11 14:33:36.000000000 +0200 +++ META.yml 2013-11-08 02:47:57.000000000 +0200 @@ -22,6 +22,10 @@ directory: - inc - t +provides: + MooseX::Types::DateTime::MoreCoercions: + file: lib/MooseX/Types/DateTime/MoreCoercions.pm + version: 0.11 requires: DateTime: 0.4302 DateTime::Duration: 0.4302
The problem with the META.yml and carton is not the lack of a 'provides' section, it is the CPAN::Meta->load_file fails for the current META.yml, so no 'provides' is created. See https://github.com/miyagawa/cpanminus/pull/386
On Sat May 24 09:16:02 2014, GSHANK wrote: Show quoted text
> The problem with the META.yml and carton is not the lack of a > 'provides' section, it is the CPAN::Meta->load_file fails for the > current META.yml, so no 'provides' is created. See > https://github.com/miyagawa/cpanminus/pull/386
Strangely, I'm not seeing a failure with CPAN::Meta->load_file and the META.yml when run outside of cpanm. But it's definitely blowing up in cpanm, and without a useful error message too.
The version of Parse::CPAN::Meta (1.4407) blows up on a UF8 character (non-visible) in the first lines of the yaml file: 0 Malformed UTF-8 character (fatal) at /usr/share/perl/5.14/dumpvar.pl line 78. at /usr/share/perl/5.14/dumpvar.pl line 78. dumpvar::stringify("---\x{a}abstract: 'Extensions to L<MooseX::Types::DateTime>'\x{a}auth"..., "") called at /usr/share/perl/5.14/dumpvar.pl line 132 dumpvar::DumpElem("---\x{a}abstract: 'Extensions to L<MooseX::Types::DateTime>'\x{a}auth"..., 3, 2) called at /usr/share/perl/5.14/dumpvar.pl line I retyped the first few lines and it worked.
From: lvaliukas [...] cyber.law.harvard.edu
Thanks Gshank, good catch! Two fixes then: * I've reencoded author's name in order to make META.yml a valid YAML document: https://github.com/pypt/p5-MooseX-Types-DateTime-MoreCoercions/commit/e707e868961a893458b4a7898f1dd795e215e270 * Also, I still think that META.yml would make use of a "requires" section: https://github.com/pypt/p5-MooseX-Types-DateTime-MoreCoercions/commit/2b7b0bbcbf54d2424c585d025cf0bfbd1e189f4e On Sat May 24 09:48:43 2014, GSHANK wrote: Show quoted text
> The version of Parse::CPAN::Meta (1.4407) blows up on a UF8 character > (non-visible) in the first lines of the yaml file: > 0 Malformed UTF-8 character (fatal) at > /usr/share/perl/5.14/dumpvar.pl line 78. > at /usr/share/perl/5.14/dumpvar.pl line 78. > dumpvar::stringify("---\x{a}abstract: 'Extensions to > L<MooseX::Types::DateTime>'\x{a}auth"..., "") called at > /usr/share/perl/5.14/dumpvar.pl line 132 > dumpvar::DumpElem("---\x{a}abstract: 'Extensions to > L<MooseX::Types::DateTime>'\x{a}auth"..., 3, 2) called at > /usr/share/perl/5.14/dumpvar.pl line > I retyped the first few lines and it worked.
On Tue May 27 06:29:00 2014, lvaliukas@cyber.law.harvard.edu wrote: Show quoted text
> * Also, I still think that META.yml would make use of a "requires" > section: https://github.com/pypt/p5-MooseX-Types-DateTime- > MoreCoercions/commit/2b7b0bbcbf54d2424c585d025cf0bfbd1e189f4e >
I think you meant a 'provides' section. But cpanm won't use it when installing. It gets the provides from the installed packages (using ParsePM). See App::cpanminus::script::extract_packages.
From: lvaliukas [...] cyber.law.harvard.edu
Yeah, that's "provides" -- sorry! Our problem with the absence of the "provides" section is that we're using Carton (http://search.cpan.org/~miyagawa/Carton-v1.0.12/lib/Carton.pm) for keeping track of the dependencies, and Carton pretty much requires that section. So, while CPANminus is able to install the module without the "provides" section just fine, it breaks our tool of choice. Other modules have "provides" section in META.yml, and this was an easy fix anyway, so I figured someone could merge this tiny patch real quick. On Tue May 27 18:30:29 2014, GSHANK wrote: Show quoted text
> I think you meant a 'provides' section. But cpanm won't use it when > installing. It gets the provides from the installed packages (using > ParsePM). See App::cpanminus::script::extract_packages.
fixed in version 0.12 release.