Perl::Critic::Policy::Modules::ProhibitEvilModules
Use this policy if you wish to prohibit the use of specific modules. These may be modules that you feel are deprecated, buggy, unsupported, insecure, or just don't like.
The set of prohibited modules is configurable via the modules option. The value of modules should be a string of space-delimited, fully qualified module names and/or regular expressions. An example of prohibiting two specific modules in a .perlcriticrc file:
modules
[Modules::ProhibitEvilModules] modules = Getopt::Std Autoload
Regular expressions are identified by values beginning and ending with slashes. Any module with a name that matches m/pattern/ will be forbidden. For example:
m/pattern/
[Modules::ProhibitEvilModules] modules = /Acme::/
would cause all modules that match m/Acme::/ to be forbidden. You can add any of the imxs switches to the end of a pattern, but be aware that patterns cannot contain whitespace because the configuration file parser uses it to delimit the module names and patterns.
m/Acme::/
imxs
By default, there are no prohibited modules (although I can think of a few that should be).
Note that this policy doesn't apply to pragmas. Future versions may allow you to specify an alternative for each prohibited module, which can be suggested by Perl::Critic.
Jeffrey Ryan Thalhammer <thaljef@cpan.org>
Copyright (c) 2005-2007 Jeffrey Ryan Thalhammer. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module.
To install Perl::Critic, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Perl::Critic
CPAN shell
perl -MCPAN -e shell install Perl::Critic
For more information on module installation, please visit the detailed CPAN module installation guide.