On Fri, 9 Aug 2003, Rick Measham wrote:

> On Sat, 2003-08-09 at 06:55, Dave Rolsky wrote:
> > So what I think we really want is this:
> >
> >   my $Wrapper = DT::Wrapper->wrapper( [$class1, $class2, $class3] );
>
> Maybe my approach has some holes, but have a look at the attached and
> see what you think ...

The big hole is that you set @ISA when you create the decorator, but what
if someone creates two _different_ decorators?  In that case you've just
broken the first one you made.

Also, we want to be able to use SUPER::foo inside the decorating classes.
For example, Josh's DT::Cache will obviously need to call it's parent's
new() method.

This means that we can't just use multiple inheritance, but instead we
need to create an actual chain of inheritance.


-dave

/*=======================
House Absolute Consulting
www.houseabsolute.com
=======================*/

Reply via email to