I've got a Base class, called Object::Base. I've also got Object::Singleton and Object::ReadOnly. So, now, I want to be able to create a readonly singleton. Ok. Not a problem. Except, I don't want to create a Object::ReadOnlySingleton class. (I anticipate adding 3-4 other orthogonal attributes.)
The problem is depth-first method searching. There's some dovetailing between how O::Singleton and O::ReadOnly do their work. O::Singleton calls a method that O::ReadOnly overrides, and vice-versa. If I inherit from them both, I miss whichever is second in @ISA.
So, in short - yes, I want this. I'll be treating Traits as a neat implementation of Decorator, but it still works. :-)
------
We are the carpenters and bricklayers of the Information Age.
Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
In reply to Re: Class::Trait to the CPAN?
by dragonchild
in thread Class::Trait to the CPAN?
by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |