Perl::Critic::Policy::ControlStructures::ProhibitSwitchStatements - avoid using switch statement keywords which might imply implicit smartmatching
Switch statements are considered experimental, see "Switch Statements" in perlsyn. This policy aims to avoid using switch statement keywords.
given ($foo) { when (42) { say 'Heureka!'; } default { die 'Oh!'; } }
Jan Holcapek <holcapek@gmail.com>
To install Perl::Critic::Policy::ProhibitSmartmatch, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Perl::Critic::Policy::ProhibitSmartmatch
CPAN shell
perl -MCPAN -e shell install Perl::Critic::Policy::ProhibitSmartmatch
For more information on module installation, please visit the detailed CPAN module installation guide.