Perl::Critic is configurable lint-like static analyzer for Perl that can provide recommendations how to improve your code and can even locate code snippets that are sources of common errors. It has a base library that provides the engine and a large set of policies (things to be checked). In addition there are a number of distributions on CPAN that provide further policies.
In this article we collect all the CPAN distributions related to Perl::Critic and all the policies available.
Articles
- Getting Started with Perl::Critic (the linter for Perl)
- Avoid (unwanted) bitwise operators using Perl::Critic::Bangs
- Bare Here documents are deprecated - How to find offending code? using the core ValuesAndExpressions::RequireQuotedHeredocTerminator policy.
- How to improve my Perl program? - just use Perl::Critic
- Improving your Perl code - one Perl::Critic policy at a time
- Move packages to their own files - release Pod::Tree 1.21 part of the Refactoring and CPAN co-maintainer series.
- Type checking with Moo recommends the use of the ValuesAndExpressions::ProhibitAccessOfPrivateData policy from Perl::Critic::Nits.
- Private Member Data shouldn't be accessed directly - encapsulation violation
- Always require explicit importing of functions
Interviews
Other Articles
- An Introduction To Perl Critic slides from 2007
- Automatically review your code
- Integrating perlcritic and vim
- Perl::Critic at CERN Computer Security Information
- Cleaning Up Perl (Chapter 7 of Mastering Perl)
- Module of the month November 2014
- Format perlcritic output as TAP to integrate with Jenkins
Distributions
Distribution | Abstract | Author | Date |
---|---|---|---|
[[% d.name %]](https://metacpan.org/release/[% d.name %]) | [% d.abstract %] | [[% d.author %]](https://metacpan.org/author/[% d.author %]) | [% d.date %] |
Policies
Name | Severity | Abstract |
---|---|---|
[[% p.substr(22) %]](https://metacpan.org/pod/[% p %]) | [% policies.$p.level %] | [% policies.$p.abstract %] |