The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Perl::Critic::Policy::Mardem::ProhibitLargeSub

DESCRIPTION

This Policy counts the statements within a sub (more precise the PPI::Statement's)

CONFIGURATION

The maximum acceptable Statement-Count can be set with the statement_count_limit configuration item. Any sub with a count higher than this number will generate a policy violation. The default is 20.

An example section for a .perlcriticrc:

  [Mardem::ProhibitLargeSub]
  statement_count_limit = 1

AFFILIATION

This policy is part of Perl::Critic::Mardem.

AUTHOR

Markus Demml, mardem@cpan.com

LICENSE AND COPYRIGHT

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.