in reply to Is reference blessed?
Answering the 2nd half of the question, nine years late:
# We want the true type of blessed objects like XML::DOM::Document my $true_type; if(ref($value)) { $true_type = scalar($value); $true_type =~ s/.*=(\w*).*/$1/; } print ref($value)," is really an $true_type\n";
That's ugly. It takes the scalar value of the reference, which just happens to show both the blessed type and the native type. But it works.XML::DOM::Document is really an ARRAY
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Is reference blessed?
by ikegami (Patriarch) on Mar 26, 2010 at 04:26 UTC |
In Section
Seekers of Perl Wisdom