Skip Menu |

This queue is for tickets about the Math-ModInt CPAN distribution.

Report information
The Basics
Id: 78149
Status: resolved
Priority: 0/
Queue: Math-ModInt

People
Owner: hasch-cpan [...] cozap.com
Requestors: mhasch-cpanbugs [...] cozap.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.004
Fixed in: 0.007



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
As of version 0.007, Math::ModInt is no longer hurt by this issue and should be able to work with overload-1.19. Be aware, though, that the bug in overload-1.19 may break other modules, too. -Martin