TooMuchCode::ProhibitUnusedInclude -- Find unused include statements.
This critic policy scans for unused include statement according to their documentation.
For example, Try::Tiny implicity introduce a try subroutine that takes a block. Therefore, a lonely use Try::Tiny statement without a try { .. } block somewhere in its scope is considered to be an "Unused Include".
try
use Try::Tiny
try { .. }
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.