Skip Menu |

This queue is for tickets about the Perl-Critic-Pulp CPAN distribution.

Report information
The Basics
Id: 83990
Status: resolved
Priority: 0/
Queue: Perl-Critic-Pulp

People
Owner: Nobody in particular
Requestors: paul [...] city-fan.org
Cc:
AdminCc:

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



Subject: CodeLayout::ProhibitFatCommaNewline breaks with Perl < 5.10
I see this test fail with Perl < 5.10: t/ProhibitFatCommaNewline..........Can't locate object method "new" via package "version" (perhaps you forgot to load "version"?) at /builddir/build/BUILD/Perl-Critic-Pulp-78/blib/lib/Perl/Critic/Policy/CodeLayout/ProhibitFatCommaNewline.pm line 51. Compilation failed in require at t/ProhibitFatCommaNewline.t line 22. BEGIN failed--compilation aborted at t/ProhibitFatCommaNewline.t line 22. dubious Test returned status 9 (wstat 2304, 0x900) Attached patch fixes this for me.
Subject: Perl-Critic-Pulp-78-version.patch
Fails with perl < 5.10 without this: t/ProhibitFatCommaNewline..........Can't locate object method "new" via package "version" (perhaps you forgot to load "version"?) at /builddir/build/BUILD/Perl-Critic-Pulp-78/blib/lib/Perl/Critic/Policy/CodeLayout/ProhibitFatCommaNewline.pm line 51. Compilation failed in require at t/ProhibitFatCommaNewline.t line 22. BEGIN failed--compilation aborted at t/ProhibitFatCommaNewline.t line 22. dubious Test returned status 9 (wstat 2304, 0x900) --- lib/Perl/Critic/Policy/CodeLayout/ProhibitFatCommaNewline.pm +++ lib/Perl/Critic/Policy/CodeLayout/ProhibitFatCommaNewline.pm @@ -31,6 +31,7 @@ use 5.006; use strict; use warnings; +use version (); use Perl::Critic::Utils; # 1.084 for Perl::Critic::Document highest_explicit_perl_version()
Thanks, I applied that fix.