On Tue, Jun 08, 2004 at 01:08:13PM -0000, Ingo Blechschmidt wrote: > Hello, > > quoting Apocalypse 6: > > You may ask a subroutine to wrap itself up in another subroutine in > > place, so that calls to the original are intercepted and interpreted by > > the wrapper, even if access is only through the reference: > > > > $id = $subref.wrap({ > > # preprocessing here > > call; > > # postprocessing here > > } > [...] > > The $id is useful for removing a particular wrapper: > > > > $subref.unwrap($id);
Hmmm. What happens when I do this?: $id1 = $subref.wrap({ <stuff> }); $id2 = $subref.wrap({ <more stuff> }); $id3 = $subref.wrap({ <other stuff> }); $id4 = $subref.wrap({ <different stuff> }); $subref.unwrap($id3); First off, is this even valid? Second, what does it do under the hood? Does it need to tear off wrappers 1 and 2 before tearing off #3? Does it need to recompile wrappers 1 and 2? What kind of speed hit am I looking at? --Dks