Skip Menu |
 

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

Report information
The Basics
Id: 124589
Status: resolved
Priority: 0/
Queue: DateTime-Format-Flexible

People
Owner: cpan [...] punch.net
Requestors: rod.taylor [...] gmail.com
Cc:
AdminCc:

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



Subject: Fix for "NotADate" value
Download (untitled) / with headers
text/plain 794b
The check for "\s?at\s?" isn't sufficient. \bat\b might work a bit better but there is still no guarantee that having an "\bat\b" will match the second expression. Returning if $pre isn't defined is enough to silence the warnings. Perhaps it's better to scrap the first return and keep the new one instead? make; perl -Iblib/lib -e ' use DateTime::Format::Flexible; my $dt = DateTime::Format::Flexible->parse_datetime("Not A Date"); '; Use of uninitialized value $pre in substitution (s///) at blib/lib/DateTime/Format/Flexible/lang/en.pm line 112. Use of uninitialized value $pre in concatenation (.) or string at blib/lib/DateTime/Format/Flexible/lang/en.pm line 116. Use of uninitialized value $time in concatenation (.) or string at blib/lib/DateTime/Format/Flexible/lang/en.pm line 116.
Subject: NotADate.patch
Download NotADate.patch
text/x-diff 615b
*** DateTime-Format-Flexible-0.29/lib/DateTime/Format/Flexible/lang/en.pm 2017-03-07 13:12:00.000000000 -0500 --- DateTime-Format-Flexible-0.29-new2/lib/DateTime/Format/Flexible/lang/en.pm 2018-02-25 23:41:46.966246291 -0500 *************** *** 107,112 **** --- 107,113 ---- return $date if ( not $date =~ m{\s?at\s?}mx ); my ( $pre, $time, $post ) = $date =~ m{\A(.+)\s?at\s?([\d\.:]+)(.+)?\z}mx; + return $date if (not $pre); # if there is an 'at' string, we want to remove any time that was set on the date by default # 20050612T12:13:14 <-- T12:13:14 $pre =~ s{T[^\s]+}{};
Thanks for the ticket, this has been implemented in version 0.30.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.