5.26 will come with a major change in how Perl builds and runs modules. The current directory will not be in @INC when running Perl programs.
This affects all programs that call require or use and expect files relative to the current directory to be available. Besides plugin systems, any Makefile.PL using for example Module::Install is a likely offender. So far very little has been caught in the net of CPAN testers.
As an example, one of my tests loads Makefile.PL:
use lib '.'; use vars '%module'; require 'Makefile.PL'; # Loaded from Makefile.PL %module = get_module_info(); my $module = $module{NAME};
This will fail under 5.26+ without the use lib '.'; statement at the top.
I've altered @INC, pray I do not alter it further
If you want to check whether your modules should still work and test OK under the upcoming 5.26 release, I think that the following oneliner should give you a good indication:
perl -M-lib=. Makefile.PL && make && make test
If you run author tests or prefer your tests to be run using prove, you have to take care of prove invoking a fresh Perl:
# Windows syntax: set PERL5OPT=-M-lib=. perl Makefile.PL && dmake && prove -bl xt t
@rem Shell syntax: export PERL5OPT=-M-lib=. perl Makefile.PL && make && prove -bl xt t
Please test your distributions and release new versions if they need . in @INC. Thanks!
Update: Added call to action and noted where use lib '.' helps.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: #p5p finds your lack of failing tests disturbing
by shmem (Chancellor) on Mar 27, 2017 at 22:11 UTC | |
|
Re: #p5p finds your lack of failing tests disturbing
by RonW (Parson) on Mar 28, 2017 at 22:34 UTC | |
|
Re: #p5p finds your lack of failing tests disturbing
by Anonymous Monk on Mar 27, 2017 at 19:02 UTC |