good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: what's difference between bless and tie?by BrowserUk (Patriarch) |
on Dec 23, 2012 at 13:37 UTC ( [id://1010095]=note: print w/replies, xml ) | Need Help?? |
With tie you bless a named variable, and a predefined set of methods for that variable type are called automatically as the variable is used. It allows the variables to be used exactly as if they were normal Perl variables of that type rather than requiring the methods be called using object syntax, which makes for very natural usage:
Rather than the clumsy:
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section
Seekers of Perl Wisdom
|
|