Perl-Critic-Policy-ControlStructures-ProhibitBareBlockLoopControls

 view release on metacpan or  search on metacpan

lib/Perl/Critic/Policy/ControlStructures/ProhibitBareBlockLoopControls.pm  view on Meta::CPAN

work correctly.  The default is C<follow>, which defers to the per-keyword
setting for each keyword: C<last> requires a label, C<next> and C<redo>
are always flagged.  C<do> blocks are not loops at all, so controls are
forbidden entirely by default; C<require_label> allows them when an outer
loop is the intended target.

Example F<perlcriticrc>:

    [ControlStructures::ProhibitBareBlockLoopControls]
    next        = forbid
    last        = require_label
    redo        = forbid
    do_block    = forbid
    bare_block  = follow

Note: This is the default configuration.

=head1 SEE ALSO

L<perlfunc/last>, L<perlfunc/next>, L<perlfunc/redo>,
L<Perl::Critic::Policy::ControlStructures::ProhibitReturnInDoBlock>



( run in 0.552 second using v1.01-cache-2.11-cpan-6aa56a78535 )