Skip Menu |

This queue is for tickets about the Module-Build CPAN distribution.

Report information
The Basics
Id: 65204
Status: open
Priority: 0/
Queue: Module-Build

People
Owner: Nobody in particular
Requestors: mschwern [...] cpan.org
Cc: adamk [...] cpan.org
DOHERTY [...] cpan.org
ingy [...] cpan.org
AdminCc:

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



CC: adamk [...] cpan.org, ingy [...] cpan.org
Subject: META.yml misinterprets "true" as a prereq
perl5i has had an issue reported by the CPAN testers. It's prerequisite on "true" is being interpreted from the META.yml as "1". Presumably YAML is reading it as boolean true. https://github.com/schwern/perl5i/issues/issue/173/ Module::Build produces a META.yml with this: requires: true: 0.12 Which YAML::XS (via YAML::Any), as of 0.72, interprets as: 'requires' => { '1' => '0.12' }, YAML::Tiny interprets like this: 'requires' => { 'true' => '0.12' }, I don't know if Module::Build needs to quote "true" or YAML::XS is being overzealous. I'll leave it for you all to decide.
Subject: Re: [rt.cpan.org #65204] META.yml misinterprets "true" as a prereq
Date: Thu, 27 Jan 2011 21:58:18 -0500
To: bug-Module-Build [...] rt.cpan.org
From: David Golden <dagolden [...] cpan.org>
On Thu, Jan 27, 2011 at 7:54 PM, Michael G Schwern via RT <bug-Module-Build@rt.cpan.org> wrote: Show quoted text
> Module::Build produces a META.yml with this: > >    requires: >      true: 0.12 > > Which YAML::XS (via YAML::Any), as of 0.72, interprets as: > >    'requires' => { >        '1' => '0.12' >    }, > > YAML::Tiny interprets like this: > >    'requires' => { >        'true' => '0.12' >    },
It's a bug in either YAML::Tiny or YAML::XS. By definition, only YAML::Tiny -- actually, now CPAN::Meta::YAML -- is definitive for parsing CPAN Meta files, so I suggest opening up tickets with Adam and Ingy to sort out who is right and who is wrong. Soon, I'll be getting it all switched over to JSON anyway. Hopefully, that will handle it correctly. -- David
CC: mschwern [...] cpan.org, DOHERTY [...] cpan.org, adamk [...] cpan.org, ingy [...] cpan.org
Subject: Re: [rt.cpan.org #65204] META.yml misinterprets "true" as a prereq
Date: Fri, 28 Jan 2011 14:30:22 +1100
To: bug-Module-Build [...] rt.cpan.org
From: Adam Kennedy <adamkennedybackup [...] gmail.com>
It's in YAML::XS :) The problem with this is that YAML::XS is generally considered the "most correct" implementation, so it's entirely possible that the true --> 1 conversion is correct. This is a problem for me, since YAML::Tiny doesn't support quoted keys. :/ Adam K DB<7> x YAML::Tiny::Load("---\nrequires:\n true: 0.12\n"); 0 HASH(0x12e641c) 'requires' => HASH(0x12dc314) 'true' => 0.12 DB<8> x YAML::Load("---\nrequires:\n true: 0.12\n"); 0 HASH(0xf0d02c) 'requires' => HASH(0xf0d37c) 'true' => 0.12 DB<9> use YAML::XS DB<10> x YAML::XS::Load("---\nrequires:\n true: 0.12\n"); 0 HASH(0x12a888c) 'requires' => HASH(0x1335f1c) 1 => 0.12 On 28 January 2011 13:58, David Golden via RT <bug-Module-Build@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=65204 > > > On Thu, Jan 27, 2011 at 7:54 PM, Michael G Schwern via RT > <bug-Module-Build@rt.cpan.org> wrote:
>> Module::Build produces a META.yml with this: >> >>    requires: >>      true: 0.12 >> >> Which YAML::XS (via YAML::Any), as of 0.72, interprets as: >> >>    'requires' => { >>        '1' => '0.12' >>    }, >> >> YAML::Tiny interprets like this: >> >>    'requires' => { >>        'true' => '0.12' >>    },
> > It's a bug in either YAML::Tiny or YAML::XS.  By definition, only > YAML::Tiny -- actually, now CPAN::Meta::YAML -- is definitive for > parsing CPAN Meta files, so I suggest opening up tickets with Adam and > Ingy to sort out who is right and who is wrong. > > Soon, I'll be getting it all switched over to JSON anyway.  Hopefully, > that will handle it correctly. > > -- David > >