Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: Asking An Object For It's Class

by larsen (Parson)
on Aug 13, 2003 at 22:55 UTC ( #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 );

Comment on Re: Asking An Object For It's Class
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2015-11-26 01:15 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (695 votes), past polls