Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^2: Does one encapsulate a class from itself?by amarquis (Curate) |
on Mar 06, 2008 at 19:39 UTC ( [id://672550]=note: print w/replies, xml ) | Need Help?? |
Yes. I do not remember the exact results, but I expected a noticeable difference since each get/set does data validation (since my accessors are part of the external interface, they have to make sure everything coming in is kosher. The module itself already knows it has "good" data and can just push it into the array, or update a cell). I could fix this by having internal only accessors, like ikegami mentions. I'll try it and see if the difference is measurable.
In Section
Seekers of Perl Wisdom
|
|