Julian Mehnle wrote:
But doesn't `perldoc version` say that I am "strongly encouraged to use the qv() operator" if I wanted to use extended versions? Does that recommen- dation perhaps need to be further qualified then?

You skipped over the previous paragraph:

Whichever of the two types of version objects that you choose to
employ, you should stick to either "Numeric Versions" or "Extended
Versions" and not mix them together.  While this is possible, it is
very confusing to the average user.

This is precisely what you are doing. Sometimes Mail::SPF has one decimal place and sometimes it has two. Even though you are using qv() to force extended version syntax, it looks (from the string point of view that CPAN hews closely to) like you are mixing your usage.

If you want to use extended versions, do so and make your version always contain a leading 'v' and two decimals, even if the point release is 0 most of the time.

        use version; our $VERSION = qv('v2.4.0');

This still doesn't fix the problem that older CPAN releases continue to perform stringwise comparisons, but at some point, it becomes silly to try and deal with people who refuse to update their core tools (like CPAN). With the current release of version.pm, you can use the following instead:

        use version; our $VERSION = qv('v2.004.0');

and it _will_ sort properly even by older CPAN standards (and yet be exactly the same "version" as the other example).

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