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

Search results for "module:Perl::Critic::Policy::BuiltinFunctions::ProhibitBooleanGrep"

Perl::Critic::Policy::BuiltinFunctions::ProhibitBooleanGrep - Use any from List::Util, List::SomeUtils, or List::MoreUtils instead of grep in boolean context. River stage three • 133 direct dependents • 408 total dependents

Using "grep" in boolean context is a common idiom for checking if any elements in a list match a condition. This works because boolean context is a subset of scalar context, and grep returns the number of matches in scalar context. A non-zero number ...

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