+sub show_backtrace {
+ my ($self) = @_;
+
+ return 1 unless ($global_level & BACKTRACE_ON_ERROR);
+
+ $self->message(BACKTRACE_ON_ERROR, "Starting full caller dump:");
+ my $level = 0;
+ while (my ($dummy, $filename, $line, $subroutine) = caller $level) {
+ $self->message(BACKTRACE_ON_ERROR, " ${subroutine} from ${filename}:${line}");
+ $level++;
+ }
+
+ return 1;
+}
+