Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

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

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

Bug Information
Severity: Normal
Broken in: 1.114
Fixed in: 1.115



Subject: Crash in RegularExpressions::ProhibitUnusedCapture
The attached Perl program crashes perlcritic: % cat crash_perlcritic $x !~ /()/; <<X , , , , , % perlcritic --single-policy RegularExpressions::ProhibitUnusedCapture crash_perlcritic Fatal error while critiquing "crash_perlcritic": Can't call method "uses_module" without a package or object reference at /usr/share/perl5/Perl/Critic/Policy/RegularExpressions/ProhibitUnusedCapture.pm line 573. Whitespace is significant, so please use the attachment. This test case is not a well-formed Perl program. I think perlcritic should not crash on any input, but if you disagree, I am able to provide a less minimal test case which is valid Perl code.
Subject: crash_perlcritic
Download crash_perlcritic
application/octet-stream 27b

Message body not shown because it is not plain text.

To add, I am using Perl::Critic 1.114 on Fedora 14 x86_64, with PPI 1.25.
On Thu Mar 31 10:26:26 2011, EDAVIS wrote: Show quoted text
> To add, I am using Perl::Critic 1.114 on Fedora 14 x86_64, with PPI 1.25.
Works in Perl::Critic 1.113, so it looks like there's a regression. My apologies. I assume you mean PPI 1.215? And for my curiosity, what does /()/ actually do? Tom
Not a regression, but a bug in new functionality to look inside here documents. A correction has been uploaded as SVN commit 4058. The change to the policy in question is attached. Elliot -- I'm afraid this needs another release, since 1.114 only passed its self-test because the here document tests used one-line here documents.
Subject: rt67116.pat
Download rt67116.pat
application/octet-stream 987b

Message body not shown because it is not plain text.

Thanks for looking at this. The /()/ construct is just a minimal regexp used to reproduce the bug. I suppose it always matches, and sets $1 to the empty string.