Perl::Critic
Perl::Critic is a perl module and tool designed to help perl programmers ensure that their code complies with commonly held best practices for perl programming. Since it is a static code analysis tool, it does not actually execute the code that it examines.
History
The Perl::Critic project grew out of a desire to have an automated tool to help enforce the coding standards recommended by the Perl Best Practices book by Damian Conway. Historically, analyzing perl code statically had proven to be difficult because the only tool available to parse Perl code was the perl program itself, which executed the code. The PPI tool was developed to parse, snalyze and manipulate Perl code without actually executing it. By using this tool, the Perl::Critic module could be developed to find code that did not comply with the coding standards recommended by the book. It was eventually expanded to find violations of many policies not originally found in the book.
Resources
- The Perl::Critic page at CPAN
- perlcritic.com will run Perl::Critic over your source code