in reply to Re: OO & multiple inheritance.
in thread OO & multiple inheritance.
(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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: OO & multiple inheritance.
by hardburn (Abbot) on Nov 18, 2004 at 14:54 UTC | |
|
Re^3: OO & multiple inheritance.
by gaal (Parson) on Nov 18, 2004 at 16:35 UTC |