Perl: the Markov chain saw | |
PerlMonks |
Re: Re: Private method variationsby esskar (Deacon) |
on Mar 01, 2004 at 02:09 UTC ( [id://332751]=note: print w/replies, xml ) | Need Help?? |
Well, normally "private" variables are named with an "_" at the beginning as a key in the blessed hashref... since the blessed object is "just" a normal data structure in perl, it is always possible to access the data within that structure... but why does the user who is using your module want to kill himself by not using your methods but accessing the datastructure itself?!? On your hand, Perl OO is not as other OO programming like in C++ or java. The blessed "thingy" is not your class object but just an object within your class. so it can not know anything about public or private. Hope, i got it right! Update:Daim... i missed the original post...sorry...stupid mistake...
In Section
Meditations
|
|