in reply to if (UNIVERSAL::isa($r, ref $l))
If you feel a desire to hardcode the current package, use __PACKAGE__ instead. That can be right for many occasions.
Another interesting thing though is that
$a + $b
can work, while
$b + $a
might not. This is quite unfortunate. $b might "bea" $a, but unless they're of the same class, $a won't "bea" $b.
Neither I see why you'd require anything more from the objects than them to be a derivate of the current class if you allow them to be of different classes already. But then again, I've never claimed to be especially enlightened when it comes to OO programming. I have a bad feeling about this though.
ihb
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: if (UNIVERSAL::isa($r, ref $l))
by demerphq (Chancellor) on Jul 24, 2003 at 00:11 UTC |