This Policy counts the conditions within a sub. (more precise the PPI::Structure::Condition's, PPI::Structure::For's and PPI::Structure::Given's)
The maximum acceptable Condition-Count can be set with the condition_count_limit configuration item. Any sub with a count higher than this number will generate a policy violation. The default is 3.
An example section for a .perlcriticrc:
condition_count_limit = 1
This policy is part of Perl::Critic::Mardem.
Markus Demml, firstname.lastname@example.org
Copyright (c) 2022, Markus Demml
This library is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. The full text of this license can be found in the LICENSE file included with this module.
To install Perl::Critic::Mardem, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.