Eric Wilhelm wrote: >> Here is a portion of my CPAN directory: >> ... > > 0.0905 -> v0.90.5 > 0.0906 -> v0.90.6 > 0.0907 -> v0.90.7 > 0.0908 -> v0.90.8 > 0.0909 -> v0.90.9 > 0.091 -> v0.91.0 > 0.0911 -> v0.91.1 > >> The $VERSION's listed above only make sense if you compare them as >> numbers, not as tuples. > > Sure, you can't just treat a float as a tuple without fixing the width > of the second column. I imagine this is where everybody gets confused > and I think all we need to do is explain that. > > X convert to vX > X.Y convert to vX.Y00 > X.YY convert to vX.YY0 > X.YYY convert to vX.YYY > X.YYYZ convert to vX.YYY.Z00 > > vX sort as a dotted tuple > vX.Y sort as a dotted tuple > vX.Y.Z sort as a dotted tuple > vX.Y.Z.A sort as a dotted tuple > > Perhaps the dotted tuple with the leading 'v' should be the canonical > form for META.yml? (Deprecate the float form and include something > like the above conversion explanation.)
I was almost convinced, then I remembered what caused this whole problem. Class::Delegation went from 1.06 to 1.7.1. That's 1.60.0 to 1.7.1 in your system. Text::Autoformat went from 1.13 to 1.14.0 which is 1.130.0 to 1.14.0. These are all incorrect, but not obviously so. Most CPAN authors use X.YY, not X.YYY which version assumes, which is where the confusion stems from. But some don't. Converting numeric X.Y to tuple X.Y.Z is going to have to make an assumption, and its going to be wrong in some cases. Why not make it right in the overwhelming use case; converting from X.Y numbers to X.Y.Z tuples, once and in a single distribution? CPAN authors already have to write $VERSION = "1.20", so we know how many places are in their Y portion. Use it. 1.06 becomes 1.6.0, as expected. 1.20 becomes 1.20.0, as expected. We don't need to worry about comparing between distributions, that comparison is meaningless. -- Being faith-based doesn't trump reality. -- Bruce Sterling