note
tinita
as others said already, in MyNumber, you have implemented the method add different
from the one in SomeData. you have to decide which one you want.
<p>
also, in the new method of SomeData, you have a little error.
if you do<br>
<code>sub new { bless \pop, shift }</code><br>
it's like doing<br>
<code>sub new { bless \42, "MyNumber" }</code><br>
and you can't bless a constant into an object.
so do <code>my $arg = pop; bless \$arg, shift</code>
332883
332883