The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Perl::Critic::Policy::Modules::ProhibitEvilModules

DESCRIPTION

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.

CONSTRUCTOR

This policy accepts an additional key-value pair in the new method. The key should be 'modules' and the value is a string of space-delimited fully qualified module names. These can be configured in the .perlcriticrc file like this:

 [Modules::ProhibitEvilModules]
 modules = Getopt::Std  Autoload

If any module name in your configuration is braced with slashes, it is interpreted as a regular expression. So any module that matches m/$module_name/ will be forbidden. For example:

  [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 the pattern, but beware that your pattern should not contain spaces, lest the parser get confused.

By default, there are no prohibited modules (although I can think of a few that should be).

NOTES

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.

AUTHOR

Jeffrey Ryan Thalhammer <thaljef@cpan.org>

COPYRIGHT

Copyright (c) 2005-2006 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.