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