tokuhirom / Minilla

Authorizing tool for CPAN modules
https://metacpan.org/release/Minilla
Other
97 stars 65 forks source link

Minilla gets confused with perl version with v5.xx form #198

Closed GeJ closed 7 years ago

GeJ commented 8 years ago

In my module, I included a :

use v5.20;

Upon issuing a new minil release, Minilla set the prereq->runtime->requires->perl to "5.20"

When trying to install my distribution, cpanm complained that it required perl 5.20 and that I only had 5.020003.

All this time, Minilla seemed to ignore what I put in cpanfile.

Is this normal? Is there something wrong with 'use v5.20;' that I overlooked?

syohex commented 8 years ago

All this time, Minilla seemed to ignore what I put in cpanfile.

No, Minilla does not ignore version in cpanfile. Merge both version by CPAN::Meta::Prereqs and uses higher version of them.

GeJ commented 8 years ago

You're correct, my apologies, it was badly phrased.

I did a little digging yesterday (I still need to double-check that I haven't missed something important somewhere else) but it looks like Minilla::Metadata#_extract_perl_version() does a very basic job at getting the required perl version. Should I work on this part?

What about 'normalizing' the version with something like version->parse($value_found_in_source)->numify ? Does it look like an acceptable solution?