| Module Info
| Add a review of Perl-Critic
IMO, the most important module released lately.
Having Perl::Critic run from xt/author helps limit dependency installation.
I've found Perl::Critic an invaluable tool with legacy code - making it very easy to focus down on trouble spots that need immediate attention.
Trivially customisable to make it only complain about the things I care about. Large library of policies on CPAN so I mostly can just pick and choose without having to write my own. Nice API for those few times when I do have to code something myself.
Been an essential part of my toolkit for some time.
Invaluable to me -- this and perltidy make my code much more maintainable.
One of the best utility tools I have seen for any language. It has changed our life and now our code is lot more maintainable, bug free etc etc. Waiting for more and more policies to come through.
Most of the so-called "best practices" are the personal preferences of one author. This should not have put in such a prominent namespace.
However, if all rules would be moved to another distribution, e.g. "Perl::Critic::Rulesets::Damian_Conway", and this module would only contain the code, I'd rate it a five.
I'm spefically reviewing the documentation and utilities for becoming a Policy developer.
The documentation is clear and concise, and gets a budding Policy writer up to speed in short order.
Further, the testing utilities make adding additional test cases for policies under development are really cool too - the format of the /run tests takes a little getting used to - but once that's under your belt, the tests flow off your fingers faster than you could've manually only updated your test plan.
What a great tool! Not only was I able to tweak its settings to get it to help me write code the way *I* wanted to write it, but then it was really easy to write my own plugins to test for things that configuration alone could get me.
Using Perl::Critic to enforce (or at least audit) your organization's coding guidelines is a great idea, and it's pretty darn good for personal use, too.
This goes out to all modules like Test::Warnings, Test::Strict, Test::Spelling, etc, but is focused at Perl::Critic directly. These tools are invaluable to me as a perl developer. I tell them how I expect myself and others to code in my dists, and Perl::Critic keeps me honest about those things. Sometimes I'm just lazy. Sometimes I just forget. Perl::Critic is neither.
Bravo. Great job. P::C+++++++++++
Perl::Critic analyzes perl code and offers suggestions how best to conform to your/PBP's policies. It simply worked as advertised, and it was easy enough to add my own policies.
The only quibbles I have with it are the numerous dependencies required to install, and the fact that you also have to read up on PPI documentation to write policies.
This is a near-perfect module.
Perl-Critic is a source code analyzer that judges your code by the standards set by Damian Conway's book "Perl Best Practices". I tried it on one of my modules (via perlcritic `find lib -name '*.pm'`) and found all of the advice to be good with one exception (already reported to rt.cpan.org).
My one main complaint:
* There should be a little more explanation for the criticisms. Granted, the module does state page numbers for Damian's book, but some of the criticisms forced me to look at the code to understand why it was complaining (e.g. the noisy quoted string complaint). Perhaps a verbose mode to describe the criticism more deeply, or a DIAGNOSTICS section in the POD to detail all of the warnings
I encourage someone to write Test::Perl::Critic or perhaps to add a Module::Build perlcritic action!
A nice module, easy to use and good documented. After configure your own ~/.perlcriticrc it is a great help to find common mistakes or ugly code quick.