in reply to Re: Shorter Carp stack backtrace
in thread Shorter Carp stack backtrace

$Carp::CarpLevel?

Replies are listed 'Best First'.
Re^3: Shorter Carp stack backtrace
by almut (Canon) on Apr 16, 2010 at 02:47 UTC

    How would that change the line format of the backtrace to file:line, as desired?

    #!/usr/bin/perl use Carp 'cluck'; sub foo { bar() } sub bar { baz() } sub baz { cluck "big error!" } foo(); $Carp::CarpLevel = 2; foo(); __END__ big error! at ./834994.pl line 7 main::baz() called at ./834994.pl line 6 main::bar() called at ./834994.pl line 5 main::foo() called at ./834994.pl line 9 big error! at ./834994.pl line 5 main::foo() called at ./834994.pl line 13