cpan Perl-Critic 1.089

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

[Minor Enhancements]

  • -s is now a synonym for --single-policy.

[Policy Changes]

  • Subroutines::ProhibitBuiltinHomonyms now also prohibits subroutines
    with the same name as a Perl keyword (e.g. if, foreach, while).
    Inspired by RT #37632.
  • Subroutines::ProtectPrivateSubs now allows expressions like
    "shift->_some_private_method();". Note that this only applies
    to the "shift" function -- a private method call on the right of any
    other bareword still causes a violation. RT #34713.
  • Subroutines::RequireFinalReturn now includes exec in the set of things
    that mark a successful return. RT #37672
  • ValuesAndExpressions::ProhibitInterpolationOfLiterals now takes a
    allow_if_string_contains_single_quote option. Contributed by Ed
    Avis ed@membled.com. RT #36125.
  • ValuesAndExpressions::RequireInterpolationOfMetachars now supports a
    rcs_keywords option to allow for the common case where those require
    dollar signs.

[Bug Fixes]

  • BuiltinFunctions::ProhibitSleepViaSelect would complain if there were
    three undefs as arguments to select(), but one of them was the timeout.
    RT #37416.
  • Reduced false positives in
    RegularExpressions::ProhibitSingleCharAlternation. Thanks to
    Andy Lester and Elliot Shank test cases.
  • RegularExpressions::ProhibitUnusedCapture would complain if there were
    multiple captures used in a substitution, e.g. s/(.)(.)/$2$1/.
  • Subroutines::ProhibitAmpersandSigils no longer complains about
    "sort &foo(...)".
  • Makefile.PL, Build.PL and other ".PL" scripts which typically do not
    have a shebang are no longer mistaken as modules. This prevents
    spurious warnings from Modules::RequireEndWithOne. RT #20481.

[Internals]

  • Tests are now self compliant.

Don't miss a new Perl-Critic release

NewReleases is sending notifications on new releases.