'Math::BigRat' =>
{
'MAINTAINER' => 'tels',
- 'DISTRIBUTION' => 'TELS/math/Math-BigRat-0.22.tar.gz',
+ 'DISTRIBUTION' => 'LETO/Math-BigRat-0.24.tar.gz',
'FILES' => q[ext/Math-BigRat],
'EXCLUDED' => [ qr{^inc/},
qw{
@ISA = qw(Math::BigFloat);
-$VERSION = '0.22';
+$VERSION = '0.24';
+$VERSION = eval $VERSION;
use overload; # inherit overload from Math::BigFloat
}
# simple string input
- if (($n =~ /[\.eE]/))
+ if (($n =~ /[\.eE]/) && $n !~ /^0x/)
{
# looks like a float, quacks like a float, so probably is a float
$self->{sign} = 'NaN';
This routine is automatically used whenever a scalar is required:
my $x = Math::BigRat->new('3/1');
- @array = (1,2,3);
+ @array = (0,1,2,3);
$y = $array[$x]; # set $y to 3
=head2 as_int()/as_number()
=head1 AUTHORS
-(C) by Tels L<http://bloodgate.com/> 2001 - 2008.
+(C) by Tels L<http://bloodgate.com/> 2001 - 2009.
+
+Currently maintained by Jonathan "Duke" Leto <jonathan@leto.net> L<http://leto.net>
=cut
$| = 1;
chdir 't' if -d 't';
unshift @INC, '../lib'; # for running manually
- plan tests => 198;
+ plan tests => 200;
}
# basic testing of Math::BigRat
$x = $cr->$func('-inf'); ok ($x,'-inf');
$x = $cr->$func('1/'); ok ($x,'NaN');
+ $x = $cr->$func("0x7e"); ok($x, 126);
+
# input ala '1+1/3' isn't parsed ok yet
$x = $cr->$func('1+1/3'); ok ($x,'NaN');