Skip Menu |

This queue is for tickets about the DateTime-Format-Natural CPAN distribution.

Report information
The Basics
Id: 27350
Status: resolved
Priority: 0/
Queue: DateTime-Format-Natural

People
Owner: Nobody in particular
Requestors: ANDK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: wrong use of floating point version numbers
When you use version numbers that look like floating point numbers, they are treated as floating point numbers, not as v-string. Which means that 0.10 sorts before 0.9. This leads to the following version inconsistencies: SCHUBIGER/DateTime-Format-Natural-0.30.tar.gz: DateTime::Format::Natural::Base 0.9 SCHUBIGER/DateTime-Format-Natural-0.31.tar.gz: DateTime::Format::Natural::Lang::EN 0.9 SCHUBIGER/DateTime-Format-Natural-0.32.tar.gz: DateTime::Format::Natural::Lang::DE 0.9 Maybe you could delete the old versions from CPAN and generally switch to a different verion line that is future-proof? Thanks,
On Thu May 31 01:24:24 2007, ANDK wrote: Show quoted text
> When you use version numbers that look like floating point numbers, they > are treated as floating point numbers, not as v-string. Which means that > 0.10 sorts before 0.9. This leads to the following version
inconsistencies: Thanks for taking the time. I'm aware of floats and how they're handled, but I wasn't aware the CPAN indexer did likewise. But as I'm not sure how to proceed, I thought I could use a little input and may ask you for your advice.
CC: ANDK [...] cpan.org
Subject: Re: [rt.cpan.org #27350] wrong use of floating point version numbers
Date: Fri, 01 Jun 2007 05:15:03 +0200
To: bug-DateTime-Format-Natural [...] rt.cpan.org
From: andreas.koenig.7os6VVqR [...] franz.ak.mind.de (Andreas J. Koenig)
Show quoted text
>>>>> On Thu, 31 May 2007 19:55:05 -0400, " via RT" <bug-DateTime-Format-Natural@rt.cpan.org> said:
Show quoted text
Show quoted text
> On Thu May 31 01:24:24 2007, ANDK wrote:
>> When you use version numbers that look like floating point numbers, they >> are treated as floating point numbers, not as v-string. Which means that >> 0.10 sorts before 0.9. This leads to the following version
> inconsistencies:
Show quoted text
> Thanks for taking the time. I'm aware of floats and how they're handled, > but I wasn't aware the CPAN indexer did likewise.
The indexer just follows perl's lead. When somebody says use DateTime::Format::Natural::Base 3.14; then perl also compares the version number with $VERSION as a floating point number. Show quoted text
> But as I'm not sure how to proceed, I thought I could use a little > input and may ask you for your advice.
The simplest advice I have is to append digits whenever you have reached '0.9'. So if you prefer 3 digits after the decimal point, you would switch to '0.901'. Or you start in the 1.0 region now. And decide about the number of digits after the decimal point again and keep it fixed. So maybe you'd start with '1.00' and from there '1.01', '1.02', etc. Your preferences decide. If you're only feeling fine with v-strings, then you can follow the advice in the 'Perl Best Practices' book which suggests use version; $VERSION = qv('0.0.3'); all on one line. Personally, I have got used to floats and use them consistently everywhere, but then I did not have a choice until recently. -- andreas
On Thu May 31 23:17:51 2007, andreas.koenig.7os6VVqR@franz.ak.mind.de wrote: Show quoted text
> So maybe you'd start with '1.00' and from there '1.01', '1.02', etc.
Thanks, applied.