monkeyhelper has asked for the wisdom of the Perl Monks concerning the following question:
I have a object that I'd like to retrieve the classname for :
print Dumper $object
gives:
$VAR1 = bless( {}, 'Some::Object' );
I'd like to be able to retrieve 'Some::Object' as a string to operate on. I'm sure the answer must be simple but I've not been able to find a way to do it other than add a getter to the class to store the information, which isn't particularly elegant as the information is already there.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Retrieving classname from an object
by chromatic (Archbishop) on Jul 10, 2006 at 23:09 UTC | |
|
Re: Retrieving classname from an object
by runrig (Abbot) on Jul 10, 2006 at 23:10 UTC | |
by Hue-Bond (Priest) on Jul 10, 2006 at 23:57 UTC | |
by monkeyhelper (Initiate) on Jul 10, 2006 at 23:28 UTC | |
by perrin (Chancellor) on Jul 10, 2006 at 23:35 UTC | |
by monkeyhelper (Initiate) on Nov 26, 2006 at 20:25 UTC | |
by monkeyhelper (Initiate) on Jul 10, 2006 at 23:46 UTC | |
|
Re: Retrieving classname from an object
by diotalevi (Canon) on Jul 11, 2006 at 02:34 UTC |