Skip Menu |

This queue is for tickets about the Parse-CPAN-Meta CPAN distribution.

Report information
The Basics
Id: 46148
Status: resolved
Priority: 0/
Queue: Parse-CPAN-Meta

People
Owner: Nobody in particular
Requestors: perl [...] galumph.com
Cc:
AdminCc:

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



Subject: Parse::CPAN::Meta cannot handle META.yml generated by Module::Build 0.33 based upon code that uses version.pm.
Date: Sat, 16 May 2009 20:19:52 -0500
To: bug-parse-cpan-meta [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
The attached is a META.yml (with real modules anonymized) that was generated by Module::Build. The core module of the distribution uses version.pm. LoadFile() on this file causes Parse::CPAN::Meta to die with the message "Parse::CPAN::Meta does not support a feature in line ' original: v1.10.146560'".
--- name: My-Constants version: v1.10.146560 author: - 'Blah <blrfl@blrfl.com>' abstract: Placeholder module for distribution dealing with general sets of constants. license: restrictive configure_requires: My::Module::Build: &1 !!perl/hash:version original: v1.10.146560 qv: 1 version: - 1 - 10 - 146560 requires: Exporter: 0 Readonly: 0 Readonly::XS: 0 strict: 0 utf8: 0 version: 0 warnings: 0 build_requires: English: 0 File::Find: 0 File::Slurp: 0 File::Which: 0 IPC::Open2: 0 My::Module::Build: *1 My::Utilities::Testing: 0 Perl::Critic::Bangs: 0 Perl::Critic::More: 0 Perl::Critic::Swift: 0 Perl::MinimumVersion: 0 Pod::Spell: 0 Regexp::Parser: 0 Test::Class: 0 Test::Compile: 0 Test::More: 0 Test::Perl::Critic: 0 Test::Pod: 0 Test::Pod::Coverage: 0 Text::ParseWords: 0 charnames: 0 parent: 0 dynamic_config: 1 provides: My::Constants: file: lib/My/Constants.pm version: v1.10.146560 My::Constants::Boolean: file: lib/My/Constants/Boolean.pm version: v1.10.146560 My::Constants::Character: file: lib/My/Constants/Character.pm version: v1.10.146560 My::Constants::Time: file: lib/My/Constants/Time.pm version: v1.10.146560 generated_by: Module::Build version 0.33 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4
Subject: Re: [rt.cpan.org #46148] AutoReply: Parse::CPAN::Meta cannot handle META.yml generated by Module::Build 0.33 based upon code that uses version.pm.
Date: Sat, 16 May 2009 20:28:19 -0500
To: bug-Parse-CPAN-Meta [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
Show quoted text
> The attached is a META.yml (with real modules anonymized) that was > generated by Module::Build. The core module of the distribution uses > version.pm.
Whoops. While the core module uses version.pm, that's not the real issue. The real issue is that I've got a custom M::B subclass which uses version.pm and sticks itself into configure_requires.
This is not a bug in Parse::CPAN::Meta. The "YAML Tiny" subset of YAML that is used for META.yml forbids the use of anchors or embedded objects (regardless of whether they are version.pm or otherwise). This is a bug in Module::Build, it forgot to serialize the version object in configure_requires before writing it into the META.yml. Module::Build should probably do this in the general case anyway, objects shouldn't be getting past it into the file.
Subject: Re: [rt.cpan.org #46148] Parse::CPAN::Meta cannot handle META.yml generated by Module::Build 0.33 based upon code that uses version.pm.
Date: Mon, 18 May 2009 03:35:30 +1000
To: bug-Parse-CPAN-Meta [...] rt.cpan.org
From: Adam Kennedy <adamkennedybackup [...] gmail.com>
This is the correct behaviour. Parse::CPAN::Meta does not, and will not, supported features of YAML outside of the core "JSON-compatible" set. That is, Parse::CPAN::Meta does not support anchors (which are used to create circular references) and does not support embedded objects (a major potential security violation). Further, since version.pm played no part in the serialisation, Module::Build has completely pissed all over encapsulation by dumping the raw internals of the version.pm object into the file in a completely non-future-proof way. It's up to Module::Build to serialize and flatten embedded objects when writing them into META.yml. Closing as NOTABUG. Adam K 2009/5/17 Elliot Shank via RT <bug-Parse-CPAN-Meta@rt.cpan.org>: Show quoted text
> Sat May 16 21:20:19 2009: Request 46148 was acted upon. > Transaction: Ticket created by clonezone >       Queue: Parse-CPAN-Meta >     Subject: Parse::CPAN::Meta cannot handle META.yml generated by Module::Build 0.33 based upon code that uses version.pm. >   Broken in: (no value) >    Severity: (no value) >       Owner: Nobody >  Requestors: perl@galumph.com >      Status: new >  Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=46148 > > > > The attached is a META.yml (with real modules anonymized) that was generated by Module::Build.  The core module of the distribution uses version.pm. > > LoadFile() on this file causes Parse::CPAN::Meta to die with the message "Parse::CPAN::Meta does not support a feature in line '    original: v1.10.146560'". > > > --- > name: My-Constants > version: v1.10.146560 > author: >  - 'Blah <blrfl@blrfl.com>' > abstract: Placeholder module for distribution dealing with general sets of constants. > license: restrictive > configure_requires: >  My::Module::Build: &1 !!perl/hash:version >    original: v1.10.146560 >    qv: 1 >    version: >      - 1 >      - 10 >      - 146560 > requires: >  Exporter: 0 >  Readonly: 0 >  Readonly::XS: 0 >  strict: 0 >  utf8: 0 >  version: 0 >  warnings: 0 > build_requires: >  English: 0 >  File::Find: 0 >  File::Slurp: 0 >  File::Which: 0 >  IPC::Open2: 0 >  My::Module::Build: *1 >  My::Utilities::Testing: 0 >  Perl::Critic::Bangs: 0 >  Perl::Critic::More: 0 >  Perl::Critic::Swift: 0 >  Perl::MinimumVersion: 0 >  Pod::Spell: 0 >  Regexp::Parser: 0 >  Test::Class: 0 >  Test::Compile: 0 >  Test::More: 0 >  Test::Perl::Critic: 0 >  Test::Pod: 0 >  Test::Pod::Coverage: 0 >  Text::ParseWords: 0 >  charnames: 0 >  parent: 0 > dynamic_config: 1 > provides: >  My::Constants: >    file: lib/My/Constants.pm >    version: v1.10.146560 >  My::Constants::Boolean: >    file: lib/My/Constants/Boolean.pm >    version: v1.10.146560 >  My::Constants::Character: >    file: lib/My/Constants/Character.pm >    version: v1.10.146560 >  My::Constants::Time: >    file: lib/My/Constants/Time.pm >    version: v1.10.146560 > generated_by: Module::Build version 0.33 > meta-spec: >  url: http://module-build.sourceforge.net/META-spec-v1.4.html >  version: 1.4 > >
Subject: Re: [rt.cpan.org #46148] Parse::CPAN::Meta cannot handle META.yml generated by Module::Build 0.33 based upon code that uses version.pm.
Date: Mon, 18 May 2009 03:41:09 +1000
To: bug-Parse-CPAN-Meta [...] rt.cpan.org
From: Adam Kennedy <adamkennedybackup [...] gmail.com>
Apologies for the double response and the rather acid tone, saw the bug reported in email and thought that it was a different and nearly identical report, rather than just me rereading the original one. Adam K 2009/5/18 Adam Kennedy via RT <bug-Parse-CPAN-Meta@rt.cpan.org>: Show quoted text
>       Queue: Parse-CPAN-Meta >  Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=46148 > > > This is the correct behaviour. > > Parse::CPAN::Meta does not, and will not, supported features of YAML > outside of the core "JSON-compatible" set. > > That is, Parse::CPAN::Meta does not support anchors (which are used to > create circular references) and does not support embedded objects (a > major potential security violation). > > Further, since version.pm played no part in the serialisation, > Module::Build has completely pissed all over encapsulation by dumping > the raw internals of the version.pm object into the file in a > completely non-future-proof way. > > It's up to Module::Build to serialize and flatten embedded objects > when writing them into META.yml. > > Closing as NOTABUG. > > Adam K > > 2009/5/17 Elliot Shank via RT <bug-Parse-CPAN-Meta@rt.cpan.org>:
>> Sat May 16 21:20:19 2009: Request 46148 was acted upon. >> Transaction: Ticket created by clonezone >>       Queue: Parse-CPAN-Meta >>     Subject: Parse::CPAN::Meta cannot handle META.yml generated by Module::Build 0.33 based upon code that uses version.pm. >>   Broken in: (no value) >>    Severity: (no value) >>       Owner: Nobody >>  Requestors: perl@galumph.com >>      Status: new >>  Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=46148 > >> >> >> The attached is a META.yml (with real modules anonymized) that was generated by Module::Build.  The core module of the distribution uses version.pm. >> >> LoadFile() on this file causes Parse::CPAN::Meta to die with the message "Parse::CPAN::Meta does not support a feature in line '    original: v1.10.146560'". >> >> >> --- >> name: My-Constants >> version: v1.10.146560 >> author: >>  - 'Blah <blrfl@blrfl.com>' >> abstract: Placeholder module for distribution dealing with general sets of constants. >> license: restrictive >> configure_requires: >>  My::Module::Build: &1 !!perl/hash:version >>    original: v1.10.146560 >>    qv: 1 >>    version: >>      - 1 >>      - 10 >>      - 146560 >> requires: >>  Exporter: 0 >>  Readonly: 0 >>  Readonly::XS: 0 >>  strict: 0 >>  utf8: 0 >>  version: 0 >>  warnings: 0 >> build_requires: >>  English: 0 >>  File::Find: 0 >>  File::Slurp: 0 >>  File::Which: 0 >>  IPC::Open2: 0 >>  My::Module::Build: *1 >>  My::Utilities::Testing: 0 >>  Perl::Critic::Bangs: 0 >>  Perl::Critic::More: 0 >>  Perl::Critic::Swift: 0 >>  Perl::MinimumVersion: 0 >>  Pod::Spell: 0 >>  Regexp::Parser: 0 >>  Test::Class: 0 >>  Test::Compile: 0 >>  Test::More: 0 >>  Test::Perl::Critic: 0 >>  Test::Pod: 0 >>  Test::Pod::Coverage: 0 >>  Text::ParseWords: 0 >>  charnames: 0 >>  parent: 0 >> dynamic_config: 1 >> provides: >>  My::Constants: >>    file: lib/My/Constants.pm >>    version: v1.10.146560 >>  My::Constants::Boolean: >>    file: lib/My/Constants/Boolean.pm >>    version: v1.10.146560 >>  My::Constants::Character: >>    file: lib/My/Constants/Character.pm >>    version: v1.10.146560 >>  My::Constants::Time: >>    file: lib/My/Constants/Time.pm >>    version: v1.10.146560 >> generated_by: Module::Build version 0.33 >> meta-spec: >>  url: http://module-build.sourceforge.net/META-spec-v1.4.html >>  version: 1.4 >> >>
> >