in reply to Re: Modifying subroutines and un-eval-ing
in thread Modifying subroutines and un-eval-ing

Actually, it looks to me like Hook::LexWrap might already do exactly what I want (which, of course, doesn't preclude my studying its evil ways source). The documentation is a little sparse about the scope in which the wrappers are executed, but the examples make it look like I might just pass my
sub { BLAH }
as a pre-wrapper to get the desired effect. Thanks so much!

UPDATE: I've had a look at the source, and it seems that most of Hook::LexWrap's magic consists in fooling caller and installing subs in-place (a la memoize), not doing anything with lexical scope. My thoughts should probably have leapt immediately to PadWalker, though I'm not familiar enough with it to know if it'll do what I want. Binding is so so close, but it allows one to peek at bindings “the wrong way” for what I need.