There's been Yet Another v-string/version-string problem on p5p. This time it's a change to the ill fated $^V variable. Instead of being a detested v-string it's now a slightly more sane version object. Trouble is, this is Yet Another incompatibility which now makes $^V even less suitable for checking the version of Perl than it ever was before.
Just use $].
Which brings me to my point... getting version numbers juuuust right is complicated and never seems to quite work. This is why I stick with floating point numbers, but even they have issues as many folks want "5.10" to be greater than "5.9" which requires special comparison functions and must be expressed as strings or objects. And then you have to guess which comparison style the version in question is using. Oh, and the occasional floating point error.
I've long held that when faced with a wide array of versioning possibilities, such as CPAN, there are only two important attributes of a version:
1) Versions compare as simple numbers.
2) Versions always go up.
Don't follow those rules and it's a nightmare. I once had to write a version comparison function for a Linux distribution. They didn't enforce any versioning standard on the rpms. This lead to such gems as "5.5beta" and "1.1g" and "5.4pre1". Special case after special case.
Nothing else can be gleaned from a version number without specific knowledge of that project's development style. What does version 1.0 mean? 2.0? Is a jump from 1.0 to 2.0 significant? How significant? Are odd numbered releases considered developer releases? Who knows?!
A related problem is how do you convince users to upgrade? When everyone's perception of how much difference there is between versions is different, how do you express to them the urgency of an upgrade?
Car manufacturers and Microsoft figured this out long ago, you use dates. "What, are you still using the OLD 2004 model?! BUY the NEW 2008 model or I'll EAT MY HAT!!" Microsoft products remind you of this every time you start them up with a big "Microsoft Word 2005" splash screen. It's subtle and brilliant marketing. Let's take advantage.
ISO integer dates. YYYYMMDD. 20071217. They compare as simple integers. They always go up. They date a release. They don't lose any information between string and number conversion (ie. 5.70). They don't have the normal problems of remembering and conveying a long version number as we're already used to dealing with dates. Need to shove out two versions in one day? Stick a
I think I'm going to change my modules over to this.
The problem with that mechanism... (Score:1)
0.xxxx vs 1.xxxx etc
What does a date mean? What information can be gleaned "at a glance".
Re: (Score:2)
You're right, and it's a false connection. In fact, 1.0 is often the LEAST stable, you want 1.01. And then everyone has different ideas about what an integer version jump should mean, case in point this comment about Text::Metaphone 2.0 [perl.org].
And then does that mean *API* stability or *bug* stability?
For me the 0.x -> 1.x jump is API stability and future integer jumps usually coi
Re: (Score:2)
improving software version schemes (Score:1)
Too often cruft is added and software becomes more complex in the name of "backwards compatibility". I've done it.
Something like the use only [cpan.org] system seemed like a good idea to address this, but it never caught on, and I admit to not adopting myself.
Perl 6 has some related features built-in, but it will be a while still before that's ready for production use...
Re: (Score:2)
1) 8 decimal places edges into the realm of floating point error.
2) It has the string vs float problem.
2.20071220 is different from "2.20071220".
Combined with #1 this can be trouble when comparing versions.
3) The meaning of X is still arbitrary. Even if the user realizes that it
indicates stability, specifically API stability, is 3 incompatible with 2?
Which ever answer yo
Re: (Score:2)
Just plain integers is becoming my preference... (Score:1)