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!
In reply to Re^2: How/can one do save/restore CORE::caller inside an eval?
by rockyb
in thread How/can one do save/restore CORE::caller inside an eval?
by rockyb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |