New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
version numification is incorrect #337
Comments
@monken Any objections to the proposed fix? |
Will this break any of the tests in utils.t? |
Some of the existing tests are wrong, so they will need to be corrected. I started working on a fix for this, but ran into yet another bug in version.pm. I'm not sure yet how I want to deal with it. |
If we don't have https://metacpan.org/pod/XML::Tidy in our list of weird versions to test, we may want to add it. |
On Tue, Sep 09, 2014 at 03:14:35PM -0700, Olaf Alders wrote:
OMG, it's one of those dists. FWIW, I just ran this through Module::Metadata and it successfully extracted the version "1.12". |
The way versions are numified by metacpan is incorrect.
The correct way to numify a version in perl is:
I'm not entirely clear what MetaCPAN::Util::fix_version is attempting to do. For versions with v prefixes, it roughly matches what I described above. But many dotted-decimal form versions don't include the v prefix. They should be handled the same. Additionally, I'm not sure where
s/_/00/g
came from, but it is certainly wrong.I can wrote up a PR if I can get fix_version clarified. The git history is unhelpful.
The text was updated successfully, but these errors were encountered: