Skip Menu |
 
rt.cpan.org will be shut down on March 1st, 2021.

This queue is for tickets about the Filter CPAN distribution.

Report information
The Basics
Id: 106090
Status: resolved
Priority: 0/
Queue: Filter

People
Owner: RURBAN [...] cpan.org
Requestors: KENTNL [...] cpan.org
Cc:
AdminCc:

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

Attachments


Subject: t/z_pod-coverage.t causes test failures on Test::More <= 0.87_01
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
X-RT-Interface: Web
Message-ID: <rt-4.0.18-2867-1437846034-641.0-0-0 [...] rt.cpan.org>
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1437846034-2867-2"
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 0
Content-Disposition: inline
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: binary
Content-Length: 915

I see the test already has a guard that aims to prevent against failures on Test::More <= 0.88, however, it seems to fail anyway because the sub declaration renders a compile failure before the `plan => ` line can get invoked:

 

Output as follows:

 

t/z_pod-coverage............Bareword "done_testing" not allowed while "strict subs" in use at t/z_pod-coverage.t line 18.
Execution of t/z_pod-coverage.t aborted due to compilation errors.
 

 

Patching around to solve this problem with a BEGIN block is reasonably trivial, but patch included anyway and I have personally tested with this patch applied with success.

 

I would appreciate if this patch (or some equivalent workaround) landed in some future release, but I'm not pressed for a when =)

Thanks.

Subject: filter-1.54-pod-coverage-test.patch
MIME-Version: 1.0
Content-Type: text/x-patch; name="filter-1.54-pod-coverage-test.patch"
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline; filename="filter-1.54-pod-coverage-test.patch"
Content-Transfer-Encoding: binary
Content-Length: 638
diff -Naur Filter-1.54/t/z_pod-coverage.t Filter-1.54-patched/t/z_pod-coverage.t --- Filter-1.54/t/z_pod-coverage.t 2014-06-05 04:09:24.000000000 +1200 +++ Filter-1.54-patched/t/z_pod-coverage.t 2015-07-26 02:11:10.469674453 +1200 @@ -2,11 +2,11 @@ use strict; use warnings; use Test::More; - +BEGIN { plan skip_all => 'done_testing requires Test::More 0.88' if Test::More->VERSION < 0.88; plan skip_all => 'This test is only run for the module author' unless -d '.git' || $ENV{IS_MAINTAINER}; - +} eval "use Test::Pod::Coverage 1.04"; plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@;
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-2867-1437846034-641.0-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.18-2867-1437846034-641.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-14648-1437858833-1422.106090-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 260
Download (untitled) / with headers
text/plain 260b
Pod tests should never be running for normal user installs anyway. You can address this either by moving the file to xt/, or adding a guard like so: plan skip_all => 'These tests are for authors only!' unless $ENV{AUTHOR_TESTING} or $ENV{RELEASE_TESTING};
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-14648-1437858833-1422.106090-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.18-2867-1437846034-641.0-0-0 [...] rt.cpan.org> <rt-4.0.18-14648-1437858833-1422.106090-0-0 [...] rt.cpan.org>
Content-Type: text/html; charset="utf-8"
Message-ID: <rt-4.0.18-21166-1437892983-907.106090-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 587

On 2015-07-26 09:13:53, ETHER wrote:
> Pod tests should never be running for normal user installs anyway.

They aren't. This is a compile-time failure


> plan skip_all => 'These tests are for authors only!' unless
> $ENV{AUTHOR_TESTING} or $ENV{RELEASE_TESTING};

The problem here is that such a declaration exists, and its existence does not prevent the spurious failure, due to absence of the BEGIN block that causes the plan to terminate before the compile-phase raises the exception.
 

MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-2867-1437846034-641.0-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.18-2867-1437846034-641.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-21166-1437895212-520.106090-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 36
Thanks, good catch! -- Reini Urban
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-2867-1437846034-641.0-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.18-2867-1437846034-641.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-27441-1437908012-1364.106090-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 32
Fixed with 1.55 -- Reini Urban


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.