cpan Perl-Critic 1.084

latest releases: 1.152, 1.150, 1.148...
15 years ago

[New Features]

  • perlcritic now supports a --list-themes option.
  • You can specify the maximum number of violations you want per Policy
    per document. Developers can give a default value for this for a
    Policy by overriding default_maximum_violations_per_document().
    See RequireUseStrict and ProhibitMagicNumbers for examples.

[Policy Moved]

  • The ValuesAndExpressions::ProhibitMagicNumbers policy has been moved
    from Perl::Critic::More into the primary Perl::Critic distribution.

[New Policies]

  • Variables::ProhibitUnusedVariables (very dumb, limited initial
    implementation.)
  • ControlStructures::ProhibitLabelsWithSpecialBlockNames
    Contributed by Mike O'Regan. Kickin' ass, Mike.

[Policy Changes]

  • ControlStructures::ProhibitUnreachableCode now handles the perl 5.10
    "//" and "err" operators. RT #36080
  • InputOutput::RequireBriefOpen now ignores opens of STDIN, STDOUT,
    and STDERR. You're generally trying to make long-lasting global
    effects when manipulating these. (RT #35774)
  • RegularExpressions::ProhibitUnusualDelimiters now supports an
    "allow_all_brackets" option.
  • RegularExpressions::RequireBracesForMultiline now supports an
    "allow_all_brackets" option.
  • TestingAndDebugging::RequireUseStrict now accepts "use Moose::Role"
    as equivalent to "use strict". (RT #34838)
  • TestingAndDebugging::RequireUseWarnings now accepts "use Moose::Role"
    as equivalent to "use warnings". (RT #34838)
  • ValuesAndExpressions::ProhibitMagicNumbers now accepts constant
    subroutines.
  • Variables::ProhibitMatchVars no longer detects "use English;".
    This problem is detected in a more clear way by
    Modules::RequireNoMatchVarsWithUseEnglish.
  • Variables::ProhibitPerl4PackageNames no longer complains about
    $'/$POSTMATCH. RT #36059
  • Variables::RequireLocalizedPunctuationVars now allows the use of "my".
    RT #33937

[Bug Fixes]

  • No longer falls over if a single file has a parse error.

[New Developer Features]

  • If a document specifies a minimum perl version, e.g. "use 5.008003",
    P::C::Document::highest_explicit_perl_version() will tell you what it
    is.
  • The parameter to P::C::Policy::initialize_if_enabled is now a
    P::C::PolicyConfig object instead of a hash reference.

[Minor Changes]

  • LOTS of documentation updates.
  • A few more statistics are emitted by perlcritic with the --statistics
    option.
  • perlcritic --profile-proto now includes policy abstracts in its
    output.

[Prerequisites]

  • Now depends upon PPI 1.203.
  • New dependency upon version.

Don't miss a new Perl-Critic release

NewReleases is sending notifications on new releases.