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