Perl::Critic::Policy::ProhibitOrReturn - Do not use `or return`
This policy is a policy in the Perl::Critic::Policy::ProhibitOrReturn distribution.
Avoid using or return. Consider using equivalent if (or unless) statement instead.
or return
if
unless
# not ok sub foo { my ($x) = @_; $x or return; ... } # ok sub foo { my ($x) = @_; return if !$x; ... }
This Policy is not configurable except for the standard options.
Copyright (C) utgwkk.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
utgwkk <utagawakiki@gmail.com>
To install Perl::Critic::Policy::ProhibitOrReturn, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Perl::Critic::Policy::ProhibitOrReturn
CPAN shell
perl -MCPAN -e shell install Perl::Critic::Policy::ProhibitOrReturn
For more information on module installation, please visit the detailed CPAN module installation guide.