in reply to Re: Request help for work around for bug in perl 5.10.1 (weak magic)
in thread [Solved] Request help for work around for bug in perl 5.10.1
I'm not really that familiar with Carp, I'll see what I can figure out to make it give a more complete backtrace.$SIG{__DIE__} = \&die_catcher; ... # # die_catcher # # Try to log the call stack if we die # sub die_catcher { for my $caller ( CallStack() ) { alog(LOG_ERR, $caller); } } ... # # Courtesy of Perl Monks http://www.perlmonks.org/?node_id=51097 # sub CallStack { local $@; eval { confess( '' ) }; my @stack = split m/\n/, $@; shift @stack for 1..3; # Cover our tracks. return wantarray ? @stack : join "\n", @stack; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Request help for work around for bug in perl 5.10.1 (backtrace)
by tye (Sage) on Dec 12, 2012 at 22:34 UTC |