in reply to Howto keep private methods private?
I most like the suggestion to bless a sub-ref (the accessor) which closes over the object payload.
In that scheme instance methods must call the accessor to gain access to the now-invisible data; you can also use caller() in your accessor to ensure that whatever semantics for ecapsulation you desire is enforced.
-David
|
|---|