I actually always use accesors when dealing with attributes to allow for subclasses to override how they wish to deal with an attribute.One of the reasons I use objects is because of encapsulation. Nothing, but the class itself, is allowed to have behaviour that's depending on the class' implementation. And that includes masking accessors. A subclass is not even allowed to know what is an accessor and what isn't.
In reply to Re^4: Perl OO and accessors
by Perl Mouse
in thread Perl OO and accessors
by dragonchild
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |