Skip Menu |

This queue is for tickets about the Rose-HTML-Objects CPAN distribution.

Report information
The Basics
Id: 29155
Status: resolved
Priority: 0/
Queue: Rose-HTML-Objects

People
Owner: Nobody in particular
Requestors: cpan [...] funkreich.de
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.549
Fixed in: 0.550



Subject: Bug in parsing of dates in DateTime::Split::MonthDayYear
If you enter an invalid date the substr approach of the DateTime::Split::MonthDayYear field type in certain circumstances fails to correctly split the compound representation resulting in messed up field values. Try entering 31/31/2007 for example and you'll get back the following values in the month/day/year fields: 31 /3 1/19 The following should fix this: --- MonthDayYear.pm 2007-09-04 13:08:34.000000000 +0200 +++ MonthDayYear.pm.fixed 2007-09-04 13:09:38.000000000 +0200 @@ -60,11 +60,12 @@ unless($date) { no warnings; + my( $month, $day, $year ) = split "/", $value; return { - month => substr($value, 0, 2) || '', - day => substr($value, 2, 2) || '', - year => substr($value, 4, 4) || '', + month => $month, + day => $day, + year => $year, } }
From: JSIRACUSA [...] cpan.org
This is fixed in SVN (version 0.549_06). The fix will go out in the next release.