Andreas J. Koenig wrote: > > > > The problem I had is that my META.yml (generated by M::B 0.26) > > > > had version numbers of the form "2.004000", which is > > > > numerically correct, but in the new version.pm regime sorts > > > > between v2.3999 and v2.4001, as opposed to between v2.3.0 and > > > > v2.4.1 (as it was intended by me). > > > > > > You seem to mean "v2.004000", not "2.004000". The latter is a > > > floating point number, the former a v-string. > > > > I know. But I actually did have "2.004000", not "v2.004000", in > > META.yml as generated by M::B 0.26. > > But what you are saying is that "2.004000" sorts between v2.3999 and > v2.4001, right? Can you please show us the code that backs this claim?
You're right. I thought it might have been _interpreted_ as "v2.004000" despite only reading "2.004000" in META.yml, but that can't be it: $ perl -Mversion -le 'print(qv('2.004000') > qv('2.004') ? "yes" : "no")' no > > What's the rationale for treating 1.0 differently from 1.00? I mean, > > we're talking about version numbers, not dictionaries. > > The rationale is that if two version strings are written differently, > then there must apparently be a version difference that shall be > visible and not be swept under the carpet. > > > Anyways, considering what you're saying, why does CPAN.pm 1.7602 > > treat 2.004000 (from META.yml on CPAN) as being _equal_or_lower_ > > than the installed qv('2.004')? (Remember, `r` in older CPANs > > doesn't complain about an out-of-date Mail::SPF, whereas in newer > > CPANs it does!) > > I'm not sure it does. I tried current bleadperl with 1.7601 and it did > not bahave as you claim: > [...] With Perl 5.8.8, CPAN 1.7602, and version.pm 0.68: | $ cpan | Terminal does not support AddHistory. | | cpan shell -- CPAN exploration and modules installation (v1.7602) | ReadLine support available (try 'install Bundle::CPAN') | | cpan> r Mail::SPF | CPAN: Storable loaded ok | Going to read /home/julian/.cpan/Metadata | Database was generated on Tue, 22 May 2007 00:54:54 GMT | All modules are up to date for Mail::SPF | 1 installed module has a version number of 0 Though: | $ perl -MCPAN -le 'print $CPAN::VERSION; print CPAN::Version->vcmp("v2.004","2.004000");' | 1.7602 | -1 What's going on here?? > > > The above equation does not represent CPAN.pm behaviour. 2.004000 is > > > very far away from v2.4000. Every float below 3 is treated smaller > > > than v2.1000 because the maximum a floating point number below 3 can > > > reach, when converted to a v-string, is 2.999.999.999.... > > > > Are you saying that, from CPAN's PoV, v2.1000 > 3? You can't be > > serious! > > Please read my sentence again. Note that there is the word "below" > somewhere. Twice. Oops. Thanks for the heads-up. I shouldn't be having conversations this complex at 03:00 AM. Sorry.
pgpA713D4rmSB.pgp
Description: PGP signature