Subject: | Problem module in Perl 5.17.x |
Hi Peter John Acklam,
I found a important problem Math-BigInt (v.>=1.99x,
and possible and others versions)
when it is used in Perl v.5.17.x.
The problem is not the correct operator:
/=
E.g. fragment of the code:
#=========================
use Data::Dumper
use Math::BigInt qw( bgcd );
my @m = (2, 4, 16);
my $gcd = bgcd( @m );
$_ /= $gcd for @m ;
print Dumper \@m;
#=========================
#=== Ok result! output in perl 5.12.4 (or < 5.12) ====
$VAR1 = [
bless( {
'value' => [
1
],
'sign' => '+'
}, 'Math::BigInt' ),
bless( {
'value' => [
2
],
'sign' => '+'
}, 'Math::BigInt' ),
bless( {
'value' => [
8
],
'sign' => '+'
}, 'Math::BigInt' )
];
#=========================
#=== False result! output in perl 5.17.5 (or 5.17.x) ====
$VAR1 = [
bless( {
'value' => [
0
],
'sign' => '+'
}, 'Math::BigInt' ),
$VAR1->[0],
$VAR1->[0]
];
#=========================
Thanks, Alessandro Gorohovski