Perl::Critic::Policy::TestingAndDebugging::ProhibitProlongedStrictureOverride(3pm)

Perl::Critic::Policy::TestingAndDebugging::ProhibitProlongedStrictureOverride3pm

Don't turn off strict for large blocks of code.

Affiliation

This Policy is part of the core Perl::Critic distribution.

Overview

Every agrees that "use strict" is the first step to writing maintainable code in Perl. However, sometimes "strict" is a little too strict. In those cases, you can turn it off briefly with a "no strict" directive.

This policy checks that "no strict" is only in effect for a small number of statements.

Configuration

The default number of statements allowed per "no strict" is three. To override this number, put the following in your .perlcriticrc:

    [TestingAndDebugging::ProhibitProlongedStrictureOverride]
    statements = 5

Releases

10 releases since Debian 5.0 (Lenny); the text changed 9 times.

  1. 5.0
  2. 6.0
  3. 7
  4. 8
  5. 9
  6. 10
  7. 11
  8. 12
  9. 13
  10. Arch

Author

Chris Dolan <[email protected]>

From perl-perl-critic 1.156-3 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.