On Tue, 8 Jun 2004, David Storrs wrote:

> 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?

I'm pretty sure it is, yes.

> Second, what does it do under the hood?

First, it sends e-mail to our Quantum Ninjas who may or may not do
Horrible Things to you... (We're never sure)

> Does it need to tear off
> wrappers 1 and 2 before tearing off #3?  Does it need to recompile
> wrappers 1 and 2?

There's no compilation for wrappers when they're installed, so there won't
be any need to recompile on removal. Wrappers will all be done with
chained PMCs, so we'll just remove the removed wrapper from the chain.

> What kind of speed hit am I looking at?

Should take no more than a week, on average. Two, tops.

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to