Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re^3: Objects with Private Variables

by akr8986 (Initiate)
on Dec 18, 2015 at 11:37 UTC ( #1150686=note: print w/replies, xml ) Need Help??

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

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2021-01-25 23:30 GMT
Find Nodes?
    Voting Booth?