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: 69489
Status: resolved
Priority: 0/
Queue: Perl-Critic

People
Owner: Nobody in particular
Requestors: andrew.pam [...] strategicdata.com.au
Cc:
AdminCc:

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



Subject: ErrorHandling::RequireCheckingReturnValueOfEval false positive
Date: Fri, 15 Jul 2011 12:11:50 +1000
To: bug-Perl-Critic [...] rt.cpan.org
From: Andrew Pam <andrew.pam [...] strategicdata.com.au>
In v1.116 the following line produces a false positive: say foreach grep { !eval "require $_" } @packages; Andrew
On Thu Jul 14 22:12:01 2011, andrew.pam@strategicdata.com.au wrote: Show quoted text
> In v1.116 the following line produces a false positive: > > say foreach grep { !eval "require $_" } @packages; > > Andrew
Thank you for your report. After, I confess, a double take at your example, I realized it was equivalent to something like foreach ( @packages ) { eval "require $_" and next; say; } which passes this policy. So I have made 'grep' acceptable also (except that there are surely some corner cases that got missed, especially involving the form of 'grep' that has an expression rather than a block as its first argument. Committed as svn revision 4088.
This was fixed and released as Perl-Critic-1.117. Thanks for reporting it. -- Jeffrey Thalhammer Imaginative Software Systems www.imaginative-software.com