Skip Menu |

This queue is for tickets about the Apache-Test CPAN distribution.

Report information
The Basics
Id: 123284
Status: new
Priority: 0/
Queue: Apache-Test

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

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



Subject: Apache::TestHarnessPHP uses undeclared variable "$phpclient"

Compile testing showed this:

Global symbol "$phpclient" requires explicit package name (did you forget to declare "my $phpclient"?) at /var/tmp/portage/dev-perl/Apache-Test-1.400.0-r2/work/Apache-Test-1.40/blib/lib/Apache/TestHarnessPHP.pm line 93, <DATA> line 2.
Compilation failed in require at /var/tmp/portage/dev-perl/Apache-Test-1.400.0-r2/work/Apache-Test-1.40/blib/lib/Apache/TestRunPHP.pm line 27, <DATA> line 2.
BEGIN failed--compilation aborted at /var/tmp/portage/dev-perl/Apache-Test-1.400.0-r2/work/Apache-Test-1.40/blib/lib/Apache/TestRunPHP.pm line 27, <DATA> line 2.
Compilation failed in require, <DATA> line 2.
BEGIN failed--compilation aborted, <DATA> line 2.  


Its obvious that nothing declares this variable prior to use:

https://metacpan.org/source/SHAY/Apache-Test-1.40/lib/Apache/TestHarnessPHP.pm#L93

But how to fix the code is not clear.

-- 
- CPAN kentnl@cpan.org
- Gentoo Perl Maintainer kentnl@gentoo.org ( perl@gentoo.org )
 

Subject: 0003-Don-t-die-at-load-time-due-to-undeclared-phpclient.patch
From 2dbb0fcab02ea60c0ca5e6ab4150691ffcfb8d7c Mon Sep 17 00:00:00 2001 From: Kent Fredric <kentnl@gentoo.org> Date: Sun, 15 Oct 2017 06:47:45 +1300 Subject: Don't die at load time due to undeclared '$phpclient' Bug: https://rt.cpan.org/Ticket/Display.html?id=123284 --- lib/Apache/TestHarnessPHP.pm | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/Apache/TestHarnessPHP.pm b/lib/Apache/TestHarnessPHP.pm index 90fdedc..806ba6f 100644 --- a/lib/Apache/TestHarnessPHP.pm +++ b/lib/Apache/TestHarnessPHP.pm @@ -90,11 +90,6 @@ sub get_tests { 'make sure php is in your PATH'); @tests = grep { not /\.php$/ } @tests; } - elsif (! $phpclient) { - warning(join ' - ', 'skipping *.php tests', - 'Test::Harness 2.38 not available'); - @tests = grep { not /\.php$/ } @tests; - } return @tests; } -- 2.14.2