Subject: | Fails build when no '.' in @INC |
With perl 5.26.0 (for example):
$ perl Makefile.PL
Can't locate inc/Module/Install.pm in @INC (you may need to install the inc::Module::Install module) (@INC contains: /opt/perl-5.26.0/lib/site_perl/5.26.0/x86_64-linux /opt/perl-5.26.0/lib/site_perl/5.26.0 /opt/perl-5.26.0/lib/5.26.0/x86_64-linux /opt/perl-5.26.0/lib/5.26.0) at Makefile.PL line 1.
BEGIN failed--compilation aborted at Makefile.PL line 1.
A possible fix is to add something like
use lib ".";
on top of Makefile.PL.
Note that CPAN clients like CPAN.pm and cpanm do some magic so it only fails when building from commandline. But this magic will be removed in later versions of these clients & perl versions.