develooper Front page | perl.qa | Postings from August 2012

Re: version.pm and developer version numbers

Thread Previous | Thread Next
From:
Michael G Schwern
Date:
August 1, 2012 11:39
Subject:
Re: version.pm and developer version numbers
Message ID:
501977E8.8010807@pobox.com
On 2012.7.27 12:48 PM, Jeffrey Thalhammer wrote:
> I just discovered that version.pm always treats version numbers with an
> underscore as less than the equivalent version number without the underscore.
> So "6.63_02" is less than "6.6302".  Is it it just me, or does that seem crazy?
> Dealing with $VERSION numbers in Perl is hard enough as it is.  This doesn't
help.

IMO it makes sense.  6.6302 and 6.63_02 are not the same thing.  One is
stable, one is alpha.  One is version 6.6302, one is 6.63 alpha 2.  The alpha
version should always be less than an "equivalent" stable version.

What's really going on is this:

6.63_02 => 6.63_2
6.6302  => 6.6302.0

And 6.63 < 6.6302.

I know this gets in the way because people like to collapse alpha version
numbers to avoid a warning when they're compared as numbers.  Ironically the
very thing people do which trips up version.pm is unnecessary with version.pm.


-- 
Life is like a sewer - what you get out of it depends on what you put into it.
    - Tom Lehrer

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About