Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

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'}.

Replies are listed 'Best First'.
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?


    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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://982079]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2018-05-27 14:11 GMT
Find Nodes?
    Voting Booth?