Closed kentfredric closed 7 years ago
@pjacklam those tests for Math::Bigint::LTM
are mostly copy&paste from Math::Bigint::GMP
, do you have any hint how to handle this?
Its worth mentioning, Math::BigInt has the same problem even in its latest release.
@kentfredric what's the usual way of fixing this, adding use lib ".";
in Makefile.PL
? or somewhere else?
When its in tests, the recommended approach is to put a use lib
statement in the invoking test.
You could be lazy and do use lib q[.]
, but it might be better to restructure the files/call names so that you can use something less prone to risk, like use lib './t/lib'
or similar.
However, if the code in question is using "require $file" or "do $file" instead of "use", you can avoid @INC
tweaking and just do :
require "./path/to/file.pm"
do "./path/to/file.pm"
The key magic being that a prefix of "./" side-steps @INC
lookup mechanics.
On perls with -Ddefault_inc_excludes_dot ( explicitly on 5.25.10, default on 5.25.11+ )
@kentfredric I was not able to reproduce the behaviour you have described on 5.25.11 (built via perlbrew with all options left in default) therefore I blindly applied your suggestion in 1891ff7 . Could you please test the new CryptX-0.045?
Thanks in advance.
You have to explicitly set PERL_USE_UNSAFE_INC=0
on 5.25.11 due to TAP::Harness
injecting PERL_USE_UNSAFE_INC=1
when not exists $ENV{PERL_USE_UNSAFE_INC}
( Which subsequently hides real errors as well, and is a temporary workaround provided by TAP::Harness which is scheduled to be removed around perl 5.30 ).
I will however test your release
:+1:
0.045 now passes where 0.044 would not.
sending: (http://cpan.metacpan.org/authors/id/M/MI/MIK/CryptX-0.044.tar.gz, MIK, CryptX-0.044, FAIL)
sending: (http://cpan.metacpan.org/authors/id/M/MI/MIK/CryptX-0.045.tar.gz, MIK, CryptX-0.045, PASS)
On perls with -Ddefault_inc_excludes_dot ( explicitly on 5.25.10, default on 5.25.11+ )