in reply to Module implementing modified comment-style debugging.

Occasionally, when I have a Heisenbug in a script that resists walk-throughs with 'perl -d', I'll do something like this:

### At the top of the script my $debug = 1; # Set to '0' to disable debugging outp +ut sub debug { warn "DEBUG ($_[0]): <<<$_[1]>>>" if $debug; } [...] ### Some troublesome variable or value debug('$foobar', $foobar);

For really stubborn bugs, I open a log file and write it to the log via 'Data::Dumper'. For that class of bug, I haven't yet found one that can beat that particular treatment.


-- 
Human history becomes more and more a race between education and catastrophe. -- HG Wells