Skip Menu |
 

This queue is for tickets about the Monitoring-Plugin CPAN distribution.

Report information
The Basics
Id: 121467
Status: open
Priority: 0/
Queue: Monitoring-Plugin

People
Owner: Nobody in particular
Requestors: KENTNL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Attachments
Monitoring-Plugin-0.39-Fix-building-on-Perl-without-.-in-INC.patch



Subject: Makefile.PL fails when no '.' in @INC (Can't locate inc/Module/Install.pm in @INC )
Note: templated response follows

Perl 5.25.11 removes '.' from the default @INC, and this breaks `use inc::Module::Install` due to not being able to assume ./inc/Module/Install.pm is in the @INC load path.

This is not a complete end-of-the-world problem, as Perl provides a temporary workaround variable (PERL_USE_UNSAFE_INC=1) affected users can set that restores '.' in @INC temporarily to "just work", and for end users convenience, CPAN.pm, cpanm, prove and TAP::Harness ( called in `make test` ) set this variable, creating an illusion during installation that this problem is not there

However, this should still be considered a serious issue, as many types of end users don't get the luxury afforded by the CPAN-and-friends hacks ( vendors, hand installers, people running `perl t/foo.t` ), and this workaround is scheduled to be removed in the future.

And due to aforementioned temporary conveniences and hacks, you should intentionally defeat said hacks when testing you've fixed this, by explicitly setting PERL_USE_UNSAFE_INC=0 in your environment prior to running Makefile.PL and tests, and ensuring to perform said tests on Perl 5.25.11 or newer

Recommended solution for Makefile.PL is simply injecting a `use lib '.'` statement in Makefile.PL before the `use inc::Module::Install;` statement.

For more details, check http://blogs.perl.org/users/ryan_voots/2017/04/trials-and-troubles-with-changing-inc.html

---

Raw Error Observed:

Configuring Monitoring-Plugin-0.39 ... Can't locate inc/Module/Install.pm in @INC (you may need to install the inc::Module::Install module) (@INC contains: /home/kent/perl5/perlbrew/perls/5.25.12-nossp-sip13-nopmc-nodot/lib/site_perl/5.25.12/x86_64-linux /home/kent/perl5/perlbrew/perls/5.25.12-nossp-sip13-nopmc-nodot/lib/site_perl/5.25.12 /home/kent/perl5/perlbrew/perls/5.25.12-nossp-sip13-nopmc-nodot/lib/5.25.12/x86_64-linux /home/kent/perl5/perlbrew/perls/5.25.12-nossp-sip13-nopmc-nodot/lib/5.25.12) at Makefile.PL line 1.
 

-- 
- CPAN kentnl@cpan.org
- Gentoo Perl Maintainer kentnl@gentoo.org ( perl@gentoo.org )
From: ppisar [...] redhat.com
Download (untitled) / with headers
text/plain 348b
Dne Ne 30.dub.2017 10:36:22, KENTNL napsal(a): Show quoted text
> Note: templated response follows > > Perl 5.25.11 removes '.' from the default @INC, and this breaks `use > inc::Module::Install` due to not being able to assume > ./inc/Module/Install.pm > is in the @INC load path. >
A fix is attached. Another solution is not to use inc::Module::Install at all.
Subject: Monitoring-Plugin-0.39-Fix-building-on-Perl-without-.-in-INC.patch
From 5c5db595827257a51d9fdc13c7cd4dc1e225973a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com> Date: Wed, 17 May 2017 14:33:49 +0200 Subject: [PATCH] Fix building on Perl without "." in @INC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Petr Písař <ppisar@redhat.com> --- Makefile.PL | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.PL b/Makefile.PL index 2fa285d..b3c293f 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,3 +1,4 @@ +BEGIN { push @INC, '.'; } use inc::Module::Install; name 'Monitoring-Plugin'; -- 2.9.4


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.