Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

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

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

Bug Information
Severity: Important
Broken in: 0.03
Fixed in: 0.04



Subject: ProhibitCallsToUndeclaredSubs reports loop labels as violations
Loop labels are incorrectly flagged as unimported subs, e.g.: FOO: while ($some_condition) { next FOO if $bar; # do something }
Actually, it seems to be more specific than that -- it only gets tripped up by loop labels in statement modifiers, e.g.: FOO: while ($some_condition) { try_something() or next FOO; }
On Fri Oct 28 16:21:55 2011, MJGARDNER wrote: Show quoted text
> Actually, it seems to be more specific than that -- it only gets tripped > up by loop labels in statement modifiers, e.g.: > > FOO: while ($some_condition) { > try_something() or next FOO; > }
A patch has been applied, and committed as SVN revision 4093. This patch handles 'next', 'last', and 'redo', which only take labels as arguments. It does not handle 'goto', which takes either a label or an expression, and which will be a real mess to disambiguate.
This has finally been released as Perl-Critic-StricterSubs-0.04 https://metacpan.org/release/Perl-Critic-StricterSubs Thanks for your patience.