in reply to negative modulus test failure

See the comment in the integer manpage:
Internally, native integer arithmetic (as provided by your C compiler) is used. This means that Perl's own semantics for arithmetic operations may not be preserved. One common source of trouble is the modulus of negative numbers, which Perl does one way, but your hardware may do another.
% perl -le 'print (4 % -3)' -2 % perl -Minteger -le 'print (4 % -3)' 1
Hope that helps.

/J\