Most of the time, I write straightforward Perl OO code using blessed hashrefs and cloning of objects when new() is called on prototypes. Add some AUTOLOAD from a fixed set of attributes (and run-time method generation for speedup).
I try to keep everything nice and subclassable, but when that just wouldn't work, I offer some extension mechanism via delegation like Math::Symbolic::Custom. Also, I tend to offer two interfaces. One kept as simple as possible for the general usage case and one involving things like closures for the ultimate control in pathological cases.
Steffen
In reply to Re: How do YOU do OO in Perl?
by tsee
in thread How do YOU do OO in Perl?
by batkins
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |