Rational Number module in Perl