Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Trying to understand Perl Objects

by stvn (Monsignor)
on Apr 07, 2009 at 00:35 UTC ( [id://755900]=note: print w/replies, xml ) Need Help??


in reply to Re: Trying to understand Perl Objects
in thread Trying to understand Perl Objects

Some people prefer to construct their objects using blessed array references. They feel it makes the object a little more opaque - unlike hash keys there is nothing in an array to indicate which variable has which meaning, thus making it harder to bypass accessor methods to get at data.

I have never heard this rationale before, but it smells of "Security through obscurity" rather then any real solid reasoning. The most widely used array-based OOP module I know of is POE and that choice was made very specifically because of performance. Of course this was like 1999 performance, so how applicable that still is on modern systems I don't know.

-stvn
  • Comment on Re^2: Trying to understand Perl Objects

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-24 05:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found