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
In reply to Re: Better way to test Object Inheritance?
by kcott
in thread Better way to test Object Inheritance?
by throop
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |