|Welcome to the Monastery|
Re: Re: Re: Re: Re: Broken Date Handlingby perlcgi (Hermit)
|on Oct 10, 2002 at 14:57 UTC||Need Help??|
Meditation, sort of.
Thanks for sharing this Davorg.
So is there some general wisdom we can glean from this?
Davorg was being clever, (no harm in that, hubris is good, right?). He likely felt justified in being clever, 'cos an eval'd timelocal would do the error checking for him. (Most of us would feel nice and comfy about that).
But crikey, it's a very serious error if it were to make its way into production code, the sort that gives ammo to Perl naysayers, imho.
Would more extensive testing have caught this? Undoubtedly yes.
Should Davorg have used a CPAN module like Date::Calc, or is that overkill? Maybe only he can decide.
Would this have happened if Davorg was coding in Java? Probably not, (but he'd still be working on the app.)
Is there a general rule we can apply to prevent ourselves from getting burnt like this?