in reply to RFC Class::AppendMethods

It just hit me, couldn't you do what what Class::AppendMethods does with Class::Delegation by TheDamian?


MJD says you can't just make shit up and expect the computer to know what you mean, retardo!
I run a Win32 PPM repository for perl 5.6x+5.8x. I take requests.
** The Third rule of perl club is a statement of fact: pod is sexy.

Replies are listed 'Best First'.
Re: Re: RFC Class::AppendMethods
by diotalevi (Canon) on Apr 22, 2003 at 12:40 UTC

    Yes.... it looks like it might be possible. I didn't know about C::D's multiple method calling functionality. Instead of calling append_method I can use C::D (assuming I know all the methods I want to use at onece, build a bit of perl code and then eval that. I'll keep this in mind but I don't think this is any easier. Thanks PodMaster.

    my @methods_q = map "sub { \$_[0]->GreenPartyDB::Database::$method( \@ +_[ 1 .. \$#_ ] ) }", @methods; my $method_c = join ", ", @method_c; eval qq[ package GreenPartyDB::Database::${table}; use Class::Delegation send => '$hook', to => [ $method_c ];