Perrin Harkins wrote:
On 7/13/07, J. Shirley <[EMAIL PROTECTED]> wrote:
As anecdotal evidence to its insidious behavior, I've personally been
involved in a 5 man debugging effort that took 13 days (not full days,
but probably an average of 3-4 hours a day * 5 people * 13 days) to
finally find the bug. Which was simply "my $foo = $bar if $baz;"
The reason why it was so hard to track down was because ot he
wonderful undefined behavior.
I had a similar experience, which is why I always mention when I see
it in other people's code now. It's a real problem and very hard to
track down if you haven't heard of it before.
[disclaimer: not a paid spokesmodel ... ]
A while ago, I tossed a code that did things like that into Komodo. I
set a break point after the my $variable = expression if (condition);
line and didn't see the $variable in the list. I went back to look at
the condition, and realized what happened.
Nowadays I simply put all the variable creation in a separate section
near the beginning.
Joe
--
[EMAIL PROTECTED]
_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/