Skip Menu | 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

Owner: RURBAN [...]
Requestors: KENTNL [...]

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


Subject: t/z_pod-coverage.t causes test failures on Test::More <= 0.87_01

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 =)


Subject: filter-1.54-pod-coverage-test.patch
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 $@;
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};

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

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.

Thanks, good catch! -- Reini Urban
Fixed with 1.55 -- Reini Urban

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

Please report any issues with to