[1.080] Released on 2007-11-11
New Features:
- Allow a "## no critic" statement after a shebang on line 1 of a
file. This allows users to block violations that apply to
whole files and still allow shebangs.
New Policies: (funded by a Perl Foundation grant)
- InputOutput::ProhibitExplicitStdin
- RegularExpressions::ProhibitFixedStringMatches
- RegularExpressions::RequireBracesForMultiline
- RegularExpressions::ProhibitUnusualDelimiters
- RegularExpressions::ProhibitUnusedCapture
- RegularExpressions::ProhibitComplexRegexes
- RegularExpressions::ProhibitSingleCharAlternation
- RegularExpressions::ProhibitEscapedMetacharacters
- RegularExpressions::ProhibitEnumeratedClasses
- InputOutput::RequireBriefOpen
- InputOutput::RequireCheckedSyscalls
Other New Policies
- ControlStructures::ProhibitNegativeExpressionsInUnlessAndUntilConditions
Policy Changes:
- Variables::ProhibitConditionalDeclarations now permits you to local-ize
variables in conditional declarations. This makes sense, since
C is actually a variable modifier, rather than a declaration.
Thanks to David Golden for reporting this.
New Developer Features:
- Perl::Critic::Utils::PPIRegexp encapsulates interaction with
the PPI Regexp token classes. Those classes have very sparse
APIs, so this package hides away the ugly fiddling with PPI
internals.
- Added a new optional_modules parameter for the .run syntax.
Bug fixes:
- PPI::Structure::List can now contain multiple children,
so P::C::Utils::parse_arg_list() needs to handle it.
This was done in the process of fixing
http://rt.cpan.org/Ticket/Display.html?id=24924, which was a problem
with TestingAndDebugging::RequireTestLabels.
- ValuesAndExpressions::ProhibitLongChainsOfMethodCalls wasn't resetting
chain length when it ran into the end of a sub-expression.
http://rt.cpan.org/Public/Bug/Display.html?id=30040
- ValuesAndExpressions::ProhibitCommaSeparatedStatements was reporting
false positives when builtins which accept both no and multiple
arguments were involved.
http://rt.cpan.org/Public/Bug/Display.html?id=27654
Internals:
- Removed all use of Carp in favor of exceptions.
Prerequisites:
- Now requires PPI 1.201. A number of workarounds for PPI bugs have been
removed.
- New dependency upon Exception::Class.
Installation:
- Use Devel::CheckOS to see whether Perl::Critic is being installed on
a Solaris system and warn about tar(1) chopping file names off if it
is.