version.pm clearly isn't working out. There's too many very well covered traps in the interface for no better reason than backwards compatibility. It drags around a numeric conversion system that only makes sense to the 5.005 -> 5.6 change. People keep using it wrong and I don't think its their fault. No amount of yelling RTFM will fix it.
version.pm was supposed to make versions easier to deal with. It didn't. That said, as much as I think it's not worth the bother, people seem to like X.Y.Z versions and a sane way of doing X.Y and X.Y.Z versions would be nice. What if we started version.pm over, just as a thought experiment, to address the needs of module authors rather than 5.5 v-string compatibility? What if we could knock the Perl version specification (ignoring alphas) down to this... X sort as a number X.Y sort as a number X.Y.Z sort as dotted tuple (allowing X.Y.Z.A.B... if you like) And that's that. Have version.pm *always* output at least X.Y.Z. X.Y becomes X.Y.0 or is simply disallowed. Then there's no confusion and no special vX.Y format. The other important bit is comparing the two formats. Right now, its totally unintuitive and that's led to a lot of confusion. While mixing the is bad, it would be nice if they tried to do something sane or at least unsurprising. It may be a simple heuristic to do this... 1 <=> 1.2.3 becomes 1.0.0 <=> 1.2.3 which is < 1.2 <=> 1.2.3 becomes 1.2.0 <=> 1.2.3 which is < 1.23 <=> 1.2.3 becomes 1.23.0 <=> 1.2.3 which is > 1.234 <=> 1.2.3 becomes 1.234.0 <=> 1.2.3 which is > For the purposes of mixed comparison, treat X.Y as X.Y.0. This appears to be the way people expect it to work. It keeps 5.005 < 5.6.0 (5.005 becomes 5.005.0 becomes 5.5.0 < 5.6.0) and 5.005 < 5.10.0. It solves the overwhelmingly common case of the switch from X.Y to X.Y.Z. Then all the trouble with version objects goes away. The vX.Y special case. The X.Y <=> X.Y.Z trap. Even special handling for tools effectively goes away because they already know how to deal with X.Y.Z. So let's shelve version.pm compatibility issues for now and just beat on the versioning problem until we have something that works. THEN we'll worry about how to deal with compatibility. -- Robrt: People can't win Schwern: No, but they can riot after the game.
