TooMuchCode::ProhibitLargeBlock -- Find oversized blocks
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 an other limit, you can set the parameter block_statement_count_limit.
block_statement_count_limit
For example in the .perlcriticrc file
[TooMuchCode::ProhibitLargeBlock] block_statement_count_limit = 20
To install Perl::Critic::TooMuchCode, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Perl::Critic::TooMuchCode
CPAN shell
perl -MCPAN -e shell install Perl::Critic::TooMuchCode
For more information on module installation, please visit the detailed CPAN module installation guide.