Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Tying objects

by Arunbear (Prior)
on Feb 07, 2009 at 20:59 UTC ( [id://742169]=note: print w/replies, xml ) Need Help??


in reply to Tying objects

Use tied to get to the actual object that implements the behaviour of $var:
tied($var)->print_method;

Replies are listed 'Best First'.
Re^2: Tying objects
by JadeNB (Chaplain) on Feb 08, 2009 at 00:04 UTC
    To elaborate on this, what tie accomplishes is to make Perl pretend that a reference object is something else. That is, it acts here as if $var is a simple scalar, not a reference object. (It's probably easier to see that this must be the case when tieing an array or a hash.)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-25 19:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found