Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Re: Re: Re: Broken Date Handling

by davorg (Chancellor)
on Oct 10, 2002 at 10:56 UTC ( [id://204140]=note: print w/replies, xml ) Need Help??


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

Because the $m-- converts $m to a number.

--
<http://www.dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Broken Date Handling
by perlcgi (Hermit) on Oct 10, 2002 at 14:57 UTC
    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?
    TIA,
    Perlcgi

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-20 00:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found