- or download this
use Math::BigRat; $m = "new"; $a = Math::BigRat->$m(5); $b = Math::Big
+Rat->$m(8); for $m (qw(badd bsub bmul bdiv)) { $x = $a->copy->$m($b);
+ print "$a $m $b = $x\n" }
- or download this
use Math::BigRat; $m = "new"; $a = Math::BigRat->$m(5); $b = Math::Big
+Rat->$m(8); for $m (qw(add sub mul div)) { $x = $a->copy->${\("b".$m)
+}($b); print "$a $m $b = $x\n" }
- or download this
package ParentClass;
# [...]
...
# [...]
}
# [...]
- or download this
sub UNIVERSAL::method {
my($self, $name, @rest) = @_;
...
data => $self->method("gotdata"),
connect => $self->method("connected"),
# [...]