Perl::Critic::Policy::ValuesAndExpressions::ProhibitEmptyPostfixLoop - Prohibit writing an postfix loop with no statement
version 0.001
The postfix loop is a common pattern, but you can accidentally add a semicolon and make it into a meaningless statement.
do_something($_) for @items; # ok do_something($_); for @items; # not ok $_++ for @items; # ok $_++; for @items; # not ok
This policy is not configurable except for the standard options.
Perl::Critic
Sawyer X <xsawyerx@cpan.org>
This software is Copyright (c) 2018 by Sawyer X.
This is free software, licensed under:
The MIT (X11) License
To install Perl::Critic::Policy::ValuesAndExpressions::ProhibitEmptyPostfixLoop, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Perl::Critic::Policy::ValuesAndExpressions::ProhibitEmptyPostfixLoop
CPAN shell
perl -MCPAN -e shell install Perl::Critic::Policy::ValuesAndExpressions::ProhibitEmptyPostfixLoop
For more information on module installation, please visit the detailed CPAN module installation guide.