develooper Front page | perl.perl5.porters | Postings from July 2011

Re: [perl #93852] [PATCH] Report a better error when trying to usenegative version numbers instead of 'Invalid version format (non-numericdata)' as it currently does

Thread Previous | Thread Next
From:
John Peacock
Date:
July 1, 2011 04:17
Subject:
Re: [perl #93852] [PATCH] Report a better error when trying to usenegative version numbers instead of 'Invalid version format (non-numericdata)' as it currently does
Message ID:
4E0DACC9.1080801@havurah-software.org
On 06/30/2011 10:33 PM, Father Chrysostomos via RT wrote:
> On Thu Jun 30 13:26:01 2011, claes wrote:
>> Hi,
>>
>> saw a 0.00 release uploaded today and out of curiosity tried using a
>>     negative $VERSION in a module and then C<use Module VERSION>  and it
>>     reported a 'Invalid version format (non-numeric data)' which is
>>     slightly confusing. Attached patch checks if it begings with a dash
>>     and then reports a better error. Also updated docs that version is
>>     expected to be a positive number.
> Thank you. Applied as f39335f98.

I'll send a diff this evening (have to run to work), but it would have 
been good to let the patch hang out there for comments before 
committing.  That is the wrong place in the code to make that change 
(plus adding a new error without a regression test is a Bad Thing).

John

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