On Sunday, August 17, 2003, at 07:04 pm, Nigel Rantor wrote:
As an addendum to the original question, consider that there are three or four different sub-sets of functionality that you would like to provide the Base module.
If these sub-sets are completely seperable then how do you implement them so that you can pull in one or two of the sub-sets witout hoisting symbols into the Base package and allowing other people to still sub-class Base.
Mixins would be one way:
package Foo;
sub foo { ... };package Bar;
sub bar { ... };package BaseWithFooBar; use base qw(Base Foo Bar);
my $o = BaseWithFooBar->new; $o->foo; $o->bar;
Or you could go the AOP route with Aspect.pm. Or, you could create a proxy and delegate methods to helper classes.
Gosh... there seems to be a more than one way of doing it :-)
Adrian
