CC: | hv [...] crypt.org |
Subject: | precedence error in Math::BigInt::objectify() |
This line in objectify():
$k->can('as_number') ? $k = $k->as_number() : $k = $a[0]->new($k);
needs to be:
$k->can('as_number') ? $k = $k->as_number() : ($k = $a[0]->new($k));
or more simply:
$k = $k->can('as_number') ? $k->as_number() : $a[0]->new($k);
Currently, if $k->can('as_number') is true, it will then evaluate ($k =
$k->as_number()) = $a[0]->new($k). This is present as least as far back
as v1.73, which is the oldest version I have to hand.
Hugo