Skip Menu |

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

Report information
The Basics
Id: 42478
Status: resolved
Priority: 0/
Queue: Module-Build

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

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



Subject: Generated META.yml Fails with version pragma objects
When version objects are used, the generated META.yml has version numbers that have a "v" prefix, because they are the stringifications of the version objects. So, wherever META.yml is generated, we need to use the 'numify' method to print version numbers. This is the only way we can avoid having the 'v' prefix, which fails because it doesn't match the META-spec (the Test::YAML::Meta tests fail) It's sort of ambiguous to me whether a version string should be in the standard form - 5.005005 for 5.5.5, for example. The old style. So, really, I guess this is a META-spec issue, but I thought I'd report this here so it can be fixed in Module::Build for now.
Subject: Generated META.yml version numbers should normalize tuples
Per discussion on Module-Build mailing list, recommended approach is for "tuples" (multiple version parts separated by a dot -- aka "version objects") be represented in normal() form. This includes a leading "v" and is intended to maximize the visual difference between tuples and "numeric" form with a single decimal point. Other downstream tools may need to be patched to a reflect this change.
Thank you and everyone else that participated in the discussion, which is archived online at: http://www.nntp.perl.org/group/perl.module.build/2009/04/msg2083.html I'm marking this bug as resolved and thus closing the bug. Other reports may need to be filed in other related modules, and I recommend that the META.yml spec should be clarified for the future. Thanks again :-)
I'm reopening this ticket as we actually need to do the work still. (Jonathan, please feel free to just remove yourself as a contact if you prefer.)
Subject: Re: [rt.cpan.org #42478] Generated META.yml Fails with version pragma objects
Date: Mon, 27 Apr 2009 11:29:58 -0400
To: bug-Module-Build [...] rt.cpan.org
From: Jonathan Yu <frequency [...] cpan.org>
Hi David: As I recall, the last time I created a META.yml with Module::Build, the output was the stringification of $VERSION. The idea as I understand it was just to use v-strings, like v1.1.1, which is exactly what comes out in the stringification of $VERSION if it's a version object. Unless you mean to render all version numbers like that, as in converting versions like 1.001 to v1.1. However I'm not sure what this might do for compatibility. Best of luck resolving this. The important thing, I think, would just be to update the META-spec to clarify how this will all work, which will be particularly important for those developing other related modules. I'll remain attached on this to watch the progress. Thanks again! On Mon, Apr 27, 2009 at 11:26 AM, David Golden via RT <bug-Module-Build@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=42478 > > > I'm reopening this ticket as we actually need to do the work still. > > (Jonathan, please feel free to just remove yourself as a contact if you > prefer.) > >
The META.yml spec definitely needs to be updated to remove the ambiguity. The documents for version.pm stringify() are misleading. It will return the string that was used to initialize the version object in new(). If that was "1.2.3", stringify() will return "1.2.3". If that was "v1.2.3", stringify will return "v1.2.3". If an actual v-string was used, either v1.2.3 or 1.2.3 (not in quotes), then stringify will return "v1.2.3". By contrast, normal() will always emit a leading "v" and at least a 3-part tuple. Based on the email list discussion, the spec should clarify that version may be either numeric (following the rules for Perl numeric literals -- e.g allowing underscore) or a tuple(following the version.pm normal() format). For Module::Build, that means that if dist_version is a version object, then if $dist_version->stringify() has either a leading "v" or if it has more than 1 decimal point, then the dist_version should be output (to META.yml and for the tarball name) using normal(). Otherwise, it should use stringify(). I would just make that change now, but as we're pushing to get 0.33 out the door, I'm only applying bug-fixes at the moment. -- David