Perl-Critic reviews


RSS | Module Info | Add a review of Perl-Critic

Perl-Critic (1.121)

The module has an impressive ability to parse Perl, but the policies which come as defaults with Perl::Critic are not all great. The first thing that bugged me was that each criticism contained a reference to a book which I don't own. I worked out how to stop it printing the book adverts with the following bizarre and obscure piece of configuration:

# Get rid of unwanted references to book.
verbose = 8

Then running it with various levels of severity, I encountered one annoyance after another. For example, a routine

sub xyz

my @stuff;

for (@_) {

if (something) { }

if (something else) { }


return @stuff;

offended the policy Subroutines::RequireArgUnpacking. Why rewrite a perfectly OK piece of code to placate this Critic?

Some of the policies had bugs. The policy InputOutput::RequireBriefOpen kept giving warnings about an unclosed file which clearly was closed. And why is the policy Perl::Critic::Policy::Miscellanea::RequireRcsKeywords a default, requiring the programmer to include strings from Fred Flintstone's version control system?

Although the test which says not to write "return undef;" is good, what is the point of the policy Subroutines::RequireFinalReturn which requires the programmer to write "return" at the end of a routine?

The regular expression policies RegularExpressions::RequireExtendedFormatting and RegularExpressions::RequireDotMatchAnything seem like dubious choices for defaults, since it is very possible that the programmer does not want "." to match "\n" or does not want extended formatting in every case.

RegularExpressions::ProhibitUnusualDelimiters told me not to use ! as a regex delimiter, but to use // and {}, both worse choices in some cases, and it cannot even be told to stop complaining about certain delimiters, but must be switched off completely in the .perlcriticrc file.

Perl::Critic would be great if it was a bit more minimalistic, and if some of the defaults were pruned a bit, but when your configuration file starts looking like this:

exclude = Subroutines::RequireFinalReturn TestingAndDebugging::RequireUseStrict Variables::RequireNegativeIndices BuiltinFunctions::RequireBlockGrep TestingAndDebugging::RequireUseWarnings InputOutput::RequireBriefOpen RegularExpressions::RequireExtendedFormatting ValuesAndExpressions::RequireQuotedHeredocTerminator ControlStructures::ProhibitCascadingIfElse Subroutines::ProhibitExcessComplexity ErrorHandling::RequireCarping RegularExpressions::ProhibitComplexRegexes ClassHierarchies::ProhibitExplicitISA Perl::Critic::Policy::Miscellanea::RequireRcsKeywords ClassHierarchies::ProhibitOneArgBless Subroutines::RequireArgUnpacking BuiltinFunctions::ProhibitStringyEval RegularExpressions::RequireDotMatchAnything RegularExpressions::RequireLineBoundaryMatching RegularExpressions::ProhibitUnusualDelimiters

you really wonder if you want to go on using it.

Perl-Critic (1.105) *****

IMO, the most important module released lately.

Having Perl::Critic run from xt/author helps limit dependency installation.

Perl-Critic (1.091) *****

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.

Perl-Critic (1.087)

Invaluable to me -- this and perltidy make my code much more maintainable.

Perl-Critic (1.082) *****

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.

Perl-Critic (1.078) *

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.

Perl-Critic (1.071) *****

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.

Perl-Critic (1.051) ****

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.

Perl-Critic (1.02) *****

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 (0.21) *****

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 (0.08_02) *****

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

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!

Perl-Critic (0.07) ****

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.