Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Asking An Object For It's Class

by larsen (Parson)
on Aug 13, 2003 at 22:55 UTC ( [id://283710]=note: print w/replies, xml ) Need Help??


in reply to Asking An Object For It's Class

From perldoc -f ref
If the referenced object has been blessed into a package, then that package name is returned instead. You can think of "ref" as a "typeof" operator.
So it's
my $class = ref( $unidentified_object );

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2024-04-24 06:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found