package bigint;
use 5.006;
-$VERSION = '0.30';
+$VERSION = '0.31';
use Exporter;
@ISA = qw( Exporter );
@EXPORT_OK = qw( PI e bpi bexp hex oct );
{
my $i = @_ ? $_[0] : $_;
# oct() should never fall back to decimal
- return Math::BigInt->from_oct($i) if $i =~ /^(?:0[0-9]|[1-9])/;
+ return Math::BigInt->from_oct($i) if $i =~ s/^(?=0[0-9]|[1-9])/0/;
Math::BigInt->new($i);
}
.
unless $$hh{bigint}||$$hh{bignum}||$$hh{bigrat};
my $i = $_[0];
# oct() should never fall back to decimal
- return Math::BigInt->from_oct($i) if $i =~ /^(?:0[0-9]|[1-9])/;
+ return Math::BigInt->from_oct($i) if $i =~ s/^(?=0[0-9]|[1-9])/0/;
Math::BigInt->new($i);
}
.