Debian Codegraph @

corpus/dists/Perl-Critic.changes

raw
1 [1.120_01] Released on 2013-10-29
2
3 * DEVELOPER RELEASE *
4
5 Added new themes based on CERT guidelines. Thanks Kirk Kimmel.
6
7 First release from the new GitHub repository.
8
9 [1.120] Released on 2013-10-25
10
11 Bug Fixes:
12 * Corrected "Possible precedence issue with control flow operator"
13 warning. This fixes RT #88866
14
15 [1.119] Released on 2013-09-25
16
17 Bug Fixes:
18 * Tests were failing with Config::Tiny 2.17 or later, due to a
19 change in the error messages produced by that module.
20 This fixes #16 on Github, #88679 & #88889 on RT.
21
22
23 Policy Changes:
24 * BuiltinFunctions::ProhibitVoidGrep and ::ProhibitVoidMap: grep
25 and map called as functions are now allowed in slice operations.
26 RT #79289
27 Thanks to Wade at Anomaly dot org for the patch.
28 * Subroutines::RequireArgUnpacking: Most tests of the size of @_
29 are now allowed. RT #79138
30
31 Other Changes:
32 * Modernized our usage of Exporter. See RT #75300.
33 Thanks to Olivier Mengué for the patch.
34
35 [1.118] Released on 2012-07-10
36
37 Policy Changes:
38 * CodeLayout::RequireTidyCode: Revise to work with incompatible
39 changes in Perl::Tidy 20120619. RT #77977.
40 * TestingAndDebugging::ProhibitNoWarnings: Correct the parse of the
41 'no warnings' statement, so that 'no warnings "qw"' is recognized
42 as supressing just 'qw' warnings. RT #74647.
43 * Miscellanea::RequireRcsKeywords has been moved to the Perl-Critic-More
44 distribution, RT #69546
45
46 Other Changes:
47 * Make all unescaped literal "{" characters in regexps into
48 character classes. These are deprecated, and became noisy with
49 Perl 5.17.0. RT #77510.
50
51 [1.117] Released on 2011-12-21
52
53 HAPPY HOLIDAYS!
54
55 New Policies:
56 * Variables::ProhibitAugmentedAssignmentInDeclaration reports
57 constructs like 'my $x += 1'. Contributed by Mike O'Regan
58
59 Policy Changes:
60 * BuiltinFunctions::ProhibitLvalueSubstr: Add explicit 'use version'.
61 RT #68498.
62 * CodeLayout::ProhibitHardTabs: Add 'pbp' to the default_themes list.
63 RT #71093.
64 * ControlStructures::ProhibitMutatingListFunctions now understands that
65 tr///r (introduced in 5.13.7) does not change its operand.
66 * ControlStructures::ProhibitMutatingListFunctions now understands that
67 '//=', '<<=', and '>>=' are assignment operators. RT #70901.
68 * ErrorHandling::RequireCheckingReturnValueOfEval now allows things
69 like grep { eval $_ }. RT #69489.
70 * Modules::RequireExplicitPackage now has configuraion option
71 allow_import_of, to allow the import of specified modules before
72 the package statement. RT #72660.
73 * RegularExpressions::ProhibitEnumeratedClasses no longer thinks
74 that [A-Za-z_] matches \w. RT #69322.
75 * RegularExpressions::ProhibitUnusedCaptures now skips the first
76 block of an 'if' or 'elsif' if the regular expression is bound to
77 its operand with the '!~' operator. RT #69867.
78 * RegularExpressions::ProhibitUnusedCaptures now looks into lists
79 and blocks in the replacement portion of the regular expression if
80 /e is asserted. RT #72086.
81 * RegularExpressions::RequireDotMatchAnything,
82 RegularExpressions::RequireExtendedFormatting and
83 RegularExpressions::RequireLineBoundaryMatching now honor defaults
84 set with 'use re "/modifiers"'. RT #72151.
85 * Subroutines::ProhibitManyArgs now recognizes '+' as a prototype
86 character.
87 * Variables::ProhibitPunctuationVars now recognizes bracketed
88 variables embedded in interpolated strings (e.g. "${$}"). For the
89 purpose of the 'allow' configuration, these are considered
90 equivalent to the unbracketed form. RT #72910.
91 Other Changes:
92 * Corrected POD in Perl::Critic::PPI::Utils. RT #68898.
93 * Perl::Critic::Violation source() method now returns the line
94 containing the violation (not the first line) when the statement
95 containing the violation spans multiple lines.
96
97 [1.116] Released on 2011-05-15
98
99 Policy Changes:
100 * BuiltInFunctions::ProhibitLvalueSubstr does not report violations
101 if the document contains an explicit 'use n.nnn;' where the
102 version is before 5.005. RT #59112
103 * Documentation::RequirePodSections no longer blows up on code
104 having POD but no =head1. This problem was introduced with RT
105 #59268. RT #67231
106 * RegularExpressions::ProhibitUnusedCapture should more reliably
107 find things like s/(a)/${1}2/. RT #67273.
108 * ValuesAndExpressions::ProhibitMagicNumbers and
109 Module::RequireVersionVar now treat versions passed as the second
110 argument of a 'package' statement the same as versions declared as
111 'our $VERSION ...'. RT #67159
112 * Variables::RequireLexicalLoopIterators does not report violations
113 if the document contains an explicit 'use n.nnn;' where the
114 version is before 5.004. RT #67760
115
116 [1.115] Released on 2011-03-31
117
118 Minor bits:
119 * Fatal error in RegularExpressions::ProhibitUnusedCapture here
120 document check. RT #67116.
121 * Internal POD error in Documentation::RequirePodLinksIncludeText. Patch
122 by Salvatore Bonaccorso. RT #67012
123
124 [1.114] Released on 2011-03-26
125
126 Policy Changes:
127 * Documentation::RequirePodLinksIncludeText now handles nested POD
128 formatting. RT #65569
129 * Clarified relation of severity numbers to names in Perl::Critic
130 POD. RT #66017
131 * Removed caveats from Variables::RequireLocalizedPunctuationVars,
132 no longer necessary with PPI 1.208. RT #65514
133 * Have InputOutput::RequireBriefOpen attempt to expand scope as
134 necessary to deal with the case where the open() and the
135 corresponding close() are not in the same scope. RT #64437
136 * RegularExpressions::ProhibitUnusedCapture now looks inside
137 double-quotish things. RT #38942.
138 * RegularExpressions::ProhibitUnusedCapture now takes logical
139 alternation into account, so that (e.g.)
140 if ( /(a)/ || /(b)/ ) {
141 say $1;
142 }
143 is not a violation. RT #38942.
144 * ValuesAndExpressions::ProhibitCommaSeparatedStatements now
145 recognizes 'return { foo => 1, bar => 2 }' as containing a hash
146 constructor, not a block. This was fixed by PPI 1.215. RT #61301.
147 * ValuesAndExpressions::ProhibitCommaSeparatedStatements now
148 recognizes 'bless { foo => 1, bar => 2 }' as containing a hash
149 constructor, not a block. This was fixed by PPI 1.215. RT #64132.
150
151 [1.113] Released on 2011-02-14
152
153 New Policies:
154 * InputOutput::RequireEncodingWithUTF8Layer recommends
155 ':encoding(utf8)' over ':utf8' in open() and binmode(). It is severity 5
156 because of the bad things that can happen if invalid UTF8 gets loose in
157 your code.
158 * Modules::ProhibitConditionalUseStatements prohibits
159 'use module' inside a conditional, since the statement is executed
160 unconditionally at compile time. Thanks to Peter Guzis for submitting
161 the policy and tests in RT #59065.
162
163 Policy Changes:
164 * CodeLayout::RequireConsistentNewlines produces multiple undefined
165 value errors when a violation is found. RT #65663
166 * ControlStructures::ProhibitMutatingListFunctions allows s///r,
167 which was introduced in 5.13.2.
168 * ControlStructures::ProhibitPostfixControls now looks for "when". It is
169 treated in the same way as "if".
170 * Documentation::RequirePodSections now honors '## no critic'
171 annotation anywhere before the '__END__', '__DATA__', or first
172 '=head1', whichever comes first. The line number of the offending
173 '=head1 NAME' was added to the violation description. RT #59268.
174 * RegularExpressions::ProhibitUnusedCapture now takes account of the
175 use of $- and $+ (and their English equivalents under 'use
176 English') provided the subscripts are literal integers.
177 * RegularExpressions::ProhibitUnusedCapture now takes account of the
178 use of capture variables in the replacement portion of
179 s/.../.../e.
180 * Subroutines::ProhibitUnusedPrivateSubroutines now looks inside
181 regular expressions.
182 * ValuesAndExpressions::ProhibitMagicNumbers now supports Const::Fast.
183 * ValuesAndExpressions::ProhibitMagicNumbers now has a
184 constant_creator_subroutines parameter to allow the user to
185 configure the names of subroutines that create constants. RT #62562.
186 * ValuesAndExpressions::ProhibitMismatchedOperators didn't handle file
187 test operators properly. Patch by H.Merijn Brand. RT #58751
188 * Variables::ProhibitUnusedVariables now looks inside regular
189 expressions.
190 * ValuesAndExpressions::RequireInterpolationOfMetachars now detects
191 and complains about "\b" and "\l" as documented in perlop, and
192 "\1" through "\7", which are not documented there, but were found
193 in toke.c.
194
195 New Developer Features:
196 * uses_module(), namespaces(), and subdocuments_for_namespace() methods on
197 Perl::Critic::Document.
198 * Perl::Critic::Document->new() now accepts a -filename-override argument
199 for setting the filename when the source code comes from something
200 other than an actual file.
201
202 Other Changes:
203 * Test::Perl::Critic::Policy no longer exports by default.
204 * Build phase now requires Test::Deep.
205 * Added example using Try::Tiny to documentation of
206 ErrorHandling::RequireCheckingReturnValueOfEval. Suggested by Andy
207 Lester on the developers mailing list.
208 * In order to get more consistent behavior across all installations of
209 Perl::Critic, IPC::Open2 (which actually is part of core), PPIx::Regexp,
210 Perl::Tidy, Pod::Spell, and Text::ParseWords are no longer optional
211 prerequisites.
212 * Now depends upon PPIx::Utilities v1.1.0.
213
214 Bug Fixes:
215 * Build.PL/Makefile.PL didn't specify a minimum version of version.pm, but
216 TestingAndDebugging::RequireUseStrict did. RT #58952
217 * Perl::Critic::Annotation needs to look inside the __END__ statement to
218 find the true end of the document, otherwise POD policies may give false
219 positives. RT #59176
220 * BuiltinFunctions::ProhibitStringyEval no longer dies on eval
221 "#...". RT #60179
222 * RegularExpressions::ProhibitUnusedCapture now takes account of the
223 %LAST_PAREN_MATCH as well as %+ if English has been loaded. RT #60002
224 * Subroutines::ProhibitManyArgs now interprets prototype groups (e.g.
225 \[$@%]) as representing a single argument.
226 * Require Exporter version 5.63 (versus version 0) to get sane handling of
227 export tags. RT# 61071
228 * Prevent Subroutines::ProhibitUnusedPrivateSubroutines from failing
229 on &_subroutine(). RT #61311
230 * Subroutines::ProhibitAmpersandSigils now allows references of the
231 form \( &sub1, &sub2 ). RT #49609
232
233 [1.112_002] Released on 2011-02-09
234 [1.112_001] Released on 2010-12-14
235
236 Changes summarized into 1.113 above. For exact details, see Changes on
237 BackPAN.
238
239 [1.111] Released on 2010-12-14
240
241 Bug Fixes:
242 * TestingAndDebugging::ProhibitNoStrict and ProhibitNoWarnings no longer
243 rely on the behavior of all() when the list is empty due to change in
244 List::MoreUtils 0.28. RT #63816
245
246 [1.110_001] Released on 2010-11-30
247
248 Changes summarized into 1.113 above. For exact details, see Changes on
249 BackPAN. (Yes, all of this stuff was not in 1.111.)
250
251 [1.109] Released on 2010-08-29
252
253 Bug Fixes:
254 * ValuesAndExpressions::RequireInterpolationOfMetachars fix due to changes
255 in Email::Address 1.890. Note that this may find problems in code that
256 it didn't before, e.g. q<'@foo'>.
257
258 [1.108] Released on 2010-06-22
259
260 This is the "Give Shawn Moore what we promised him a year ago and hurry up
261 and get this out before Brad Oaks gives his YAPC::NA talk" release.
262
263 New Policies:
264 * Documentation::RequirePodLinksIncludeText
265 * Subroutines::ProhibitUnusedPrivateSubroutines
266
267 New Features:
268 * There is a new global configuration item, 'program-extensions', which
269 configures Perl::Critic's idea of which file name extensions represent
270 programs. The desired extensions are specified as a space-separated list,
271 with leading '.' on each if that is desired. Files whose names end in
272 '.PL' will always be considered programs. This can be overridden by
273 command option --programs-extensions, which can be specified multiple
274 times.
275 * There is now a perlcritic --allow-unsafe switch. Without this switch,
276 Perl::Critic will silently refuse to load any Policy that is marked
277 unsafe. Unsafe Policies are usually ones that may compile or execute
278 untrusted code (see Perl::Critic::DynamicPolicy for an example); Policy
279 authors can mark their policies as unsafe by overriding the is_safe()
280 method.
281 * The framework that we use to test Perl::Critic Policies has been
282 packaged into a convenient module that you can use to test your own
283 Policies. See Test::Perl::Critic::Policy and Perl::Critic::TestUtils
284 for details.
285
286 Policy Changes
287 * BuiltInFunctions::ProhibitLvalueSubstr no longer complains when there
288 is a low-precedence operator between the substr() and the assignment
289 operator.
290 * CodeLayout::ProhibitParensWithBuiltins now allows 'state ($foo)'. RT
291 #52029
292 * ErrorHandling::RequireCarping now has an
293 allow_in_main_if_not_in_subroutine option to allow "die" directly in
294 the default namespace.
295 * InputOutput::RequireBriefOpen now recognizes CORE::open(),
296 CORE::close(), CORE::GLOBAL::open(), and CORE::GLOBAL::close(). RT
297 #52391
298 * Modules::ProhibitEvilModules now complains by default about the modules
299 deprecated by the Perl 5 Porters in 5.12.
300 * Modules::RequireVersionVar documentation updated to make clear that "my
301 $VERSION" does not work as a module version declaration. RT #56667
302 * The RegularExpressions::* policies have been converted from using
303 Regexp::Parser to using PPIx::Regexp for their heavy lifting.
304 * RegularExpressions::ProhibitCaptureWithoutTest now allows capture
305 variables inside when() {}. RT #36081.
306 * RegularExpressions::ProhibitUnusedCapture now checks for unused named
307 captures.
308 * Subroutines::ProhibitManyArgs revised to count only characters in the
309 prototype that represent arguments. RT #56627
310 * Subroutines::ProhibitNestedSubs no longer complains about scheduled
311 blocks (BEGIN, etc.) inside subroutines and vice versa.
312 * Subroutines::RequireFinalReturn should now understand a final given/when
313 statement, and declare an error if there is no 'default' block or if any
314 branch does not return.
315 * TestingAndDebugging::RequireUseStrict now accepts 'use 5.011' or greater
316 as equivalent to 'use strict'.
317 * ValuesAndExpressions::ProhibitMismatchedOperators false positive with
318 "'foo' x 15 . 'bar'". RT #54524
319 * Variables::ProhibitPunctuationVars gave false positives on qr// regexp's
320 ending in '$'. RT #55604
321
322 Bug Fixes:
323 * The "## no critic" annotations now respect #line directives.
324 * Annotations on statements spanning more than one line (e.g.
325 my $foo =
326 '$bar'; ## no critic (RequireInterpolationOfMetachars)
327 ) are now handled as single-line annotations, not block annotations.
328 * All instances of L<Foo> in the POD have been changed to L<Foo|Foo>.
329 L</bar> and L<Foo/bar> were allowed to stand. RT #37485
330 * Spaces are now allowed immediately inside the enclosing parentheses in
331 "## no critic ( Foo )". RT #52038
332 * With the introduction of PPIx::Regexp, Perl::Critic no longer dies
333 when it encounters a Perl 5.010 regexp. RT #49442.
334 * DEVELOPER.pod typo in link to
335 ValuesAndExpressions::ProhibitConstantPragma policy. RT #57818
336 * Spelling errors in documentation. RT #57375
337 * "die" used instead of "croak". RT #56619
338 * Fixed regex test that caused test failures on every Perl 5.11
339 (credit Tom Wyant).
340 * t/20_policy_pod_spelling.t now works (or at least no longer fails)
341 in non-English locales (again). RT #43291 and RT #48986.
342 * Perldoc hae broken link for McCabe score definition. RT #53219
343 * RT #33935 and #49679 were fixed by upgrading to PPI 1.208
344
345 Other Changes:
346 * Perl::Critic::Utils::is_unchecked_call() updated to include chmod in the
347 set of things covered by autodie (this happened in autodie v2.08). The
348 primary effect of this is on InputOutput::RequireCheckedSyscalls.
349 * Now depends upon Task::Weaken to ensure that we only install with perls
350 where Scalar::Util::weaken() works.
351 * Email::Address was optional, but is now required. So everyone
352 gets the optimal behavior from RequireInterpolationOfMetachars.
353 * Some infrastructure has been extracted to the new PPIx-Utilities
354 distro. It is also a required dependency here. Over time a good
355 portion of Perl::Critic::Utils* will be migrated to this distribution.
356 * Perl::Critic::Utils::PPI::get_constant_name_element_from_declaring_statement()
357 is deprecated because it doesn't handle multiple constants being
358 declared within a single "use constant" statement. Use
359 PPIx::Utilities::Statement::get_constant_name_elements_from_declaring_statement()
360 instead.
361 * Removed all uses of Perl::Critic::Utils::PPIRegep. Since the
362 PPIx::Regexp update, Perl::Critic only used get_match_string() and
363 friends, which were superseded by the corresponding PPI methods.
364 Perl::Critic now depends on PPI-1.208 or newer.
365 * Moved Perl::Critic::Utils::PPIRegexp to the Perl-Critic-Deprecated.
366 * The PolicySummary.pod file is now generated when the distribution
367 is created, rather than when you install it. This ensures the file
368 will be available on http://search.cpan.org. Thanks to Bear Longyear
369 for bringing this to our attention.
370
371 [1.107_001] Released on 2010-06-20
372
373 Changes summarized into 1.108 above. For exact details, see Changes on
374 BackPAN.
375
376 [1.106] Released on 2010-05-10
377
378 Bug Fixes:
379 * NamingConventions::Capitalization fix for PPI 1.212. RT #57348
380
381 [1.105_03] Released on 2010-03-21
382 [1.105_02] Released on 2010-01-23
383 [1.105_01] Released on 2010-01-16
384
385 Changes summarized into 1.108 above. For exact details, see Changes on
386 BackPAN.
387
388 [1.105] Released on 2009-09-07
389
390 Bug Fixes:
391 * Variables::ProhibitPunctuationVars would complain about "%-" appearing
392 anywhere in a string. RT #49016
393
394 Policy Changes:
395 * InputOutput::RequireCheckedSyscalls now complains about unchecked "say"
396 by default. RT #37487
397
398 [1.104] Released on 2009-08-23
399
400 This release is dedicated to Tom Wyant in appreciation of the amount of
401 effort he put into the enhancements and bug fixes in this release, for
402 having the patience to wait for the amount of time that it took to get
403 them out, and for overall awesomeness. Thank you, Tom.
404
405 New Policies:
406 Objects::ProhibitIndirectSyntax
407 ValuesAndExpressions::ProhibitComplexVersion
408 ValuesAndExpressions::RequireConstantVersion
409
410 New Optional Requirement:
411 * Email::Address, if you want
412 ValuesAndExpressions::ProhibitInterpolationOfLiterals to properly ignore
413 email addresses.
414
415 New Features:
416 * Perlcritic will list the names of files with violations if given the
417 --files-with-violations option, or the names of files without
418 violations if given the --files-without-violations options. These
419 have synonyms -l and -L respectively.
420 * Perlcritic has a new --list-enabled option, which lists the Policies
421 that will be enforced, given the current configuration. This is
422 useful if you've written a complex command-line or modified your
423 .perlcriticrc file and you want to see which Policies *would*
424 be used with the current configuration, if you were actually going
425 to critque a file with it.
426 * Perl::Critic::Violation now takes #line directives into account in the
427 %F, %f, and %l formats. You can get the old values via the new %G, %g,
428 and %L formats.
429
430 Policy Changes:
431 * CodeLayout::ProhibitParensWithBuiltins was complaining in certain cases
432 where parentheses are required due to operator precedence. RT #46862.
433 * ControlStructures::ProhibitMutatingListFunctions no longer complains
434 about uses of tr/// that don't modify the operand. Reported by EDAVIS,
435 RT #44515.
436 * Miscellanea::RequireRcsKeywords now accepts "qw$Keyword: ...$". RT
437 #45196.
438 * Modules::RequireFilenameMatchesPackage now respects logical filenames
439 defined by the "#line" directives. This allows the Policy to work
440 properly with IDEs and code generators.
441 * NamingConventions::Capitalization now allows fully qualified subroutine
442 declarations ( e.g. "sub Foo::Bar::baz {...}" ). However, the
443 non-package part of the subroutine name must still conform to whatever
444 capitalization rule you have chosen.
445 * RegularExpressions::ProhibitCaptureWithoutTest no longer complains if
446 the regex is followed by an "or die" or similar. Reported by EDAVIS,
447 RT #36081.
448 * RegularExpressions::ProhibitComplexRegexes no longer counts variable
449 substitutions in the length. Reported by EDAVIS, RT #36098.
450 * RegularExpressions::ProhibitUnusedCapture now considers the body of
451 while loops and not just their condition. Reported by EDAVIS, RT
452 #38942.
453 * ValuesAndExpressions::ProhibitVersionStrings was getting confused by
454 comments. Reported by Kevin Ryde, RT #44986.
455 * ValuesAndExpressions::RequireInterpolationOfMetachars now allows sigils
456 in the arguments to "use vars". Contributed by Kevin Ryde, RT #47318.
457 * ValuesAndExpressions::RequireInterpolationOfMetachars now properly
458 ignores email addesses, if you have Email::Address installed. Inspired
459 by the Kevin Ryde contribution in RT #47318.
460 * Variables::ProhibitPunctuationVars gained the ability to look inside
461 interpolated strings. Doing this correctly is challenging and things
462 may not work out right; how the policy does this can be controlled via
463 the new "string_mode" option. Contributed by Edgar Whipple
464 <perlmonk at misterwhipple dot com>.
465 * Variables::ProhibitPunctuationVars now ignores $] by default since there
466 is no English.pm equivalent.
467
468 Other Bug Fixes:
469 * Perl::Critic::Utils::parse_arg_list() was slurping up the "or die ..."
470 portion of "open my $foo, 'somefile' or die ...", causing
471 InputOutput::ProhibitTwoArgOpen to not complain about this example.
472 Reported by Alexandr Ciornii, RT #44554.
473
474 Minor Changes
475 * The line count emitted by the --statistics option is further broken down
476 by line content.
477
478 Minor Documentation Fixes:
479 * ValuesAndExpressions::ProhibitInterpolationOfLiterals. Reported by
480 Debian in http://bugs.debian.org/542814, RT #48936
481
482 Build Fixes:
483 * There wasn't a specific version given for the List::MoreUtils dependency
484 and we're using features that weren't avialable until 0.19. So, we now
485 require version 0.19. Noticed by John J. Trammell, RT #48917.
486 * Some tests were tied to the specific "true" and "false" values that some
487 functions were returning. Reported by Michael Schwern, RT #43910.
488
489 Other News:
490 * Komodo version 5.1.1 now has built-in support for Perl-Critic,
491 if you have the Perl::Critic and criticism modules installed.
492 Both should be available through the ActiveState Perl Package
493 Manager ppm(1).
494
495 [1.103] Released on 2009-08-03
496
497 Fix configure_requires prerequisite on Module::Build 0.34_02.
498
499 [1.102] Released on 2009-08-03
500
501 Bug fixes:
502 * Works with PPI 1.205. Yay for 5.10 support!
503 * Variables::RequireLexicalLoopIterators didn't work correctly on foreach
504 loops with labels.
505
506 [1.101_003] Released on 2009-07-22
507 [1.101_002] Released on 2009-07-21
508 [1.101_001] Released on 2009-07-21
509
510 Changes summarized into 1.102 above. For exact details, see Changes on
511 BackPAN.
512
513 [1.100] Released on 2009-07-17
514
515 This is a POD fix release to deal with issues identified by Test::POD
516 1.40. There is no functional difference between this release and 1.098.
517 This is the last release of Perl::Critic that will be compatible with PPI
518 1.203. PPI's parsing of for(each)? loops is changing in its next release
519 in an incompatible manner and there will be a release in the near future
520 to make Perl::Critic compatible with that change.
521
522 [1.099_002] Released on 2009-06-27
523 [1.099_001] Released on 2009-06-25
524
525 Experimental releases. For exact details, see Changes on BackPAN.
526
527 [1.098] Released on 2009-03-07
528
529 Some Exciting News:
530 The Perl Development Kit (PDK 8.0) from ActiveState now includes a
531 very slick graphical interface to Perl-Critic. I highly recommend
532 that you check it out. Here's a link to screenshots and docs:
533
534 http://docs.activestate.com/pdk/8.0/PerlCritic_gui.html
535
536 New Features:
537 * Violation coloring is now configurable via command line or profile. The
538 profile entries are color-severity-highest, -high, -medium, -low, or
539 -lowest. Numbers are accepted in lieu of named severities (e.g.
540 'color-severity-5' for 'color-severity-highest'), and 'colour' is
541 accepted in lieu of 'color'.
542 * Handling of unrecognized policy configuration items is now controlled by
543 the profile_strictness. The default is to warn about them. The previous
544 default was that they were fatal.
545 * -p is now a synonym for --profile.
546 * The --verbose option for perlcritic now supports a %C format that will
547 displays the class of PPI::Element that caused the violation.
548
549 Policy Changes:
550 * ControlStructures::ProhibitNegativeExpressionsInUnlessAndUntilConditions
551 didn't include "pbp" in its default themes even though it is derived
552 from the book. Now it does. :]
553 * ErrorHandling::RequireCarping now allows a here document as the last
554 element if the "allow_messages_ending_with_newlines" option is true.
555 * Fix Subroutines::ProhibitAmpersandSigils so it allows "defined(&x)" as
556 well as "defined &x". Patch from Kevin Ryde, RT #38855.
557 * Subroutines::ProtectPrivateSubs now has an "allow" option to specify
558 subroutines which are exempt from this policy. RT #38678.
559 Additionally, a "private_name_regex" option has been added that allows
560 you to specify what a private subrouting name looks like.
561 * Subroutines::RequireArgUnpacking now has an "allow_subscripts" option
562 to allow array slices and elements. RT #34009.
563 * Subroutines::RequireArgUnpacking now has an "allow_delegation_to" option
564 to allow the usual delegation idiom. Delegation to 'SUPER::' and
565 'NEXT::' are allowed by default. RT #33839.
566 * Subroutines::RequireArgUnpacking no longer generates a false positive
567 for '$$_[]', which is an obfuscated way of saying '$_->[]'. RT #37713.
568 * ValuesAndExpressions::ProhibitMagicNumbers now has an
569 allow_to_the_right_of_a_fat_comma option, which defaults to true. Note
570 that it currently only works /directly/ to the right of a fat comma.
571 * Variables::ProhibitMatchVars had its default themes changed to "core
572 performance pbp", instead of "core bugs pbp" because, while the match
573 variables make regular expressions slow, it doesn't cause them to not
574 work correctly.
575 * Variables::ProhibitPackageVars has had FindBin and Log::Log4perl added
576 to the default exemptions.
577 * Variables::ProhibitReusedNames now has an "allow" option to specify
578 names that can be reused. It defaults to enabling $self and $class. RT
579 #42767.
580 * Variables::RequireLocalizedPunctuationVars has a customizable set of
581 exemptions via the "allow" option.
582
583 New Developer Features:
584 * The guts of perlcritic have been moved to Perl::Critic::Command. You
585 can invoke Perl::Critic::Command::run() to get the equivalent of running
586 the command. (Note, however, this interface WILL change, so don't count
587 on the current one.)
588 * Modules have had a "INTERFACE SUPPORT" section added which states
589 whether the Perl::Critic developers consider the particular module is
590 public or not. Any removal of functionality from a public module will
591 go through a deprecation cycle. Non-public modules may have their
592 interfaces changed without notice.
593 * P::C::Policy now has an is_enabled() method.
594 * P::C::Violation now has an element_class() method.
595
596 Bug Fixes:
597 * CodeLayout::ProhibitTrailingWhitespace didn't notice cases where PPI
598 would produce instances of PPI::Token::Whitespace that contained
599 multiple lines.
600 * Subroutines::ProtectPrivateSubs no longer regards the exportable POSIX
601 subroutines whose names begin with underscore as private. RT #38678.
602 * Subroutines::RequireArgUnpacking mishandled a complicated sitation with
603 $_ being an array reference. RT #39601.
604 * Variables::RequireLocalizedPunctuationVars now applies to subscripted
605 names. RT #29384.
606
607 Internals:
608 * The guts of Build.PL and Makefile.PL have been rearranged.
609
610 [1.097_002] Released on 2009-03-01
611 [1.097_001] Released on 2009-03-01
612
613 Changes summarized into 1.098 above. For exact details, see Changes on
614 BackPAN.
615
616 [1.096] Released on 2009-02-01
617
618 New Policies:
619 * ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator
620
621 Policy Changes:
622 * Documentation::PodSpelling now has a stop_words_file option.
623 * Modules::ProhibitEvilModules now has a modules_file option.
624
625 Bug Fixes:
626 * ErrorHandling::RequireCarping will now allow a literal newline
627 as well as "\n". Fixed by Kyle Hasselbacher, RT #25046
628 * Fix InputOutput::ProhibitTwoArgOpen so it allows '-|' or '|-' as the
629 second of two arguments. Patches from Kyle Hasselbacher and Leland
630 Johnson, RT #42384.
631 * InputOutput::RequireBracedFileHandleWithPrint applies to printf as well
632 as print. Fixed by Kyle Hasselbacher, RT #42537.
633 * TestingAndDebugging::RequireUseStrict and
634 TestingAndDebugging::RequireUseWarnings are no longer fooled by a
635 block-scoped pragma. RT #42310.
636 * ValuesAndExpressions::RequireInterpolationOfMetachars allows for escaped
637 backslashes. Fixed by Tom Wyant, RT #38530.
638 * Fix for problem in P::C::Document in dealing with underscores in
639 expressions like "use 5.009_001". Patch by Kevin Ryde, RT #36570 and
640 #42089.
641 * Fix in extras/perlcritic.el for a radio button. Patch by Kevin Ryde, RT
642 #42190.
643 * Fix distclean target in Makefile.PL. Patch by Richard Soderberg,
644 RT #42088.
645 * Fix temporary files not being cleaned up after tests. Patch by Kyle
646 Hasselbacher, RT #41443.
647 * Deal with changes in Pod::Parser v1.36 in test in t/05_utils_pod.t.
648
649 Documentation improvements contributed by Mark Grimes in response to RT
650 #41942.
651
652 [1.095_001] Released on 2009-01-18
653
654 Changes summarized into 1.096 above. For exact details, see Changes on
655 BackPAN.
656
657 [1.094001] Released on 2009-01-01
658
659 Bug Fixes:
660 * Tests would fail on systems without Regexp::Parser installed.
661
662 [1.094] Released on 2009-01-01
663
664 Incompatible Changes:
665 * The way that "## no critic" markers was refactored. As
666 a result, we discovered that the syntax for the markers was pretty
667 vague. If you didn't do it just right, it would disable all policies,
668 and not just the specific ones that you wanted. So we've tightened this
669 up a bit. If you followed the examples that have been in the docs for
670 the last couple years, then you should be fine. But if you've been
671 using certain other variations in your "## no critic" markers, then you
672 might suddenly find yourself violating the new
673 ProhibtUnrestrictedNoCritic policy. To fix this, just make sure your
674 Policy names appear in parentheses:
675
676 ## no critic Foo, Bar, Baz # wrong!
677 ## no critic Foo Bar Baz # wrong!
678
679
680 ## no critic (Foo, Bar, Baz) # ok!
681 ## no critic qw(Foo Bar Baz) # also ok!
682
683 * The deprecated $FORMAT variables for Perl::Critic::Policy and
684 Perl::Critic::Violation no longer exist. Use the corresponding
685 get_format() and set_format() functions instead.
686
687 New Policies:
688 * Miscellanea::ProhibitUnrestrictedNoCritic
689 * Miscellanea::ProhibitUselessNoCritic
690 * NamingConventions::Capitalization
691 * Subroutines::ProhibitReturnSort
692 * Variables::ProhibitReusedNames
693
694 Removed Policies:
695 * NamingConventions::ProhibitMixedCaseSubs and
696 NamingConventions::ProhibitMixedCaseVars have been moved to a separate
697 Perl-Critic-Deprecated distribution. The
698 NamingConventions::Capitalization policy does everything they do, plus
699 more.
700
701 Policy Changes:
702 * BuiltinFunctions::ProhibitStringyEval now has an allow_includes option
703 that makes it behave (mostly) like Ricardo SIGNES'
704 Perl::Critic::Policy::Lax::ProhibitStringyEval::ExceptForRequire.
705 * InputOutput::RequireCheckedClose, InputOutput::RequireCheckedOpen, and
706 InputOutput::RequireCheckedSyscalls now all support autodie.
707 Unfortunately, autodie is currently treated like a module and not a
708 pragma, which means that the lexical scoping is not taken into account.
709 * InputOutput::RequireCheckedSyscalls now has an exclude_functions
710 parameter.
711 * Modules::ProhibitEvilModules now allows you to specify what the
712 description of a use of a bad module should be, to, say, suggest that
713 people use autodie instead of Fatal.
714 * Subroutine::ProhibitExcessComplexity violation descriptions now include
715 the name of the subroutine, thanks to Andreas Koenig, RT #40070.
716 * TestingAndDebugging::RequireUseStrict and
717 TestingAndDebugging::RequireUseWarnings now have equivalent_modules
718 parameters that allow you to designate other modules as being equivalent
719 to the strict and warnings pragmata. This one is for all you Moose fans
720 out there. :]
721
722 Bug Fixes:
723 * ControlStructures::ProhibitUnreachableCode would treat package
724 statements as unreachable. Fixed by Kevin Ryde. RT #41734
725 * Fix warning from InputOutput::ProhibitOneArgSelect when select was
726 called with no arguments. RT #41926
727 * Miscellanea::RequireRcsKeywords couldn't find keywords after __END__
728 that didn't look like part of POD.
729 * Modules::RequireFilenameMatchesPackage would incorrectly complain about
730 programs. Yet more greatness contributed by Schwern. RT #39024.
731 * If a perlcriticrc file referred to a policy that wasn't installed and
732 the profile-strictness option was set to "fatal",
733 Perl::Critic::PolicyFactory fell over instead of reporting the
734 problematic policy name.
735
736 Miscellanea:
737 * Perl::Critic::Violation will automatically strip trailing periods
738 from your Policy description and explanation strings. This ensures that
739 the punctuation is consistent with the format specified by the user via
740 the -verbose formatting options.
741
742 New Developer Features:
743 * Perl::Critic::Policy::prepare_to_scan_document() is now checked and a
744 Policy can disable itself for just a single document, which can speed
745 things up.
746
747 [1.093_03] Released on 2008-12-11
748 [1.093_02] Released on 2008-10-30
749 [1.093_01] Released on 2008-09-07
750
751 Changes summarized into 1.094 above. For exact details, see Changes in
752 1.093_003 on BackPAN.
753
754 [1.092] Released on 2008-09-02
755
756 Bug Fixes:
757 * Fixed POD errors that were causing build failures. Sorry
758 about that.
759
760 [1.091] Released on 2008-09-01
761
762 New Policies:
763 * RegularExpressions::RequireDotMatchAnything
764
765 New Features:
766 * perlcritic now supports a -pager option, so you can more easily
767 send the output to your favorite pager. You can set this option
768 on the command-line or in your .perlcriticrc file. See the
769 perlcritic perldoc for more details. Credit to Michael Schwern.
770 * The output from "perlcritic -doc PATTERN" will be automatically
771 sent to your pager if you have set the -pager option.
772
773 Policy Changes:
774 * CodeLayout::ProhibitQuotedWordLists no longer applies if the list
775 contains any non-words, by default. A non-word is anything that does
776 not match /[\w-]+/. You can restore the former behavior by setting the
777 "strict" option. RT #37886.
778 * CodeLayout::ProhibitQuotedWordLists also now applies to the import
779 arguments of a C<use> statement. RT #24467.
780 * ErrorHandling::RequireCheckingReturnValueOfEval now recognizes ternary
781 left-sides as valid checks.
782 * RegularExpressions::RequireExtendedFormatting gains a
783 minimum_regex_length_to_complain_about option. Also, regexes that
784 contain only word and whitespace characters are now exempt from this
785 policy, by default; you can make it complain about them by turning on
786 the new strict option. Contributed by Michael Schwern. RT #38531.
787 * TestingAndDebugging::ProhibitNoWarnings now supports a
788 allow_with_category_restriction option, thanks to Michael Schwern.
789 RT #38514.
790 * CodeLayout::ProhibitHardTabs now allows leading tabs in qw() word lists
791 and regexes with the /x modifier. You can still configure this
792 policy to forbid all hard tabs, if you like. RT #32440
793
794 Bug Fixes:
795 * perlcritic should now work under PAR. RT #38380.
796 * URL for our repository in META.yml now works for anonymous
797 checkout. The password is "" (empty). RT #38628.
798 * color for high-severity violations is now magenta because
799 it is more redable than yellow on white backgrounds. RT #38511.
800
801 [1.090] Released on 2008-07-22
802
803 Bug Fixes:
804 * Test was incorrectly failing when Regexp::Parser wasn't installed.
805
806 [1.089] Released on 2008-07-21
807
808 Minor Enhancements:
809 * -s is now a synonym for --single-policy.
810
811 Policy Changes:
812 * Subroutines::ProhibitBuiltinHomonyms now also prohibits subroutines
813 with the same name as a Perl keyword (e.g. if, foreach, while).
814 Inspired by RT #37632.
815 * Subroutines::ProtectPrivateSubs now allows expressions like
816 "shift->_some_private_method();". Note that this *only* applies
817 to the "shift" function -- a private method call on the right of any
818 other bareword still causes a violation. RT #34713.
819 * Subroutines::RequireFinalReturn now includes exec in the set of things
820 that mark a successful return. RT #37672
821 * ValuesAndExpressions::ProhibitInterpolationOfLiterals now takes a
822 allow_if_string_contains_single_quote option. Contributed by Ed
823 Avis <[email protected]>. RT #36125.
824 * ValuesAndExpressions::RequireInterpolationOfMetachars now supports a
825 rcs_keywords option to allow for the common case where those require
826 dollar signs.
827
828 Bug Fixes:
829 * BuiltinFunctions::ProhibitSleepViaSelect would complain if there were
830 three undefs as arguments to select(), but one of them was the timeout.
831 RT #37416.
832 * Reduced false positives in
833 RegularExpressions::ProhibitSingleCharAlternation. Thanks to
834 Andy Lester and Elliot Shank test cases.
835 * RegularExpressions::ProhibitUnusedCapture would complain if there were
836 multiple captures used in a substitution, e.g. s/(.)(.)/$2$1/.
837 * Subroutines::ProhibitAmpersandSigils no longer complains about
838 "sort &foo(...)".
839 * Makefile.PL, Build.PL and other ".PL" scripts which typically do not
840 have a shebang are no longer mistaken as modules. This prevents
841 spurious warnings from Modules::RequireEndWithOne. RT #20481.
842
843 Internals:
844 * Tests are now self compliant.
845
846 [1.088] Released on 2008-07-04
847
848 New Policies
849 * ErrorHandling::RequireCheckingReturnValueOfEval
850
851 Policy Changes:
852 * ValuesAndExpressions::ProhibitLeadingZeros now accepts octal numbers
853 for the Unix permissions argument to chmod, dbmopen, mkdir, sysopen, or
854 umask, by default. Use the "strict" option to get the old behavior.
855 RT #31977.
856 * Due to the consensus at YAPC::NA 2008,
857 Variables::ProhibitUnusedVariables default severity has been raised to
858 medium/3.
859
860 Minor Changes:
861 * The perlcritic "--Version" option is now "--version" in order to act
862 like the rest of the world.
863
864 [1.087] Released on 2008-06-21
865
866 Policy Changes:
867 * CodeLayout::ProhibitParensWithBuiltins no longer complains about
868 sort(foo(@x)).
869 * TestingAndDebugging::RequireUseWarnings will not complain about files
870 that contain a "use 5.005" statement or similar for perls prior to 5.6.
871 Lesson of the day: computer conferences where you can meet in the real
872 world can clarify conversations greatly. Good to finally meet you Adam.
873 * InputOutput::ProhibitTwoArgOpen similarly will not complain if there's
874 a "use/require 5.005" statement in the file. RT #34385.
875
876 Bug fixes:
877 * Perl::Critic can now critique a file named "0". However, PPI will give
878 a parse error until the next version comes out. Fixes RT #36127.
879 * Moved detection of the lack of any enabled Policies from P::C::Config
880 to Perl::Critic. This was causing the perlcritic.t in Parrot to fail.
881 Note, however, there are plans afoot to change how Perl::Critic is
882 configured and things that depend upon that may break. Please contact
883 [email protected] and tell us how you're using P::C::Config
884 directly so that we can take your needs into account.
885
886 [1.086] Released on 2008-06-12
887
888 Policy Changes:
889 * NamingConventions::ProhibitAmbiguousNames now specifies the name that
890 it had problems with in its violation descriptions.
891
892 Bug fixes:
893 * The color option wasn't being correctly set from a .perlcriticrc.
894 RT #36569.
895
896 Minor changes:
897 * --colour is now a synonym for --color.
898
899 [1.085] Released on 2008-06-07
900
901 New Policies:
902 * Documentation::RequirePackageMatchesPodName
903
904 Policy Changes:
905 * Variables::ProhibitUnusedVariables detects a few more cases. It's
906 still very limited, though.
907
908 Bug fixes:
909 * ControlStructures::ProhibitUnreachableCode didn't notice "until" was an
910 conditional expression.
911
912 Minor documentation updates.
913
914 [1.084] Released on 2008-05-24
915
916 New Features:
917 * perlcritic now supports a --list-themes option.
918 * You can specify the maximum number of violations you want per Policy
919 per document. Developers can give a default value for this for a
920 Policy by overriding default_maximum_violations_per_document().
921 See RequireUseStrict and ProhibitMagicNumbers for examples.
922
923 Policy Moved:
924 * The ValuesAndExpressions::ProhibitMagicNumbers policy has been moved
925 from Perl::Critic::More into the primary Perl::Critic distribution.
926
927 New Policies:
928 * Variables::ProhibitUnusedVariables (very dumb, limited initial
929 implementation.)
930 * ControlStructures::ProhibitLabelsWithSpecialBlockNames
931 Contributed by Mike O'Regan. Kickin' ass, Mike.
932
933 Policy Changes:
934 * ControlStructures::ProhibitUnreachableCode now handles the perl 5.10
935 "//" and "err" operators. RT #36080
936 * InputOutput::RequireBriefOpen now ignores opens of STDIN, STDOUT,
937 and STDERR. You're generally trying to make long-lasting global
938 effects when manipulating these. (RT #35774)
939 * RegularExpressions::ProhibitUnusualDelimiters now supports an
940 "allow_all_brackets" option.
941 * RegularExpressions::RequireBracesForMultiline now supports an
942 "allow_all_brackets" option.
943 * TestingAndDebugging::RequireUseStrict now accepts "use Moose::Role"
944 as equivalent to "use strict". (RT #34838)
945 * TestingAndDebugging::RequireUseWarnings now accepts "use Moose::Role"
946 as equivalent to "use warnings". (RT #34838)
947 * ValuesAndExpressions::ProhibitMagicNumbers now accepts constant
948 subroutines.
949 * Variables::ProhibitMatchVars no longer detects "use English;".
950 This problem is detected in a more clear way by
951 Modules::RequireNoMatchVarsWithUseEnglish.
952 * Variables::ProhibitPerl4PackageNames no longer complains about
953 $'/$POSTMATCH. RT #36059
954 * Variables::RequireLocalizedPunctuationVars now allows the use of "my".
955 RT #33937
956
957 Bug Fixes:
958 * No longer falls over if a single file has a parse error.
959
960 New Developer Features:
961 * If a document specifies a minimum perl version, e.g. "use 5.008003",
962 P::C::Document::highest_explicit_perl_version() will tell you what it
963 is.
964 * The parameter to P::C::Policy::initialize_if_enabled is now a
965 P::C::PolicyConfig object instead of a hash reference.
966
967 Minor Changes:
968 * LOTS of documentation updates.
969 * A few more statistics are emitted by perlcritic with the --statistics
970 option.
971 * perlcritic --profile-proto now includes policy abstracts in its
972 output.
973
974 Prerequisites:
975 * Now depends upon PPI 1.203.
976 * New dependency upon version.
977
978 [1.083_006] Released on 2008-05-20
979 [1.083_005] Released on 2008-05-19
980 [1.083_004] Released on 2008-05-18
981 [1.083_003] Released on 2008-05-17
982 [1.083_002] Released on 2008-05-17
983 [1.083_001] Released on 2008-04-13
984
985 Changes summarized into 1.084 above. For exact details, see Changes in
986 1.083_006 on BackPAN.
987
988 [1.082] Released on 2008-03-08
989
990 New Features:
991 * A new metadata system for defining policy parameters/options has been
992 added. This makes the life of policy authors easier because
993 configuration validation and parsing can be taken care of
994 automatically, in most cases. This allows greater integration with
995 IDEs and allows the perlcritic "--profile-proto" option to produce
996 better output.
997
998 Note: This change does NOT REQUIRE ANY CHANGES to policies outside of
999 this distribution; they should continue to work as is. However, use
1000 of this facility can reduce the size of your code and provide the
1001 means for tools to discover more about your policy. If this change
1002 does break any of your policies, please let us know.
1003
1004 To learn how to take advantage of this facility, read
1005 Perl::Critic::DEVELOPER and look at the source of any of the
1006 configurable policies included in this distribution.
1007
1008 There is a discussion of the design considerations for this facility in
1009 the source repository under doc/PolicyParameter_Notes.pod.
1010
1011 * Added support for "criticism-fatal" option in your perlcriticrc
1012 file. This will be used by the criticism pragma to cause execution
1013 to abort if the file contains any violations.
1014
1015 New Policy:
1016 * Module::RequireNoMatchVarsWithUseEnglish
1017
1018 Policy Changes:
1019 * Added an allow_last_statement_to_be_comma_separated_in_map_and_grep
1020 option to ValuesAndExpressions::ProhibitCommaSeparatedStatements.
1021 Partial response to http://rt.cpan.org/Public/Bug/Display.html?id=27654.
1022 * ControlStructures::ProhibitPostfixControls gains the ability to have
1023 the flow control statements allowed to be modified. This in response
1024 to RT #29540.
1025 * TestingAndDebugging::RequireUseStrict now accepts "use Moose" as
1026 equivalent to "use strict".
1027 * TestingAndDebugging::RequireUseWarnings now accepts "use Moose" as
1028 equivalent to "use warnings".
1029
1030 Bug Fixes:
1031 * RT #31281 perlcritic doesn't recognize "#!/bin/env perl" shebang
1032 * Replace usage of Unicode property escapes with POSIX character classes
1033 order to restore 5.6 compatability.
1034 * RT #30388 ValuesAndExpressions::ProhibitVersionStrings complained
1035 about numbered directories in "use lib".
1036 * Fixed handling of badly behaved spelling programs in PodSpelling.
1037
1038 [1.081_006] Released on 2008-03-02
1039 [1.081_005] Released on 2007-12-29
1040 [1.081_004] Released on 2007-12-20
1041 [1.081_003] Released on 2007-12-16
1042 [1.081_002] Released on 2007-12-16
1043 [1.081_001] Released on 2007-12-15
1044
1045 Changes summarized into 1.082 above. For exact details, see Changes in
1046 1.081_006 on BackPAN.
1047
1048 [1.080] Released on 2007-11-11
1049
1050 New Features:
1051 * Allow a "## no critic" statement after a shebang on line 1 of a
1052 file. This allows users to block violations that apply to
1053 whole files and still allow shebangs.
1054
1055 New Policies: (funded by a Perl Foundation grant)
1056 * InputOutput::ProhibitExplicitStdin
1057 * RegularExpressions::ProhibitFixedStringMatches
1058 * RegularExpressions::RequireBracesForMultiline
1059 * RegularExpressions::ProhibitUnusualDelimiters
1060 * RegularExpressions::ProhibitUnusedCapture
1061 * RegularExpressions::ProhibitComplexRegexes
1062 * RegularExpressions::ProhibitSingleCharAlternation
1063 * RegularExpressions::ProhibitEscapedMetacharacters
1064 * RegularExpressions::ProhibitEnumeratedClasses
1065 * InputOutput::RequireBriefOpen
1066 * InputOutput::RequireCheckedSyscalls
1067
1068 Other New Policies
1069 * ControlStructures::ProhibitNegativeExpressionsInUnlessAndUntilConditions
1070
1071 Policy Changes:
1072 * Variables::ProhibitConditionalDeclarations now permits you to local-ize
1073 variables in conditional declarations. This makes sense, since
1074 C<local> is actually a variable modifier, rather than a declaration.
1075 Thanks to David Golden for reporting this.
1076
1077 New Developer Features:
1078 * Perl::Critic::Utils::PPIRegexp encapsulates interaction with
1079 the PPI Regexp token classes. Those classes have very sparse
1080 APIs, so this package hides away the ugly fiddling with PPI
1081 internals.
1082 * Added a new optional_modules parameter for the .run syntax.
1083
1084 Bug fixes:
1085 * PPI::Structure::List can now contain multiple children,
1086 so P::C::Utils::parse_arg_list() needs to handle it.
1087
1088 This was done in the process of fixing
1089 http://rt.cpan.org/Ticket/Display.html?id=24924, which was a problem
1090 with TestingAndDebugging::RequireTestLabels.
1091
1092 * ValuesAndExpressions::ProhibitLongChainsOfMethodCalls wasn't resetting
1093 chain length when it ran into the end of a sub-expression.
1094
1095 http://rt.cpan.org/Public/Bug/Display.html?id=30040
1096
1097 * ValuesAndExpressions::ProhibitCommaSeparatedStatements was reporting
1098 false positives when builtins which accept both no and multiple
1099 arguments were involved.
1100
1101 http://rt.cpan.org/Public/Bug/Display.html?id=27654
1102
1103 Internals:
1104 * Removed all use of Carp in favor of exceptions.
1105
1106 Prerequisites:
1107 * Now requires PPI 1.201. A number of workarounds for PPI bugs have been
1108 removed.
1109 * New dependency upon Exception::Class.
1110
1111 Installation:
1112 * Use Devel::CheckOS to see whether Perl::Critic is being installed on
1113 a Solaris system and warn about tar(1) chopping file names off if it
1114 is.
1115
1116 [1.079_003] Released on 2007-10-22
1117 [1.079_002] Released on 2007-10-21
1118 [1.079_001] Released on 2007-10-09
1119
1120 Changes summarized into 1.080 above. For exact details, see Changes in
1121 1.079_003 on BackPAN.
1122
1123 [1.078] Released on 2007-09-19
1124
1125 Restore Perl::Critic::TestUtils::should_skip_author_tests() and
1126 get_author_test_skip_message(). Some Perl::Critic add-on distributions
1127 are using them.
1128
1129 [1.077] Released on 2007-09-15
1130
1131 Note: if you don't have any problems installing Perl::Critic 1.076, there
1132 is no need to upgrade to this version. There are no functionality
1133 changes. This release only contains changes related to installation that
1134 a few people were experiencing.
1135
1136 Minor changes:
1137 * Removed build-time use of Readonly, again, due to problems some people
1138 were having when trying to compile the code by hand, rather than using
1139 CPAN(PLUS)?.
1140 * Don't run author tests if there's a .svn directory present because
1141 users who grabbed the code from the source repository were executing
1142 them and getting failures.
1143 * Don't generate optional, module-hiding test wrappers if author tests
1144 are not enabled.
1145
1146
1147 [1.076] Released on 2007-09-07
1148
1149 It appears from reports on the 1.075_001 release that the subroutine
1150 sigils were indeed the problem. Release to the general populace.
1151
1152
1153 [1.075_001] Released on 2007-09-06
1154
1155 Bug Fixes:
1156 Undo the changes in 1.073 and 1.074. Instead, stop using the subroutine
1157 sigil in import and export lists. It is suspected that the problem lies
1158 with Exporter stripping off ampersands.
1159
1160 [1.074] Released on 2007-09-04
1161
1162 Bug Fixes:
1163 Repeat the Makefile.PL change on
1164 t/generate_without_optional_dependencies_wrappers.PL.
1165 I love CPAN Testers.
1166
1167 [1.073] Released on 2007-09-04
1168
1169 Bug Fixes:
1170 Work around problems with the combination of Exporter & Readonly in
1171 Makefile.PL on some machines.
1172
1173 [1.072] Released on 2007-09-03
1174
1175 Bug Fixes:
1176 * The Makefile generated by Makefile.PL was not syntactically correct
1177 according to some versions of Solaris. Thanks to Diab Jerius
1178 (DJERIUS) for discovery and testing.
1179 * Fixed mis-definition of "quiet" value for the "--profile-strictness"
1180 option.
1181 * Enhanced testing with the absence of optional modules.
1182
1183 [1.071] Released on 2007-08-24
1184
1185 The "Brown Paper Bag" Release
1186
1187 Bug Fixes:
1188 * Tests would not pass in environments that did not have all optional
1189 dependencies installed.
1190
1191 [1.07] Released on 2007-08-21
1192
1193 New Policies: (funded by a Perl Foundation grant)
1194 * BuiltinFunctions::ProhibitBooleanGrep
1195 * BuiltinFunctions::ProhibitComplexMappings
1196 * Documentation::PodSpelling
1197 * InputOutput::ProhibitJoinedReadline
1198 * Subroutines::ProhibitManyArgs
1199 * Subroutines::RequireArgUnpacking
1200 * ValuesAndExpressions::ProhibitImplicitNewlines
1201 * Variables::RequireLocalizedPunctuationVars
1202
1203 Other New Policies
1204 * Subroutines::ProhibitNestedSubs
1205
1206 New Features:
1207 * The "perlcritic --profile-proto" output now includes the "add_themes"
1208 parameter for each policy.
1209 * The perlcritic "--strict-profile" option has been replaced with a
1210 "--profile-strictness" option. This new option takes values of "warn"
1211 (the default), "fatal", and "quiet", which controls what happens with
1212 ignorable problems in a .perlcriticrc file.
1213
1214 New Developer Features:
1215 * Perl::Critic::Policy now has an overridable initialize_if_enabled()
1216 method which allows a Policy to perform expensive initialization after
1217 it has been determined whether the user has it enabled or not. Also,
1218 this method allows a Policy to say that it should be disabled
1219 regardless of what the user says.
1220
1221 Actually, use of this method is now encouraged over using a
1222 constructor.
1223
1224 Other Stuff:
1225 * Now requires the Readonly module in order to be more self-compliant.
1226
1227 [1.061] Released on 2007-07-24
1228
1229 Bug Fixes:
1230 * Fix P::C::Theme-- Exporter in Perl 5.6 does not export import(), so you
1231 must subclass it. *sigh*
1232 * Fix P::C::Config::_validate_and_save_theme()-- eval of an empty string
1233 does not reset $@/$EVAL_ERROR in Perl 5.6.
1234
1235 Big thanks to Anirvan Chatterjee for identifying and helping debug these
1236 issues.
1237
1238 [1.06] Released on 2007-06-27
1239
1240 New Features:
1241 * perlcritic now emits errors for all the problems it can find for the
1242 global options in the command-line parameters and .perlcriticrc file,
1243 rather than bailing on the first one it encounters.
1244
1245 * perlcritic now has a "--strict-profile" option which will make warnings
1246 about problems in a profile fatal.
1247
1248 * perlcritic now has a "--statistics-only" option which suppresses the
1249 display of individual violations and only shows the additional output
1250 produced by the "--statistics" option.
1251
1252 Feature requests:
1253 * A value for "color" can now be specified in a .perlcriticrc.
1254 http://rt.cpan.org/Ticket/Display.html?id=24877
1255
1256 New Policies:
1257 * ValuesAndExpressions::ProhibitQuotesAsQuotelikeOperatorDelimiters
1258 As suggested in http://rt.cpan.org/Ticket/Display.html?id=23290.
1259 * ValuesAndExpressions::ProhibitLongChainsOfMethodCalls
1260 * Modules::ProhibitExcessMainComplexity
1261 As suggested in http://rt.cpan.org/Ticket/Display.html?id=24699
1262
1263 Minor changes:
1264 * The perlcritic "--profile-proto" option now emits the short names for
1265 policies, rather than the full ones.
1266
1267 * The "-profileproto" and "-singlepolicy" options have been renamed to
1268 "-profile-proto" and "-single-policy" in order to make the growing
1269 number of command-line options comprehensible. The change of
1270 "singlepolicy" also affects your F<.perlcriticrc> file.
1271
1272 [1.053] Released on 2007-06-02
1273
1274 *DEVELOPMENT RELEASE*
1275
1276 Bug Fixes:
1277 Fixed bug in 15_statustics.t test script, which caused the build
1278 to fail on machines that don't have Perl::Tidy installed.
1279
1280 [1.052] Released on 2007-06-01
1281
1282 *DEVELOPMENT RELEASE*
1283
1284 New Features:
1285 * perlcritic now emits a summary about the scanned code when enabled by
1286 the "-statistics" option.
1287
1288 Policy Enhancements:
1289 * InputOutput::ProhibitBacktickOperators can now be configured to only
1290 check in void contexts.
1291
1292 Bug Fixes:
1293 * 27073: False positive in RequireUpperCaseHeredocTerminator
1294 * 27065: CodeLayout::ProhibitTrailingWhitespace breaks under Perl 5.6.1
1295 * 26462: ControlStructures::ProhibitCascadingIfElse pod typo
1296 * ValuesAndExpressions::ProhibitCommaSeparatedStatements was complaining
1297 about multiple values in the list to be iterated over by a foreach loop.
1298 * Corrected PBP page numbers for some policies (Quinn Weaver).
1299
1300 [1.051] Released on 2007-04-12
1301
1302 *DEVELOPMENT RELEASE*
1303
1304 No new policies.
1305 No particular bug fixes.
1306
1307 Internals:
1308 * Added several new utility functions to support the StricterSubs distro.
1309 Also, some of the existing functions in Perl-Critic-Utils have
1310 changed in ways that might break your custom policies.
1311
1312 Miscellanea:
1313 * Updated Emacs plugin (Courtesy Josh ben Jore).
1314 See extras/perlcritic.el for details.
1315 * Added copy of BBEdit plugin (Courtesy of Josh Clark).
1316 See extras/perl_critic_for_bbedit-1_0.zip for details
1317
1318 [1.05] Released on 2007-03-19
1319
1320 Bug Fixes:
1321 * 25557: t/20_policy_prohibittrailingwhitespace.t fails on Perl 5.8.0
1322
1323 [1.04] Released on 2007-03-18
1324
1325 Bug Fixes:
1326 * 25008: Subroutines::RequireFinalReturn should allow "throw"
1327 * 25085: False Positive - Heredoc terminator must be quoted
1328 * 18423: VERSION check does not notice Readonly::Scalar version
1329 * 25449: Proposal of $VERSION declaration (DUPLICATE)
1330
1331 New Policies:
1332 * CodeLayout::ProhibitTrailingWhitespace
1333 * ValuesAndExpressions::ProhibitCommaSeparatedStatements
1334 * Variables::ProhibitPerl4PackageNames
1335
1336 Policy Enhancements:
1337 * Subroutines::RequireFinalReturn can now be configured to recognize
1338 your custom functions that behave like "die" or "exit".
1339 * Documentation::RequirePodSections can be configured to match
1340 Module::Starter:PBP or to really match the PBP book.
1341
1342 [1.03] Released on 2007-02-13
1343
1344 Bug Fixes:
1345 * Fixed a few more problems with the %f, %F, and %r format escapes.
1346 * I forgot to put Conway's perlcriticrc file in the MANIFEST. Sorry.
1347
1348 Interface Changes:
1349 * Perl::Critic::Utils automatically exports everything. However,
1350 this is deprecated. In the future, you must request your exports.
1351
1352 Policy Changes:
1353 * Duplicate violations of RequireExcplicitPackage are now squelched,
1354 in the same way as RequireUseStrict and RequireUseWarnings.
1355
1356 [1.02] Released on 2007-02-11
1357
1358 Bug Fixes:
1359 * "undef" incorrectly triggered ProhibitMutatingListFunctions.
1360 * 24876: %f and %F escapes not working in custom "verbose" format strings.
1361 * 24875: Documentation bug in TestingAndDebugging::ProhibitNoStrict
1362
1363 New Policies:
1364 * InputOutput::RequireCheckedOpen
1365 * InputOutput::RequireCheckedClose
1366
1367 Other Cool Stuff:
1368 * Added Conway's own suggested Perl::Critic configuration as
1369 examples/perlcriticrc-conway.
1370
1371 * See the examples/ directory for some neat demonstrations of using
1372 the Perl::Critic API. Contributed by Elliot Shank.
1373
1374 Interface Changes:
1375 * Perl::Critic::Utils no longer exports anything by default. Policies
1376 outside the distribution will need to specify what exactly they need
1377 from this module. There are a number of tags that can be used in
1378 addition to individual imports.
1379
1380 [1.01] Released on 2007-01-24
1381
1382 PRODUCTION RELEASE: You may now consider the public Perl::Critic
1383 API as "stable." Future minor releases will focus on bug fixes,
1384 new policies, and internal refactoring.
1385
1386 Bug Fixes:
1387 * Fixed memory leak. This was reported by the Parrot team at
1388 http://rt.perl.org/rt3/Ticket/Display.html?id=41230
1389
1390 [0.23] Released on 2007-01-19
1391
1392 Bug Fixes:
1393 * 23994: Test 56 in t/05_utils.t of Perl::Critic v0.22 fails
1394 * 24005: test 95 in t/13_bundled_policies fails in 0.22
1395
1396
1397 Groovy New Features:
1398 * Added '%F' to the Violation format specifications. This will
1399 give you just the name of file where the violation occurred
1400 (i.e. without the path).
1401
1402 * Improved validation of .perlcriticrc file. An invalid
1403 default setting will now cause a fatal exception. A
1404 strange-looking policy name will cause a warning.
1405
1406
1407 Interface Changes:
1408 * The syntax for theme expressions has changed. Instead of using
1409 mathematical operators qw(+ * -) you must now use the logical
1410 operators qw(|| && !). See the Perl::Critic docs for more info.
1411
1412 * The @GLOBALS and @BUILTINS variables are no longer exported by
1413 Perl::Critic::Utils. Use the is_perl_global() and is_perl_builtin()
1414 functions instead.
1415
1416 * Perl::Critic::Policy::policy_parameters() has bee renamed to
1417 Perl::Critic::Policy::supported_paramters(). This was an
1418 undocumented feature anyway, so it shouldn't affect anyone.
1419
1420
1421 Other Internal Changes:
1422 * Perl::Critic now requires B::Keywords v1.05 or newer.
1423
1424 * A few internal classes have been refactored. As a result,
1425 Set::Scalar is no longer a required dependency.
1426
1427
1428 [0.22] Released on 2006-12-15
1429
1430 New Features:
1431 * Introduced named severity levels: gentle, stern, harsh, cruel, brutal
1432 You can use these named levels instead of the numeric ones.
1433 For example: "perlcritic --severity=cruel MyModule.pm"
1434 Or just: "perlcritic --cruel MyModule.pm"
1435
1436 * For perlcritic, the "-List" option has been renamed to
1437 "-profileproto". The output now includes the names of the
1438 parameters that each Policy supports, if any.
1439
1440 * Improved validation of Policy parameters in your F<.perlcriticrc>
1441 Any invalid parameter now causes a fatal exception.
1442
1443 Major Changes:
1444 * Reassigned themes for most policies. Now there are fewer
1445 themes and they are organized around programming concepts
1446 instead of severity levels. If you have assigned your own
1447 themes to any Policies, they should still work as expected.
1448
1449 Policy Changes:
1450 * ErrorHandling::RequireCarping will not complain if it can figure
1451 out that the die or warn message will always end in a newline
1452 ("\n"). The idea is that, if you put the newline there, you
1453 don't indend for there to be any file/line/stack information
1454 emitted, in which case you really don't want carp/croak.
1455
1456 You can restore the old strict behavior by giving the policy
1457 a false value for "allow_messages_ending_with_newlines" in your
1458 configuration.
1459
1460 Misc Changes:
1461
1462 Added single-letter uppercase alternatives for some perlcritic options.
1463
1464 [0.21_01] Released on 2006-12-03
1465
1466 New Policies:
1467 * TestingAndDebugging::ProhibitProlongedStrictureOverride
1468 * ControlStructures::ProhibitMutatingListFunctions
1469
1470 New Features:
1471 * Say "perlcritic -List" to get an expanded listing of all Policies.
1472 The format is suitable for use as your .perlcriticrc file.
1473 * Say "perlcritic -doc PATTERN" to get the documentation for all
1474 Policies that match m/PATTERN/imx. This is a little easier than
1475 typing in the full name of the Policy module with "perldoc".
1476 * Say "perlcritic --singlepolicy PATTERN" to use one and only one
1477 policy.
1478 * Can now specify exceptions to Variables::ProhibitPackageVars,
1479 for packages like File::Find that only interface through
1480 package variables.
1481
1482 Bug Fixes:
1483 * 21713 false positive for parens used with substr and unpack.
1484 * 22890 allow Rcs keywords in POD.
1485
1486 Internals:
1487 * Testing system overhauled. Details on the Policy/subtest
1488 framework is in t/run.t.
1489 * Added Perl::Critic::Utils::words_from_string. This is safer
1490 than plain old C<split /\s+/>.
1491
1492 [0.21] Released on 2006-11-05
1493
1494 New Policies:
1495 * BuiltinFunctions::ProhibitReverseSortBlock
1496 * BuiltinFunctions::ProhibitVoidGrep
1497 * BuiltinFunctions::ProhibitVoidMap
1498 * CodeLayout::RequireConsistentNewlines
1499 * Modules::RequireFilenameMatchesPackage
1500 * TestingAndDebugging::RequireTestLabels
1501 * ValuesAndExpressions::ProhibitMismatchedOperators
1502
1503 New Features:
1504 * Introduced policy "themes." Themes are arbitrary names that can
1505 be used to identify a group of related Policies. You can select
1506 your favorite policies by combining themes in a mathematic expression
1507 such as "pbp * (danger + risky)". See POD for details.
1508 * perlcritic output is colorized if you have Term::ANSIColor. This
1509 only works on non-Win32 platforms. Use -nocolor switch to disable.
1510 * Say "perlcritic -count" to get just the the total number of
1511 violations per file. Use this feature to quickly identify hot-spots.
1512 * Use the -only switch to choose only from policies mentioned in your
1513 .perlcriticrc file. This is useful if you usually only want to
1514 work with a small subset of the policies.
1515 * Default values for most of the perlcritic and Perl::Critic options
1516 can now be defined in your .perlcriticrc file. See POD for details.
1517
1518 Bug Fixes:
1519 * 21236: wrong page number for "printing to filehandles"
1520 * 21916: File handle ... wrong page reference in PBP [DUPE]
1521 * 21714: false positive for capture var used in ternary condition
1522 * 21718: No skip for File::Slurp in includes.t
1523 * ProhibitBarewordFilehandles doesn't complain if you open
1524 STDIN, STDOUT or STDERR.
1525 * Parrot 40564: Subroutines::RequireFinalReturn should allow die,
1526 exit, etc.
1527 * Each "for" and "foreach" loop now adds one point to the McCabe
1528 complexity score.
1529
1530 Other Stuff:
1531 * The internals of Perl::Critic have been significantly refactored,
1532 but should still be compatible with existing third-party Policies.
1533 * Added author-only tests to the release, but disabled by default
1534 * New Perl::Critic::Utils::shebang_line() method
1535 * Support for filename-based policies
1536 * Additional prerequisite: Set::Scalar
1537 * Now requires PPI version 1.118
1538
1539 [0.20] Released on 2006-09-10
1540
1541 Perl::Critic now requires PPI version 1.117, which fixes
1542 several bugs that were introduced in version 1.116.
1543
1544 Bug Fixes:
1545 * 21079: grep clears @SITE_POLICIES
1546 * 21352: Test failures with PPI 1.117
1547 * 11365: sub DESTROY detected as a builtin homonym
1548
1549 [0.19] Released on 2006-08-20
1550
1551 New Policies:
1552 * BuiltinFunctions::ProhibitStringySplit
1553 * ControlStructures::ProhibitDeepNests
1554 * RegularExpressions::ProhibitCaptureWithoutTest
1555 * Variables::RequireLexicalLoopIterator
1556
1557 New Features:
1558 * "perlcritic -quiet" suppresses the "source OK" message.
1559 * Variables::ProhibitPunctuationVars is now configurable.
1560
1561 Bug Fixes:
1562 * 20965: "Hard tabs used at" shouldn't check __DATA__
1563 * 21070: ProhibitNoisyQuotes hates overload
1564 * Punctuation variables are now exempt from ProhibitLocalVars
1565
1566 Other Stuff:
1567 * Test coverage is now over 95%
1568
1569 [0.18_01] Released on 2006-08-06
1570
1571 New Policies:
1572 * Variables::RequireNegativeIndices
1573 * InputOutput::ProhibitInteractiveTest
1574 * ErrorHandling::RequireCarping
1575
1576 Bug Fixes:
1577 * RequireTidyCode tests fail if user has custom .perltidyrc file
1578 * 20612: RequirePerlTidy was ignoring HEREDOCs
1579 * 20659: __END__ statement considered "unreachable"
1580 * Fix for PPI::XS (no C<use overload '""'> support)
1581 * Support for 'goto' in ProhibitAmpersandSigils and
1582 Subroutines::RequireFinalReturn
1583
1584 Performance Enhancements:
1585 * Introduced Perl::Critic::Document class. This is a facade for
1586 PPI::Document which internally caches search results. This
1587 reduces the running time by about 35%. The facade should be
1588 invisible, unless you are doing something really sneaky.
1589 * Extraction of the 'diagnostics' information is postponed
1590 until it is really needed. Speedup has not been measured.
1591 * Calls to helper-subs have been reordered for maximum efficiency.
1592
1593 Other Cool Stuff:
1594 * Includes updated version of perlcritic mode for emacs. See
1595 "extras/perlcritic.el" for details.
1596
1597 [0.18] Released on 2006-07-16
1598
1599 Bug Fixes:
1600 * 14855: Home discovery is dangerously naive.
1601 * 20060: Incorrect page numbers in ProhibitLeadingZeros
1602 and RequireNumberSeparator policies.
1603 * 20068: .perlrc file - inconsistent documentation
1604 * 20254: "use vars qw(@EXPORT_OK)" not recognized
1605 * 20463: No-case heredoc terminator incorrectly detected as lower case.
1606 * ProhibitOneArgBless doesn't understand "bless {} => $class;"
1607 * ProhibitExcessComplexity doesn't count 'while' and 'until' stmnts
1608 * ProhibitLeadingZeros was falsely hits '.0456'
1609
1610 Enhancements:
1611 * If File::HomeDir is available, we use it to locate the
1612 .perlcriticrc file. This should help make Perl::Critic
1613 more portable to Win32 platforms. If File::HomeDir is
1614 not installed, we resort to looking at the usual
1615 environment variables.
1616
1617 Other Stuff:
1618 * Added "perlcritic.el", which is a super-cool emacs minor-mode
1619 that runs perl-critic on the current buffer and returns the
1620 results in a sexy hot-linked "compiler" window. You can run
1621 it on demand, or have it run automatically every time you
1622 save the buffer. You can find this in the extras/ directory.
1623 Thanks to Josh ben Jore for contributing this.
1624
1625 * Moved "Perl::Critic::TestUtils" into the installed build. This
1626 module is only used for unit-testing Perl::Critic, but we
1627 are putting it in the installation so folks who want to
1628 extend Perl::Critic can make use of it.
1629
1630 [0.17] Released on 2006-06-13
1631
1632 Bug Fixes:
1633 * 19836: Perl-Critic0.16 fails tests during install. This was
1634 caused by a bug in version 3.01 of Module::Pluggable. See
1635 http://rt.cpan.org/Ticket/Display.html?id=19857 for details.
1636 * Fixed bug in no-critic pragma parser.
1637
1638 New Policies:
1639 * ValuesAndExpressions::ProhibitEscapedCharacters
1640 * BuiltinFunctions::RequireSimpleSortBlock
1641
1642 Enhancements:
1643 * Perl::Critic can export critique() as a static function. This
1644 may appeal to folks who dislike the object-oriented interface.
1645
1646 [0.16] Released on 2006-05-14
1647
1648 Enhancements:
1649 * Perl::Critic->critique() now accepts a PPI::Document as the
1650 argument. This feature creates an additional dependency on
1651 Scalar::Util, but that shouldn't be a problem because it is
1652 included with List::Util, which we already use.
1653
1654 Miscellanea:
1655 * Increased PPI dependency from v1.110 to v1.112
1656
1657 [0.15_03] Released on 2006-05-07
1658
1659 Bug Fixes:
1660 * The "## no critic" feature is now implemented without eval-ing
1661 the code. This keeps Perl::Critic pure and safe :)
1662 * 19082: Page number for AUTOLOAD is incorrect
1663
1664 New Policies:
1665 * ControlStructures::ProhibitUnreachableCode (by Peter Guzis)
1666 * Modules::ProhibitAutomaticExportation
1667 * ValuesAndExpressions::ProhibitVersionStrings
1668
1669 [0.15_02] Released on 2006-04-26
1670
1671 Bug Fixes:
1672 * Reimplemented the '##no critic' pragmas to have effect on the
1673 line where the violation is reported, not on the line where
1674 the candidate element lives. This is because some policies
1675 may report violations that are nowhere near the element that
1676 is being evaluated.
1677 * RequireUseStrict, RequireUseWarnings, and RequireExplcitPackage
1678 all emit violations for _every_ statement that violates the
1679 Policy. This closes a loophole that allowed you to circumvent
1680 the Policy by using '## no critic' on just the first statement
1681 that violated the policy.
1682 * Fixed the workaround for the magic shebang that is inserted
1683 by EU::MM and M::B. This had stopped working around version 13.
1684 * Fixed -noprofile option on 'perlcritic'. This also had stopped
1685 working at some point.
1686
1687 [0.15_01] Released on 2006-04-16
1688
1689 Enhancements:
1690 * Added diagnostic messages if the .perlcriticrc contains entries
1691 for Policy modules that don't seem to exist.
1692 * Now you can specify which policies to disable with the
1693 "## no critic" pseudo-pragmas. This feature is still
1694 experimental. See docs for details.
1695 * perlcritic's directory searching now skips backup files, such
1696 as *.swp, *.bak and *~. It also ignores version control system
1697 directories, and the blib directory in module build directories.
1698
1699 Bug Fixes:
1700 * 18386: Bad example in POD for Documentation::RequirePodSections
1701 * 18670: Test failure if Perl::Tidy is not installed
1702 * 18698: Policy idea ProhibitUniversalFunctions (see New Policies)
1703 * RequireInterpolationOfMetachars falsely hit strings like 'foo=s@'
1704 which are commonly used with Getopt::Long.
1705
1706 New Policies:
1707 * BuiltinFunctions::ProhibitUniversalCan (by Chris Dolan)
1708 * BuiltinFunctions::ProhibitUniversalIsa (by Chris Dolan)
1709
1710 Miscellanea:
1711 * All spurrious options for `perlcritic` are now fatal.
1712 * Changed several of the -verbose formats to be more readable.
1713 * Explicit -severity option now overrides -[12345] shortcuts instead
1714 of being the other way around.
1715
1716
1717
1718 [0.15] Released on 2006-03-26
1719
1720 Bug Fixes:
1721 * 17964: Insists my code is not tidy (may not be fixed for all cases)
1722
1723 [0.14_02] Released on 2006-03-19
1724
1725 Bug Fixes:
1726 * 15653: False positive in OneArgSelect (fixed for real this time)
1727
1728 New Policies:
1729 * ClassHierarchies::ProhibitAutoloading
1730 * Documentation::RequirePodSections
1731 * InputOutput::RequireBracedFileHandleWithPrint
1732 * ValuesAndExpressions::ProhibitMixedBooleanOperators
1733 * Variables::RequireInitializationForLocalVars
1734
1735 [0.14_01] Released on 2006-03-05
1736
1737 Bug Fixes:
1738 * 14731: False positive: Builtin function called with parens
1739 * 17554: False positive in CodeLayout::RequireTrailingCommas
1740
1741 New Policies:
1742 * ClassHierarchies::ProhibitExplicitISA
1743 * InputOutput::ProhibitReadlineInForLoop
1744 * Miscellanea::ProhibitFormats
1745 * Miscellanea::ProhibitTies
1746 * Variables::ProhibitConditionalDeclarations
1747
1748 [0.14] Released on 2006-01-29
1749
1750 More documentation edits.
1751
1752 New Policies:
1753 * Documentation::RequirePodAtEnd
1754 * Subroutines::ProtectPrivateSubs
1755 * Variables::ProhibitMatchVars
1756 * Variables::ProtectPrivateVars
1757
1758 Bug Fixes:
1759 * 15295: "## no critic" pragmas too aggresive on compound statements.
1760 * t/01_config.t failed in the presence of third-party policies
1761
1762 [0.13_05] Not released
1763
1764 More documentation edits.
1765
1766 Implemented workaround for failing pod_coverage tests.
1767
1768 Bug Fixes:
1769 * 16906: tr/// created false-postives with RegularExpression polices.
1770
1771 [0.13_04] Released on 2005-12-31
1772
1773 Moved DEVELOPER.pod file into the Perl/Critic dir.
1774
1775 More documentation edits.
1776
1777 [0.13_03] Released on 20051230
1778
1779 perlcritic now prints 'source OK' if it doesn't find any
1780 violations. This gives folks a warm fuzzy feeling.
1781
1782 Tweaked some test cases that were failing on my Solaris
1783 environment at work.
1784
1785 [0.13_02] Released on 2005-12-29
1786
1787 Fixed Config to recognize fully-qualified module names in the
1788 .perlcriticrc file.
1789
1790 Various documentation edits.
1791
1792 [0.13_01] Released on 2005-12-28
1793
1794 Replaced 'priority' concept with 'severity'. Now each Policy module
1795 has a predefined severity level ranging from 1 to 5. By default,
1796 perlcritic only reports the most severe violations. You can adjust
1797 the severity threshold at the command line, and you can change
1798 the severity for any Policy using the config file.
1799
1800 Chris implemented the applies_to() mechanism, which allows each Policy
1801 class to declare the types of PPI elements that it wants to examine.
1802 When traversing the document, Perl::Critic invokes the Policy only
1803 for elements that are of the correct type. This improves performance
1804 by about 33%.
1805
1806 Perl::Critic now uses a Plugin architecture to automatically
1807 discover Policy modules. So if you have custom Policies, all you
1808 have to do is install them in the Perl::Critic::Policy namespace --
1809 no need to add anything to your .perlcriticrc file. If you write
1810 policies in a different namespace, you can configure that too. See
1811 the Perl::Critic::Config docs for details.
1812
1813 New Policies:
1814 * Modules::RequireEndWithOne
1815 * NamingConventions::ProhibitAmbiguousNames
1816 * References::ProhibitDoubleSigils
1817 * Subroutines::RequireFinalReturn
1818 * Subroutines::ProhibitAmpersandSigils
1819 * Subroutines::ProhibitExcessComplexity
1820 * TestingAndDebugging::ProhibitNoStrict
1821 * TestingAndDebugging::ProhibitNoWarnings
1822
1823 Bug Fixes:
1824 * 15101: Plugin architecture improves support for 3rd-party code
1825 * 16319: Fixed incorrect PBP page number in ProhibitBarwordFilehandle
1826 * 16321: Lists of empty quotes are now allowed by ProhibitQuotedWordLists
1827 * 16288: Empty lists caused a fatal error RequireTrailingCommas
1828 * 15653: Fixed false positive in OneArgSelect.
1829
1830 [0.13] Released on 2005-10-31
1831
1832 Official release of 0.12_03. No code major changes.
1833
1834 [0.12_03] Not released
1835
1836 Renamed -Policy option to -include. Added -exclude to give the
1837 opposite effect.
1838
1839 Refactored constructor of Perl::Critic. Now, most of the work
1840 is delegated to Perl::Critic::Config. I'm not sure I like how
1841 this turned out, but we'll see how it goes.
1842
1843 Renamed some Policy modules to be a bit more comprehensible. Note
1844 that you may need to change your .perlcriticrc file accordingly.
1845 I also suggest removing your current Perl::Critic installation
1846 before installing this one.
1847
1848 Name Changes:
1849 * ProhibitUnpackagedCode => RequireExplicitPackage
1850 * RequireQuotedWords => ProhibitQuotedWordLists
1851
1852 Improved error message when Perl::Critic dies because PPI can't
1853 parsee the input code.
1854
1855 Changed output of -help to be more terse.
1856
1857 Edited POD.
1858
1859 [0.12_02] Not released
1860
1861 Added -Policy option to perlcritic. The idea is to provide a
1862 compact interface for selecting Policy modules at the command-line.
1863 This feature is experimental and subject to change.
1864
1865 Added a warning message if -verbose value looks strange. In most
1866 applications, the -verbose option does not require a value, so people
1867 might be puzzled when they write 'perlcritic -verbose my_file.pm' and
1868 nothing seems to happen.
1869
1870 Command-line options to perlcritic are now case-sensitive. This
1871 makes it easier to abbreviate options that start with the same letters
1872 (e.g. 'Version' and 'verbose')
1873
1874 Fixed the new Policy modules that were misnamed and misplaced in the
1875 previous distribution.
1876
1877 [0.12_01] Not released
1878
1879 Rewrote some of the ControlStructures and BuiltinFunction
1880 policies to be simpler (and probably a little faster).
1881
1882 Edited POD. Fixed some typos. Added PREREQUISITES section
1883 to Perl::Critic documentation.
1884
1885 Fixed the -verbose FORMAT option so that you can put metachars
1886 in the FORMAT specification. If using perlcritic, be careful to
1887 protect them from getting munged by the shell first.
1888
1889 Replaced ProhibitRequireStatements with RequireBarewordIncludes
1890 module. Courtesy of Chris Dolan <[email protected]>
1891
1892 Added configuration to ProhibitInterpolationOfLiterals so that
1893 certain flavors of quotes can be exempt. This is for folks who
1894 have configured their editor to use special syntax highlighting
1895 for certain kinds of strings (SQL, for example).
1896
1897 perlcritic now accepts multiple file arguments, so now you can
1898 critique your entire distribution in one shot. As a result, the
1899 output-formats have changed slightly.
1900
1901 New Policy modules:
1902 * BuiltinFunctions::ProhibitLvalueSubstr
1903 * BuiltinFunctions::ProhibitSleepViaSelect
1904 * ClassHierarchies::ProhibitOneArgBless
1905 * CodeLayout::RequireTrailingCommas
1906 * CodeLayout::RequireQuotedWordLists
1907 * InputOutput::ProhibitTwoArgOpen
1908 * InputOutput::ProhibitOneArgSelect
1909 * InputOutput::ProhibitBarewordFileHandles
1910 * Miscellanea::RequireRcsKeywords
1911 * Modules::RequireVersionVar
1912 * RegularExpressions::RequireExtendedFormatting
1913 * RegularExpressions::RequireLineBoundaryMatching
1914
1915
1916 Bug fixes:
1917 14923: 'require' is now permitted. See RequireBarewordIncludes.
1918 15022: Fixed false-positives when keywords are used as hash keys.
1919 15023: Fixed spurious Violations by removing magic shebang.
1920 15031: Fixed spelling mistakes (and probably added some new ones).
1921 15233: Postfix 'if' is now allowed with 'die', 'croak', etc.
1922
1923 [0.12] Released 2005-10-10
1924
1925 Redesigned the 'verbose' feature. Now the output format
1926 can be user-defined using a sprintf-like specification.
1927 perlciritc also has a predefined output format that is
1928 compatible with grep mode in editors like vim and emacs.
1929
1930 'return' is now exempt from ProhibitParensWithBuiltins. I may
1931 extend this exemption to all unary functions.
1932
1933 Edited POD. Added a super brief description of each policy
1934 in the main Perl::Critic documentation. Added details about
1935 editor integration.
1936
1937 Additional Prerequisites:
1938 * String::Format
1939
1940 [0.11] Not released
1941
1942 The internal dynamics and API of Perl::Critic have changed
1943 considerably. The result is a 300% increase in performance.
1944 See the POD in Perl::Critic::Policy for details.
1945
1946 New Features:
1947 * Added -verbose option to put more stuff in the output. In the
1948 extreme, you can get the POD from Policy attached to each
1949 and every violation.
1950
1951 Additional Prerequisites:
1952 * IO::String
1953 * Pod::PlainText
1954
1955 [0.10] Released 2005-10-05
1956
1957 Fixed stupid bug in newest Policy modules. They were returning
1958 PPI objects instead of Perl::Critic::Violation objects. Doh!
1959
1960 Fixed test scripts to prevent failures if the user already has a
1961 .perlcriticrc file.
1962
1963 'ProhibitHardTabs' now allows leading tabs by default.
1964
1965 Put the Changes file in reverse-chronological order, so the most
1966 recent stuff is easy to find at the top of the file
1967
1968 [0.09] Released 2005-10-04
1969
1970 Fixed several bugs:
1971 * 14810: Now you are allowed to create your own 'import' function,
1972 since this is frequently done with fancy modules.
1973 * 14817: Parens, brackets, and braces are now excluded from
1974 'ProhibitNoisyQuotes' since they look better in quotes anyway.
1975 * 14787: $1..$9 and '_' are exempt from ProhibitPunctuationVars
1976 * 14899: Object methods with the same name as a built-in can
1977 be called with parens (ProhibitParensWithBuiltins).
1978 * 14901: Normalized the exit status of perlcritic to 0, 1, or 2.
1979 See documentation for explanation.
1980 * 14855: Partially fixed home directory discovery. Still not
1981 completely portable, but at least doesn't create warnings.
1982
1983 New features:
1984 * 14734: Limit for number separators is now configurable
1985
1986 New Policy modules:
1987 * CodeLayout::ProhibitHardTabs
1988 * ControlStructures::ProhibitUnlessBlocks
1989 * ControlStructures::ProhibitUntilBlocks
1990 * ControlStructures::ProhibitCStyleForLoops
1991
1992 Changed the syntax for the magic comments. Adam had the
1993 idea of using a pragma-like notation. I liked it.
1994
1995 [0.08_2] Released 2005-09-27
1996
1997 Fixed problems with Perl::Critic::Config that caused File::Spec
1998 to emit 'uninitialized value' warnings during the build.
1999
2000 Added 1 Policy module contributed by Graham TerMarsch
2001
2002 Switched from File::Spec::Functions to plain File::Spec because
2003 I think its usage is more common.
2004
2005 Removed 'FindBin' from the test files so I can be sure that the
2006 right libraries are getting loaded. This means I'll have to
2007 use the -l option with C<prove>.
2008
2009 Edited more POD.
2010
2011 [0.08_01] Not released
2012
2013 Fixed "ProhibitParensWithBuiltins" to allow parens to be used with
2014 object method calls that have the same name as a builtin functions.
2015
2016 Introduced magical comments that allow developers to configure
2017 Perl::Critic on-the-fly from within their code.
2018
2019 Added META.yml files and POD tests to the build. I did this
2020 mostly just to boost the Kwalitee score on CPANTS.
2021
2022 Switched from "Config::Std" to "Config::Tiny" because it doesn't
2023 require those fancy Damian modules that don't seem to work on
2024 some older versions of Perl.
2025
2026 [0.07] Released on 2005-09-21
2027
2028 Fixed bugs in the ProhibitCascadingIfElse policy.
2029
2030 Added ProhibitExplicitReturnUndef policy
2031
2032 Made ProhibitUnpackagedCode configurable so you can exempt scripts,
2033 which typically don't have an explicit 'package' statement.
2034
2035 ProhibitPackageVars policy now exempts vars in ALL_CAPS. This
2036 is to permit common package variables like @EXPORT and $VERSION.
2037
2038 Renamed "ProhibitStringyGrep and "ProhibitStringyMap" because
2039 the so-called string form doesn't really exist. Now called
2040 "RequireBlockGrep" and "RequireBlockMap"
2041
2042 Corrected documentation on defining Policy names within the
2043 configuration file. This still isn't very clear and needs
2044 to be rewritten.
2045
2046 Perl::Critic now requires PPI version 1.003, which has a few bug
2047 fixes of its own.
2048
2049 Rewrite some code just to make Perl::Critic more self-compliant.
2050
2051 Added test cases to verify the configuration functionality. These
2052 are not completely thorough and need more work.
2053
2054 [0.06] Released on 2005-09-17
2055
2056 Now called 'Perl::Critic'.
2057
2058 Added 4 new policy modules.
2059
2060 Fixed bugs in build process.
2061
2062 Added support for Module::Build.
2063
2064 [0.05] Released on 2005-09-17
2065
2066 End of 'Perl::Review' releases. I have changed the name to
2067 'Perl::Critic' to avoid possible confusion with "The Perl Review"
2068 magazine.
2069
2070 [0.04] Released on 2005-09-14
2071
2072 Version 0.03 was a bust because I uploaded the wrong tarball to PAUSE.
2073
2074 [0.03] Released on 2005-09-13.
2075
2076 Fixed some POD links.
2077
2078 Removed test cases for missing policy module.
2079
2080 [0.02] Released on 2005-09-13.
2081
2082 Major overhaul based on feedback from Perl community.
2083
2084 Factored coding standards into separate modules (known as
2085 Policies). The idea here is to allow other developers to easily
2086 contribute additional coding standards.
2087
2088 Reworked Perl::Review into a simple engine for loading and running
2089 Policy modules.
2090
2091 Gave perlreview a command-line interface and configuration file
2092 for selecting which Policy modules to use.
2093
2094 [0.01] Released on 2005-08-16.
2095
2096 Initial version.
2097
2098 ##############################################################################
2099 # $URL: http://perlcritic.tigris.org/svn/perlcritic/trunk/distributions/Perl-Critic/Changes $
2100 # $Date: 2013-09-25 21:18:04 -0700 (Wed, 25 Sep 2013) $
2101 # $Author: thaljef $
2102 # $Revision: 4169 $
2103 ##############################################################################
2104
2105 # ex: set ts=8 sts=4 sw=4 tw=78 ft= expandtab shiftround :