Skip Menu |

This queue is for tickets about the CPAN-DistnameInfo CPAN distribution.

Report information
The Basics
Id: 56039
Status: rejected
Priority: 0/
Queue: CPAN-DistnameInfo

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

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



Subject: version attribute should not include TRIAL or RC
I think the practice of returning "5.12.0-RC0" or "2.001-TRIAL" for "version" is problematic as these are not valid version strings as defined by the new "lax" rules for version numbers in Perl 5.12. Thus, post-processing is necessary before the result of version can be used with UNIVERSAL::VERSION or version objects. That seems to defeat much of the purpose of using CPAN::DistnameInfo to standardize things in the first place. As I know search.cpan.org does use these extended versions (e.g perl-5.12.0-RC0), I suggest adding another method to return an informal version string like that ("extended_version"?) and keeping "version" as a decimal or dotted decimal. Alternatively, I suggest adding a "formal_version" or "canonical_version" method to return only the actual numeric/dotted-decimal part. Either way the behavior should be documented clearly. If you indicate which approach you prefer, I'd be happy to work it up and send you a pull request. Thank you, David
Subject: Re: [rt.cpan.org #56039] version attribute should not include TRIAL or RC
Date: Mon, 29 Mar 2010 08:30:14 -0500
To: bug-CPAN-DistnameInfo [...] rt.cpan.org
From: Graham Barr <gbarr [...] pobox.com>
While they may not be valid version strings for modules, I do consider part of the distribution version. Without it it is impossible to tell the difference between -RC0 and -RC1 releases. So I am completely opposed to changing what the version method returns as that would break search.cpan.org and other services that use it to distinguish between releases. However if you want to add formal_version (although I would prefer numeric_version) to return just the numeric part of the version I would accept that as a patch as long as it clearly documents that it cannot be used to completely distinguish between two separate releases as it returns on the numeric part of the distribution version Graham.