Subject: | False claim of API v2 conformance (missing _nok() method) |
Math::BigInt::GMP claims to be API v2 conformant:
$ perl -MMath::BigInt::GMP -wle 'print Math::BigInt::GMP->api_version'
2
But it isn't, because the required _nok() method is missing:
$ perl -MMath::BigInt::GMP -wle '$LIB = "Math::BigInt::GMP"; $x =
$LIB->_new(7); $y = $LIB->_new(5); $z = $LIB->_nok($x, $y); print
$LIB->_str($z)'
Can't locate object method "_nok" via package "Math::BigInt::GMP" at -e
line 1.
The first trace of the _nok() method appears in version 1.22. The
CHANGES file says "support api_version() 2 by adding _nok()". Alas,
there are no traces of _nok() actually being implemented.
This error is not deteced because, as with *all* other library
functions, there is no explicit test of the library method!
Math::BigInt doesn't fail because it includes a test to see if _nok() is
available. "if ($CALC->can('_nok')) { ...".