Help for this page

Select Code to Download


  1. 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" }
    
  2. 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" }
    
  3. or download this
    package ParentClass;
    # [...]
    ...
            # [...]
    }
    # [...]
    
  4. or download this
    sub UNIVERSAL::method { 
            my($self, $name, @rest) = @_;
    ...
                    data       => $self->method("gotdata"),
                    connect    => $self->method("connected"),
    # [...]