Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: Re: Re: Re: Re: Broken Date Handling

by perlcgi (Hermit)
on Oct 10, 2002 at 14:57 UTC ( #204194=note: print w/replies, xml ) Need Help??

in reply to Re: Re: Re: Re: Broken Date Handling
in thread Broken Date Handling

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?
  • Comment on Re: Re: Re: Re: Re: Broken Date Handling

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://204194]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2022-12-05 23:41 GMT
Find Nodes?
    Voting Booth?

    No recent polls found