I found myself using cluck() today. Nothing wrong about that,
except I couldn't find a nice way to ditch it for perl -d.
I'm trying to see how to schedule/stop for a stack trace in this situation, with the debugger:
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();
}
This function is called hundreds of times, I only want a
backtrace when it's about to return in that specific
condition.
(and yeah, I know cluck works perfectly there).
Thanks in advance