You can put the last two lines anywhere to get a stack trace to that point. So if you had a weird warning (the reason for my previous attempt) you could set $SIG{__WARN__} to that two line sub-routine.use Carp; # Fatal stack trace made non-fatal. eval q{confess('Stack Trace')}; print $@; # $@ is set by eval().
That may seem trivial, but it took me awhile to have that light-bulb come on... so I thought I would post it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Stack Trace
by japhy (Canon) on Oct 21, 2000 at 03:24 UTC | |
by Adam (Vicar) on Oct 21, 2000 at 03:37 UTC | |
by japhy (Canon) on Oct 21, 2000 at 03:40 UTC |