{ package DB; my $i = 0; my @c; while (@c = caller($i++)) { next if $c[3] =~ /.*?\:\:throw/; push @stack_trace, [ @c[0 .. 7] ]; } }