On Mon, Sep 04, 2000 at 09:53:39PM -0000, Perl6 RFC Librarian wrote: > The proposed delegation mechanism would work via a pragma: > > use delegation > attr1 => [qw( method1 method2 method3 )], > attr2 => [qw( method4 method5 )], > attr3 => [], > attr4 => [], > # etc. > ; > > This would cause method calls whose names match an element in the first > list to be delegated to the "attr1" attribute of an object. Likewise, > calls to a method whose name appears in the second list would be > forwarded to the "attr2" attribute of the object. > > That is, calls like: > > $obj->method3(@args); > $obj->method5(@other_args); Is this not just a module which creates the necessary subs in the calling package ? The catchall can be done with an AUTOLOAD sub. Graham.
- RFC 193 (v1) Objects : Core support for method delegat... Perl6 RFC Librarian
- Re: RFC 193 (v1) Objects : Core support for metho... Uri Guttman
- Re: RFC 193 (v1) Objects : Core support for metho... Damian Conway
- Re: RFC 193 (v1) Objects : Core support for m... Uri Guttman
- Re: RFC 193 (v1) Objects : Core support for metho... Michael G Schwern
- Re: RFC 193 (v1) Objects : Core support for m... Piers Cawley
- Re: RFC 193 (v1) Objects : Core support for metho... Piers Cawley
- Re: RFC 193 (v1) Objects : Core support for metho... Graham Barr
- Re: RFC 193 (v1) Objects : Core support for metho... David E. Wheeler
- Re: RFC 193 (v1) Objects : Core support for metho... Damian Conway
- Re: RFC 193 (v1) Objects : Core support for metho... Damian Conway
- Re: RFC 193 (v1) Objects : Core support for m... Nathan Wiger
- Re: RFC 193 (v1) Objects : Core support for m... David E. Wheeler
- Re: RFC 193 (v1) Objects : Core support for m... Damian Conway
- Re: RFC 193 (v1) Objects : Core support f... David E. Wheeler
- Re: RFC 193 (v1) Objects : Core suppo... David L. Nicol
- Re: RFC 193 (v1) Objects : Core ... David E. Wheeler
- Re: RFC 193 (v1) Objects : Core ... Damian Conway