hlen has asked for the wisdom of the Perl Monks concerning the following question:
This function is called hundreds of times, I only want a backtrace when it's about to return in that specific condition.sub message_id($) { my $tr = shift; defined $tr or cluck(), return undef; $tr->isa('HTML::Element') or return undef; my $td = ($tr->content_list())[0]; return $td->as_trimmed_text(); }
Thanks in advance
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Translate debug code to a debugging technique
by shenme (Priest) on Oct 02, 2004 at 04:03 UTC | |
by hlen (Beadle) on Oct 02, 2004 at 04:29 UTC | |
|
Re: Translate debug code to a debugging technique
by Prior Nacre V (Hermit) on Oct 02, 2004 at 05:38 UTC |