The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

Changes for version 1.12 - 2017-05-24

    • Fixed docs on how to configure ProhibitCommentedOutCode.

Changes for version 1.11_03 - 2017-01-12

    • Removed Bangs::ProhibitUselessTopic, because it has been added to Perl::Critic as of version 1.122 as two separate policies, BuiltinFunctions::ProhibitUselessTopic and RegularExpressions::ProhibitUselessTopic.
    • GitHub issue #16: Bangs::ProhibitBitwiseOperators had default themes of "core" and "bugs". It can't have a theme of "core" because that's for Perl::Critic's own policies. It now has default themes of "bangs" and "bugs". Thanks, William Braswell and Oliver Trosien.

Changes for version 1.11_02 - 2013-11-03

    • Added Bangs::ProhibitUselessTopic to warn against constructs like:
      • $_ =~ /foo/
    • or my $size = -s $_;
    • where the $_ is unnecessary.

Changes for version 1.11_01 - 2013-06-24

    • The Bangs::ProhibitVagueNames and Bangs::ProhibitNumberedNames policies have been updated in much the same way:
    • They now check names of subroutines as well as variables.
    • Their checks are now case-insensitive.
    • They only check variables or subroutines that you declare. They will no longer complain if you are forced to use someone else's poorly-named variable.
    • NOTE: The functionality of checking subroutines is experimental. If it causes too many problems, I may remove it, or make it its own policy.
    • Added more documentation about how ProhibitNumberedNames does its matching. There was nothing in there that said that if "utf8" was an exception that "foo_utf8" would pass cleanly.


A collection of handy Perl::Critic policies
Bitwise operators are usually accidentally used instead of logical boolean operators.
Commented-out code is usually noise. It should be removed.
Prohibit loading of debugging modules like Data::Dumper
Don't use XXX, TODO, or FIXME.
Know what you're going to test.
Prohibit variables and subroutines with names that end in digits.
Create a clone() method if you need copies of objects.
Adding modifiers to a regular expression made up entirely of a variable created with qr() is usually not doing what you expect.
Don't use generic variable and subroutine names.