This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bigint: Fix new oct override for older Math::BigInt
[perl5.git]
/
dist
/
bignum
/
lib
/
bigint.pm
diff --git
a/dist/bignum/lib/bigint.pm
b/dist/bignum/lib/bigint.pm
index
3120fdd
..
467a67d
100644
(file)
--- a/
dist/bignum/lib/bigint.pm
+++ b/
dist/bignum/lib/bigint.pm
@@
-1,7
+1,7
@@
package bigint;
use 5.006;
package bigint;
use 5.006;
-$VERSION = '0.3
0
';
+$VERSION = '0.3
1
';
use Exporter;
@ISA = qw( Exporter );
@EXPORT_OK = qw( PI e bpi bexp hex oct );
use Exporter;
@ISA = qw( Exporter );
@EXPORT_OK = qw( PI e bpi bexp hex oct );
@@
-137,7
+137,7
@@
sub oct(' . $proto . ')' . <<'.';
{
my $i = @_ ? $_[0] : $_;
# oct() should never fall back to decimal
{
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);
}
.
Math::BigInt->new($i);
}
.
@@
-166,7
+166,7
@@
sub _oct(_)
unless $$hh{bigint}||$$hh{bignum}||$$hh{bigrat};
my $i = $_[0];
# oct() should never fall back to decimal
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);
}
.
Math::BigInt->new($i);
}
.