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
In reply to Re: Howto keep private methods private?
by erroneousBollock
in thread Howto keep private methods private?
by perl-diddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |