in reply to Better way to test Object Inheritance?
G'day throop,
"Is there a straightforward way to check if an instance inherits from a particular class?"
Take a look at UNIVERSAL. In particular, the isa method:
"When used as an instance or class method ($obj->isa( TYPE )), isa returns true if $obj is blessed into package TYPE or inherits from package TYPE."
-- Ken
|
|---|