use Carp qw/ cluck confess longmess /; # die of errors with stack backtrace confess("title: ($title)") # warn of errors with stack backtrace cluck("Before escaping title ($title)"); $title = $self->escape($title); cluck("After escaping title ($title)"); # longmess - return the message that cluck and confess produce $self->log_error( "title not set: " . longmess() );