The Perl Advent Calendar needs more articles for 2022. Submit your idea today!

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

Perl::Critic::Policy::RegularExpressions::ProhibitSingleCharAlternation - Use [abc] instead of a. River stage three • 131 direct dependents • 386 total dependents

Character classes (like "[abc]") are significantly faster than single character alternations (like "(?:a|b|c)"). This policy complains if you have more than one instance of a single character in an alternation. So "(?:a|the)" is allowed, but "(?:a|e|...

PETDANCE/Perl-Critic-1.140 - 24 Mar 2021 03:09:35 UTC
1 result (0.087 seconds)