This morning, I came upon this tweet. I don't understand what is blowing the considerable mind of RJBS. I'm guessing he considers this post to have settled the matter. But just because he's willing to manually convert his version numbers to decimal format, that doesn't mean we all are. I write modules like this
package RJBS v1.2.3 { our $year = 2012; }
and scripts like this
#!/usr/bin/env perl use v5.14; use warnings; use RJBS v1.2.3; say "I'm using RJBS version ", RJBS->VERSION; say "It's $RJBS::year, for pete's sake!"; say "I'm not writing ", version->parse(RJBS->VERSION)->numify, " any more. Forget it.";
I don't see the problem.
$ ./rjbs.pl I'm using RJBS version v1.2.3 It's 2012, for pete's sake! I'm not writing 1.002003 any more. Forget it.
I guess if you still care about older perls, it might be an issue. But I don't. Heck, I don't even assign to $VERSION directly anymore. Indeed, I think that feature alone is reason to upgrade to Perl 5.12 (and the sexy new package syntax is worth upgrading to Perl 5.14 for).
I put "use v6" in my Perl 6 scripts and "use v5.14" in my Perl 5 scripts, so--- yeah--- when I care about the version number, I want to put "use Foo v1.2.3". If that is an accident of history, then it's a happy one.
I think you're absolutely right that if you don't ever use old Perls, then it's not a big deal any more. As much as I might wish it, though, that's not everyone. Many people writing for CPAN like to support older Perls too, and I see lots of people get tripped up with v1.2.3 style version numbers. Just today on #toolchain on IRC there was a question about why 0.4.2 compares as less than 0.4. Those kinds of questions are *still* coming up 12 *years* after v-strings were introduced in Perl v5.6, so something about it still just doesn't compute for many people, even after v-strings were improved in v5.8.1 and after version objects were added in v5.10. Will 'package NAME VERSION' syntax in v5.12 finally make the difference? I hope so, but I'm not holding my breath.
Posted by: Xdg | 03/07/2012 at 07:24 PM
I was using vstrings for providing versions, then I found some weird bug in EUMM, and then I found out that supposedly 'v1.1.1' is not while v1.1.1 is even though both will validate and be detected by half the software just fine. and oh fuck it I'll just go back to floating points for another 5 years.
for my EUMM issue >
https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/issues/21
Posted by: Xenoterracide | 03/08/2012 at 12:22 AM