in reply to Re: REALLY PERL ??
in thread REALLY PERL ??
G'day Marshall,
++ They're all good techniques which I use too. I also sometimes add a temporary exit statement: often in a loop to see print debug statements for just one iteration.
I almost always add something like
# TODO - debugging
just before those things so that they're easy to subsequently find and remove. My normal syntax highlighting displays the commented "TODO" in a horribly contrasting magenta on blue so it's really hard to miss; even without that, it's easy to just search the text for.
"... a really bizarre looking error that I traced back to a ":" instead of a ";" at the end ..."
Unfortunately, that's one mistake I make far too often. It was very difficult to track down when I first used to make it. I now recognise it as just something I do when not releasing the Shift key quickly enough:
$result = function(...): $hashref = { ... }: $string = "...":
It's easy to miss when just reviewing the code because ":" and ";" look very similar; at least now it's easy to find and fix when I get a syntax error reported.
— Ken
|
|---|