$ref =~ /HASH/
or$ref =~ /(^|=)HASH\b/
which checks the "stringification" of the reference. But
this fails for objects that have stringification
overloaded. It is better than ref(), but I still don't
want to make code that breaks for such cases. I
have seen cases of this, but unfortunately I
don't remember where. :(
If UNIVERSAL::isa() is a pig, then an efficient replacement
needs to be provided (Hmmm... that would be an easy XS to
write...).
I didn't think that UNIVERSAL::isa()
would search the inheritance tree since whether a blessed
reference is a hash or not has nothing to do with
inheritance. I hadn't looked into how isa() is implemented.
You'll have to read universal.c if you are that interested.
I started to and realized I don't have that much time right
now.
-
tye
(but my friends call me "Tye") |