Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Can caller() or the call stack be tricked?by Eily (Monsignor) |
on Jul 08, 2013 at 13:03 UTC ( [id://1043119]=note: print w/replies, xml ) | Need Help?? |
It looks like a job for goto After the goto, not even caller() will be able to tell that this routine was called first. So if you goto &{'debug'}; after you shitfed $self out, you'll "call" your debug subroutine seemlessly, as if you were there in the first place. Be careful about unshifting or shifting the $self argument into @_ when you do that.
In Section
Seekers of Perl Wisdom
|
|