TooMuchCode::ProhibitExtraStricture -- Find unnecessary 'use strict'
Code stricture is good but that does not mean you always need to put use strict in your code. Several other modules enable code stricture in the current scope, effectively the same having use strict
use strict
Here's a list of those modules:
Moose Mouse Moo Mo Moose::Role Mouse::Role Moo::Role Test2::V0
When one of these modules are used, use strict is considered redundant and is marked as violation by this policy.
The builtin list of stricture modules is obviously not comprehensive. You could extend the list by setting the stricture_modules in the config. For example, with the following setting, two modules, Foo and Bar, are appended to the list of stricture modules.
stricture_modules
Foo
Bar
[TooMuchCode::ProhibitExtraStricture] stricture_modules = Foo Bar
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.