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

NAME

TooMuchCode::ProhibitLargeBlock -- Find oversized blocks

DESCRIPTION

This policy scan for large code blocks of the following type.

    map { ... };
    grep { ... };
    do { ... };

By default a large block is one with more than 10 statements. If you need another limit, you can set the parameter block_statement_count_limit.

For example in the .perlcriticrc file

  [TooMuchCode::ProhibitLargeBlock]
  block_statement_count_limit = 20