Subject: | Fails with overload-1.19 |
There is a problem with overload-1.19 and Math-Bigint <= 1.998
causing the test suite to fail in t/11_chinese_rem.t with an
uncaught exception just before test 73:
usage error: positive integer modulus expected at t/11_chinese_rem.t
line 186.
The reason is that Math::BigInt calculates 46338/6 as zero
where Math::ModInt expects a nonzero integer result,
which in turn stems from overload unexpectedly calling
Math::BigInt overloaded "/=" with swapped arguments, which seems
to be a bug in overload-1.19 as it contradicts its documentation.
To summarize, the actual problem is somwhere upstream, cf.:
https://rt.perl.org/rt3/Public/Bug/Display.html?id=113834
It is possible to work around the problem though, by not mixing
Math::BigInt objects and plain perl integers in assignments.
I intend to add a patch to that effect in the upcoming release
Math-ModInt-0.005.
-Martin