The most significant Perl::Critic release in a long while.

brian_d_foy on 2009-01-02T00:26:00

Perl::Critic 1.094 is on its way to a CPAN mirror near you. There are a number of changes in it, but there's one in particular that I want to point out. A new policy called Miscellanea::ProhibitUselessNoCritic.

Adam Kennedy wrote a journal entry where he mentioned "the expense of having to maintain ## no critic entries permanently". This inspired the creation of the new policy.

One of the problems with Perl::Critic is that you may, over time, end up with policy disabling comments scattered across your code that no longer apply, making the code harder to understand. This policy will complain about any ## no critic that doesn't actually disable any policies. You then know that you can remove those comments, making your code cleaner and congratulating yourself for solving whatever issue that caused you to put it there in the first place.


Same for strict?

Juerd on 2009-01-02T03:33:48

Unfamiliar with implementation and performance details, upon reading about ProhibitUselessNoCritic I was immediately reminded of an old idea I had for "no strict": warn (if warnings are enabled) if the code doesn't eval anything and is strict compliant.

Good work!

jonasbn on 2009-01-02T07:36:24

Perl::Critic is maturing and getting better, it is becoming unavoidable as a tool in the toolbox.

Thanks for all the work and effort.

jonasbn