4 ms·
Ancient Perl started off encoding their version numbers as a float (you can see it in their old version numbers before 5.6.0, 5.005 for instance[1]). Integers w
by __david__ 4y ago
Ancient Perl started off encoding their version numbers as a float (you can see it in their old version numbers before 5.6.0, 5.005 for instance[1]). Integers were the major version, thousandths were minor, and millionths were patch. So 1.003004 was 1.3.4. This makes them extremely easy to sort. At some point they decided that was too obscure and came up with "version strings". But the old way is (crazily) still supported and can cause pain if you forget since 1.2.0 is unambiguous, but 1.2 means 1.200000, ie 1.200.0.
[1] https://en.wikipedia.org/wiki/Perl_5_version_history https://en.wikipedia.org/wiki/Perl_5_version_history
Just to be clear, I don't actually think this is a great solution, but is _is_ easy to sort.
- avar 4y agoPerl still represents versions like that internally, the "pretty" v-prefixed variant is just some overload/OO magic.