The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Perl::Critic::Policy::ControlStructures::ProhibitSwitchStatements - avoid using switch statement keywords which might imply implicit smartmatching

DESCRIPTION

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!'; }
    }

AUTHOR

Jan Holcapek <holcapek@gmail.com>