in reply to Re: How/can one to save/restore CORE::caller inside an eval?
in thread How/can one do save/restore CORE::caller inside an eval?
This is fantastic — almost. The first problem I have is that adding the BEGIN code causes Devel::Trepan to run so slowly that I've not had the patience to wait until it is done. I've tried without the BEGIN, and overwriting caller() still works.
More serious is the fact that my replaced version of caller() needs to call the original caller (after it strips off the call stack entries on top that are inside the debugger). I tried for bar():
sub bar {
local *orig_caller = *CORE::GLOBAL::caller;
local *CORE::GLOBAL::caller = sub { orig_caller($_[0]+1)} # simplified somewhat
}
But I'm getting:
Deep recursion on anonymous subroutine at .. DB::Eval.pmbecause I guess that glob assignment has the same address.
Help!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How/can one to save/restore CORE::caller inside an eval?
by educated_foo (Vicar) on Dec 04, 2013 at 03:05 UTC | |
by rockyb (Scribe) on Dec 04, 2013 at 04:31 UTC | |
by rockyb (Scribe) on Dec 04, 2013 at 04:48 UTC | |
by tobyink (Canon) on Dec 04, 2013 at 09:55 UTC | |
by Haarg (Priest) on Dec 04, 2013 at 10:12 UTC | |
by rockyb (Scribe) on Dec 04, 2013 at 12:24 UTC | |
by rockyb (Scribe) on Dec 04, 2013 at 12:29 UTC | |
by rockyb (Scribe) on Dec 10, 2013 at 12:19 UTC |