in reply to Re: Re: Objects with Private Variables
in thread Objects with Private Variables
What if i wanted to to have both private and public variables inside a perl module?
I cant return a hash with closure reference as one of its members as the object? if i do that then the user can call the closure subroutine directly and access the variables..
lemme start with a real time example..
say i have 3 variables a,b,c and a STATE variable.
The user can manipulate a,b,c but the state will be decided by the class itself. How can i implement this class?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Objects with Private Variables
by Anonymous Monk on Dec 18, 2015 at 16:19 UTC |
In Section
Tutorials