Skip Menu |

This queue is for tickets about the POSIX-strptime CPAN distribution.

Report information
The Basics
Id: 127972
Status: new
Priority: 0/
Queue: POSIX-strptime

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

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



Subject: Return parse errors
According to http://pubs.opengroup.org/onlinepubs/009695399/functions/strptime.html strptime returns NULL if parsing was not successful. Unfortunately it's not possible to get this information in POSIX::strptime::strptime() calls. If parsing was not successful, then some fields might be set to undef, but this is not reliable (as already stated in the Pod). It would be nice if a parse failure could somehow be returned: - in case of parse errors strptime() could throw an exception, but this would not be backward compatible, so maybe this could be done conditionally with an additional flag argument or if a global variable is set - there could be an additional optional argument, which should be a reference to a scalar if provided, and which is filled with a truth value about the success - other possible solutions?