Re: [exim-dev] [exim-cvs] Changed version comparison to be s…

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Nigel Metheringham
Fecha:  
A: exim-dev
Asunto: Re: [exim-dev] [exim-cvs] Changed version comparison to be string based


Phil Pennock wrote:
> On 2012-10-26 at 22:17 +0100, Exim Git Commits Mailing List wrote:
>> Author:     Nigel Metheringham

>
>>     Changed version comparison to be string based

>
> Deoh! Sorry. :(
>
> I loath every part of Perl's version numbering and comparison operators
> and it's what finally stopped me using Perl for my own projects. In
> Python, these would just be split on '.' to tuples and compared that
> way, naturally getting the right results. Tuple comparison is Just Done
> Right.


Problem is version numbers are hard, and people tend to have, say,
5.00_RC1 5.00 5.00.01 - and they need to sort in that order; and thats
before you go completely pathological.

I'll hack together a better version comparison - there is a decent CPAN
module that I think will do the right thing, but probably don't want to
bloat the dependancies.

    Nigel.


-- 
[ Nigel Metheringham ------------------------------ nigel@??? ]
[                 Ellipsis Intangible Technologies                  ]