Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


in reply to Re: Does one encapsulate a class from itself?
in thread Does one encapsulate a class from itself?

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://672550]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (4)
As of 2024-03-29 12:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found