Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2020-09-21 12:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (125 votes). Check out past polls.

    Notices?