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

People
Owner: Nobody in particular
Requestors: sandals [...] crustytoothpaste.net
Cc:
AdminCc:

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



Subject: ProhibitUnreachableCode does not consider when conditional

Message body is not shown because it is too large.

Subject: Re: [rt.cpan.org #80136] ProhibitUnreachableCode does not consider when conditional
Date: Thu, 11 Oct 2012 11:21:30 -0700
To: bug-Perl-Critic [...] rt.cpan.org
From: Jeffrey Thalhammer <jeff [...] imaginative-software.com>
On Oct 11, 2012, at 10:30 AM, http://castro.crustytoothpaste.net/~bmc/ via RT wrote: Show quoted text
> I have a function using for/when as follows: > > <snip/> > > ProhibitUnreachableCode seems to think that the default block and all > but the first when statement are unreachable. This is not the case and > the function works as expected. None of the statements in this function > should be considered unreachable.
That use of postfix "when" looks very fixable. Thanks for bringing this to our attention. PPI and Perl::Critic are a bit behind on some of the newer language constructs. We'll do our best to keep up! -Jeff