(You can tell what kind of Animal you have by calling ref $obj on an instance.)But don't do that, as it will break the "null subclass test". Instead, use "isa" or "can" to test inheritance or capability. The code:
is almost always wrong, and is red-flagged in my code reviews.if (ref $this eq "Some::Class::Of::Interest") { ... }
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to •Re^2: OO & multiple inheritance.
by merlyn
in thread OO & multiple inheritance.
by yoda54
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |