On Sun, Aug 28, 2005 at 05:18:42 -0400, David Storrs wrote: > > On Aug 28, 2005, at 5:12 AM, Yuval Kogman wrote: > > >On Sun, Aug 28, 2005 at 05:02:25 -0400, David Storrs wrote: > >>nested_call.wrap(), maybe? > >It's not 100% the same thing... Wrapping is for wrapping only. This > >applies to super methods, delegate methods, and so forth. > > > If I understand the semantics of wrap() properly, I believe you can do > everything with wrap that you want. I agree it's not the optimal way > though...for one > thing, you have to write the code inside out.
Not without breaking polymorphism, or doing creepy things like: our &method = $?CLASS.can("method").wrap { ... call ... }; instead of method method { $?SELF.SUPER::method; # what's the syntax for this, btw? # Can't find it under s12 } On the other hand, one thing i'd like to borrow is the ability to use 'call' for "delegating" subroutines: sub foo will call(&other) { call; # just like saying other() } -- () Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker & /\ kung foo master: /me kicks %s on the nose: neeyah!!!!!!!!!!!!!!!!!
pgp0cw0jRm4ne.pgp
Description: PGP signature