in reply to Re^2: Perl OO and accessors
in thread Perl OO and accessors
That's an interesting statement. I actually always use accesors when dealing with attributes to allow for subclasses to override how they wish to deal with an attribute. But, I tend to work either with datastructure-type classes like Tree where the algorithms of the class need to be separated from the datastorage of the class or with templating engines like Excel::Template where a given node doesn't know if it actually has the attribute or not. (Its parent might have the attribute, so it has to ask a separate context object where the attribute actually has a value.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Perl OO and accessors
by xdg (Monsignor) on Nov 29, 2005 at 13:26 UTC | |
by chromatic (Archbishop) on Nov 29, 2005 at 19:27 UTC | |
by herveus (Prior) on Nov 29, 2005 at 20:21 UTC | |
|
Re^4: Perl OO and accessors
by Perl Mouse (Chaplain) on Nov 29, 2005 at 13:10 UTC |