Search results for "module:Perl::Critic::Policy::RegularExpressions::ProhibitFixedStringMatches"

Perl::Critic::Policy::RegularExpressions::ProhibitFixedStringMatches - Use eq or hash instead of fixed-pattern regexps. River stage three • 133 direct dependents • 408 total dependents

A regular expression that matches just a fixed set of constant strings is wasteful of performance and is hard on maintainers. It is much more readable and often faster to use "eq" or a hash to match such strings. # Bad my $is_file_function = $token =...

PETDANCE/Perl-Critic-1.152 - 17 Oct 2023 04:09:08 UTC
1 result (0.096 seconds)