Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Confused by OO & tie

by davido (Cardinal)
on May 17, 2004 at 15:58 UTC ( [id://354016]=note: print w/replies, xml ) Need Help??


in reply to Confused by OO & tie

tie, and perltie are two docs that discuss how to tie variables to objects. But think of it exactly that way; you have an object that you're tieing a variable to.

That means that Object Oriented Programming doesn't necessarily mean using tie. tie is just one use of OO.

While tieing variables and filehandles can be a pretty neat trick, it doesn't necessarily lend itself to readability. Most people seeing $var = 10; expect it to do just that; assign ten to the variable $var. With tie, it could actually mean print "Fooled you! Ha!\n";. So keep in mind that if you do use tie, you may make your code harder to read.


Dave

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-04-10 20:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found