Andreas J. Koenig wrote:
But what you are saying is that "2.004000" sorts between v2.3999 and
v2.4001, right? Can you please show us the code that backs this claim?

No, that isn't right. "2.004000" sorts between v2.3.999 and v2.4.1 (split on three decimals). In fact qv("2.004000") is completely equivalent to v2.4.0 (note there is no leading 'v' there).

> What's the rationale for treating 1.0 differently from 1.00? I mean, we're > talking about version numbers, not dictionaries.

The rationale is that if two version strings are written differently,
then there must apparently be a version difference that shall be
visible and not be swept under the carpet.

<ARGGGGHHHHHHH>And you wonder why I wanted the version object code to return a _normalized_ string, rather than whatever random bits the author typed that time. </ARGGGGHHHHHHH>

I have to side with Julian here, though. As soon as CPAN added version.pm support, it should use that exclusively to perform version comparisons and not string comparisons, for exactly this reason. Two (or more) different string representations can yield identical version objects. 1.0 followed by an infinite number of zeros is still equivalent to 1. An author who added only a trailing zero to a new file uploaded to PAUSE should not be able to add that "new" release (short of resetting the "highest VERSION" flag). Under your (Andreas') scheme, I could release modules that differ only in the number of trailing zeros...

Yes, please turn on your time machine and rip the whole v-string mess
out of perl. Now. Pretty Please.

I tried! I can't even get agreement to deprecated the damn things (though I've pretty much tamed them as of Perl 5.8.1, since they are now magic). But, and this is important, as of version-0.72, v-strings now are converted correctly from Perl v5.6.2 forward (using a heuristic for Perl < v5.8.1 and magic v-string after that point).

John

--
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748

Reply via email to