Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: ...unblessed reference...

by jdporter (Canon)
on Jul 16, 2012 at 20:26 UTC ( #982079=note: print w/ replies, xml ) Need Help??


in reply to Re: ...unblessed reference...
in thread ...unblessed reference...

Data encapsulation/privacy. It means no calling code can snoop on the object's data by doing $obj->{'member'}.


Comment on Re^2: ...unblessed reference...
Download Code
Re^3: ...unblessed reference...
by CountZero (Bishop) on Jul 16, 2012 at 22:25 UTC
    I have always found this encapsulation / privacy thing vastly overrated. If people want to snoop inside your objects (and discover the data they themselves previously put inside the object) and possibly mess up everything, then it is their responsibility, isn't it?

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics
      PadWalker FTW. Perl isn't C++. If you want privacy for proprietary software, compile an XS module. Even C/C++ won't stop a determined adversary. For example, in a callback, peeking at the C stack of your caller to get the job done. I've heard that being done in Windows land to get file handles which MS's API doesn't expose to callbacks yet are necessary to know. All the pitfalls aside.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2014-09-03 05:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (35 votes), past polls