Class::Method::Cannot?

Aaron Trevena aaron.trevena at gmail.com
Fri May 2 19:55:27 BST 2008


2008/4/28 Ian Malpass <ian at indecorous.com>:
>  Actually, in the particular case of the problem I'm working on now, I think
> I'm going to add in another base class to inherit from, and the subclass
> that doesn't want those methods won't use that base class.
>
>  But that approach won't work all the time - is there anything out on CPAN
> that helps with the encapsulate-and-expose approach? Or any design
> recommendations?
>
>  Doing things properly is obviously a Good Thing, but it seemed a heck of a
> lot simpler to say "this, minus these" than to go off and add do fun stuff
> with extra encapsulating classes, etc. :)

Class::Trait might help with this - access the stuff you need via a
Trait rather than inheritence.

A.


-- 
http://www.aarontrevena.co.uk
LAMP System Integration, Development and Hosting


More information about the london.pm mailing list