![]() |
|
good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( #3333=superdoc: print w/replies, xml ) | Need Help?? |
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 In reply to Re: Confused by OO & tie
by davido
|
|