On Mon, Jun 25, 2001 at 11:36:34PM +0200, Trond Michelsen wrote: > The downside is of course that I need to make a small stub for every > single function I want to delegate. Well, that's relatively simple to automate... %Delegations = ( foo => '_This', bar => '_This', yar => '_That', ); while(my($meth, $key) = %Delegations) { *{$meth} = sub { my($self) = shift; $self->{$key}->$meth(@_); }; } So $obj->foo(@args) becomes $obj->{_This}->foo(@args). Ahh, the magic of closures. Wasn't Damian working on something like this? I looked at his delegation stuff in perl5+i, but it didn't seem to have anything to do with this sort of delegation. -- Michael G. Schwern <[EMAIL PROTECTED]> http://www.pobox.com/~schwern/ Perl6 Quality Assurance <[EMAIL PROTECTED]> Kwalitee Is Job One <purl> Hey Schwern! honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk!
- Re: Multiple classifications of an object Gregory Williams
- Re: Multiple classifications of an object Michael G Schwern
- Re: Multiple classifications of an object Peter Scott
- Re: Multiple classifications of an object Dan Sugalski
- Re: Multiple classifications of an object Michael G Schwern
- RE: Multiple classifications of an object David Whipp
- Re: Multiple classifications of an object Damian Conway
- Re: Multiple classifications of an object John Porter
- ALLCAPS subs, properties, etc (Re: Multiple classif... Nathan Wiger
- Re: Multiple classifications of an object Trond Michelsen
- Re: Multiple classifications of an object Michael G Schwern
- Re: Multiple classifications of an object Damian Conway
- Re: Multiple classifications of an object David L. Nicol
- RE: Multiple classifications of an object David Whipp
- RE: Multiple classifications of an object Dan Sugalski
- Re: Multiple classifications of an object Bart Lateur
- Re: Multiple classifications of an object John Porter
- Re: Multiple classifications of an object Dan Sugalski
- Re: Multiple classifications of an object Mark Koopman
- Re: Multiple classifications of an object Dan Sugalski
- Re: Multiple classifications of an object John Porter