Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I don't really think a consensus has been reached. I'd probably use your first multiple-inheritance based option myself. Your second and third options are really the same thing. Exporter is just a standard mechanism for supplying import based symbol table fiddling. Perl 6 is looking to generalise "mixin" type behaviour a bit with Traits (called 'roles' in Perl 6). You might want to take a look at some of the Perl 5 implementations of this strategy (Class::Role, Class::Roles, Class::Trait). In reply to Re: Implementing a Mixin Class
by adrianh
|
|