http://qs1969.pair.com?node_id=831017


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";
XML::DOM::Document is really an ARRAY
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.