Skip Menu |

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

Report information
The Basics
Id: 52685
Status: resolved
Priority: 0/
Queue: Test-YAML-Meta

People
Owner: Nobody in particular
Requestors: user42 [...] zip.com.au
Cc:
AdminCc:

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



Subject: optional_features with upper-case key
Date: Sat, 12 Dec 2009 07:24:42 +1100
To: bug-Test-YAML-Meta [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
With Test::YAML::Meta 0.13 and recent debian i386 perl 5.10.1, checking the META.yml below perl -MTest::YAML::Meta -e 'meta_yaml_ok()' gives # ERR: Missing mandatory field, 'abstract' (abstract) [Validation: 1.4] # ERR: Key 'source_FQ' is not a legal keyword. (optional_features -> source_FQ) [Validation: 1.4] where I hopped upper-case in the feature name would be accepted. The spec seems to be silent on what feature names should look like, so you'd presume anything is fine. Though I suppose non-ascii or unprintables would be asking for trouble! Upper case is pretty likely in an abbreviation (which is how I struck it), so you'd hope that it would be allowed if nothing else.
--- #YAML:1.0 name: foo version: 1 generated_by: hand license: gpl author: - Me <me@me-me-me.org> meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 optional_features: source_FQ: description: Something needing Finance::Quote. requires: Finance::Quote: 0
Although not explicitly stated in the current specifications (v1.0 - v1.4), the convention has been to precede user defined keys with "[xX]_". However, the three META.yml test distributions have so far omitted this. I have now updated all three to accept user defined keys, as defined in the current blead version of v2.0 of the specification: http://github.com/dagolden/cpan-meta-spec/blob/master/META-spec.pod#structure Fixed in: Test-CPAN-Meta-0.15 Test-JSON-Meta-0.03 Test-YAML-Meta-0.14
Subject: Re: [rt.cpan.org #52685] optional_features with upper-case key
Date: Sun, 13 Dec 2009 09:34:55 +1100
To: bug-Test-YAML-Meta [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
"Barbie via RT" <bug-Test-YAML-Meta@rt.cpan.org> writes: Show quoted text
> > Although not explicitly stated in the current specifications (v1.0 - > v1.4), the convention has been to precede user defined keys with > "[xX]_".
That doesn't sound right for the optional features names. The effect would be that anything is allowed in lower case, but if you want upper case you must write x_. That x_ bit is for extensions to maps with spec-defined keys isn't it? In the optional features names there isn't anything spec-defined, it's all user-defined names, and you're free to write anything, isn't it? Either way it would help for the spec to say something there, as I can't imagine I'll be the last to wonder what it is or isn't supposed to be. Show quoted text
> as defined in the current blead version of v2.0 of the specification:
Sounds a bit dangerous to enforce future spec against META.yml's which only declare themselves as 1.4 or whatever. But my reading of that x_ would be that in 1.4 no unknown keys are allowed (toplevel, requires maps, etc), but 2.0 allows unknown keys if they begin x_, ie. a loosening ...
An optional_features keyword is now accepted as a string matching the regex qr/^[a-z][a-z_]+$/i. This will be clarified in meta-spec-2.0. Fixed in: Test-CPAN-Meta-0.16 Test-JSON-Meta-0.04 Test-YAML-Meta-0.15
Subject: Re: [rt.cpan.org #52685] optional_features with upper-case key
Date: Mon, 21 Dec 2009 12:02:42 +1100
To: bug-Test-YAML-Meta [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
"Barbie via RT" <bug-Test-YAML-Meta@rt.cpan.org> writes: Show quoted text
> > qr/^[a-z][a-z_]+$/i
Sounds likely. Is there a reason to disallow digits? Someone will want "support_rss20" or something one day. Digits would make it a perl symbol/word thingie more or less.
Show quoted text
> Is there a reason to disallow digits? Someone will want > "support_rss20" or something one day. Digits would make it a perl > symbol/word thingie more or less.
It was a decision taken by the meta-spec maintainer. If this pattern should change, then it will be reflected in a future release of the distributions.