On Thu, 29 May 2003, Rick Measham wrote:

>                 Until now, if you allowed a user to specify a
> pattern and they
>                 entered one that was non parsable, this module would croak
>                 causing your script to croak. This is a Bad Thing (tm).

No, it's only a bad thing if it's not documented.

>                 The behaviour now remains the same, however if you set
>                 $DateTime::Format::StrpTime::CROAK to false, methods will
>                 return undef rather than croaking.
>                 $DateTime::Format::StrpTime::errmsg will tell you what went
>                 wrong.

Now, this is a seriously bad thing.  What if you use a module that in turn
uses DT::F::StrpTime, and the other module turns of croaking when you
expect it to be on?

Globals for behavior like this are a big PITA.  This is not the right
solution to the problem.


-dave

/*=======================
House Absolute Consulting
www.houseabsolute.com
=======================*/

Reply via email to