Perl::Critic::Policy::PreferredModules - Provide custom package recommendations
version 0.004
Every project has its own rules for preferring specific packages over others.
This Policy tries to be `un-opinionated` and let the user provide a module preferences with an explanation and/or suggested alternative.
To use Perl::Critic::Policy::PreferredModules you have first to enable it in your .perlcriticrc file by providing a preferred_modules.ini configuration file:
[PreferredModules] config = /path/to/preferred_modules.ini # you can also use '~' in the path for $HOME #config = ~/.preferred_modules
The preferred_modules.ini file is using the Config::INI format and can looks like this
[Do::Not::Use] prefer = Another::Package reason = "Please use Another::Package rather than Do::Not::Use" [Avoid::Using::This] [And::Also::That] [No:Reason] prefer=A::Better:Module [Only::Reason] reason="If you use this module, a puppy might die."
Perl::Critic
Nicolas R <atoomic@cpan.org>
This software is copyright (c) 2022 by cPanel, L.L.C.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Perl::Critic::Policy::PreferredModules, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Perl::Critic::Policy::PreferredModules
CPAN shell
perl -MCPAN -e shell install Perl::Critic::Policy::PreferredModules
For more information on module installation, please visit the detailed CPAN module installation guide.