1Perl::Critic(3) User Contributed Perl Documentation Perl::Critic(3)
2
3
4
6 Perl::Critic - Critique Perl source code for best-practices
7
9 use Perl::Critic;
10 my $file = shift;
11 my $critic = Perl::Critic->new();
12 my @violations = $critic->critique($file);
13 print @violations;
14
16 Perl::Critic is an extensible framework for creating and applying cod‐
17 ing standards to Perl source code. Essentially, it is a static source
18 code analysis engine. Perl::Critic is distributed with a number of
19 Perl::Critic::Policy modules that attempt to enforce various coding
20 guidelines. Most Policy modules are based on Damian Conway's book Perl
21 Best Practices. However, Perl::Critic is not limited to PBP and will
22 even support Policies that contradict Conway. You can enable, disable,
23 and customize those Polices through the Perl::Critic interface. You
24 can also create new Policy modules that suit your own tastes.
25
26 For a command-line interface to Perl::Critic, see the documentation for
27 perlcritic. If you want to integrate Perl::Critic with your build
28 process, Test::Perl::Critic provides an interface that is suitable for
29 test scripts. For the ultimate convenience (at the expense of some
30 flexibility) see the criticism pragma.
31
32 Win32 and ActivePerl users can find PPM distributions of Perl::Critic
33 at <http://theoryx5.uwinnipeg.ca/ppms/>.
34
35 If you'd like to try Perl::Critic without installing anything, there is
36 a web-service available at <http://perlcritic.com>. The web-service
37 does not yet support all the configuration features that are available
38 in the native Perl::Critic API, but it should give you a good idea of
39 what it does. You can also invoke the perlcritic web-service from the
40 command-line by doing an HTTP-post, such as one of these:
41
42 $> POST http://perlcritic.com/perl/critic.pl < MyModule.pm
43 $> lwp-request -m POST http://perlcritic.com/perl/critic.pl < MyModule.pm
44 $> wget -q -O - --post-file=MyModule.pm http://perlcritic.com/perl/critic.pl
45
46 Please note that the perlcritic web-service is still alpha code. The
47 URL and interface to the service are subject to change.
48
50 "new( [ -profile => $FILE, -severity => $N, -theme => $string, -include
51 => \@PATTERNS, -exclude => \@PATTERNS, -top => $N, -only => $B, -force
52 => $B, -verbose => $N ] )"
53 "new( -config => Perl::Critic::Config->new() )"
54 "new()" Returns a reference to a new Perl::Critic object. Most argu‐
55 ments are just passed directly into Perl::Critic::Config, but I
56 have described them here as well. The default value for all
57 arguments can be defined in your .perlcriticrc file. See the
58 "CONFIGURATION" section for more information about that. All
59 arguments are optional key-value pairs as follows:
60
61 -profile is a path to a configuration file. If $FILE is not
62 defined, Perl::Critic::Config attempts to find a .perlcriticrc
63 configuration file in the current directory, and then in your
64 home directory. Alternatively, you can set the "PERLCRITIC"
65 environment variable to point to a file in another location.
66 If a configuration file can't be found, or if $FILE is an empty
67 string, then all Policies will be loaded with their default
68 configuration. See "CONFIGURATION" for more information.
69
70 -severity is the minimum severity level. Only Policy modules
71 that have a severity greater than $N will be applied. Severity
72 values are integers ranging from 1 (least severe) to 5 (most
73 severe). The default is 5. For a given "-profile", decreasing
74 the "-severity" will usually reveal more Policy violations.
75 You can set the default value for this option in your .perl‐
76 criticrc file. Users can redefine the severity level for any
77 Policy in their .perlcriticrc file. See "CONFIGURATION" for
78 more information.
79
80 If it is difficult for you to remember whether severity "5" is
81 the most or least restrictive level, then you can use one of
82 these named values:
83
84 SEVERITY NAME ...is equivalent to... SEVERITY NUMBER
85 --------------------------------------------------------
86 -severity => 'gentle' -severity => 5
87 -severity => 'stern' -severity => 4
88 -severity => 'harsh' -severity => 3
89 -severity => 'cruel' -severity => 2
90 -severity => 'brutal' -severity => 1
91
92 -theme is special expression that determines which Policies to
93 apply based on their respective themes. For example, the fol‐
94 lowing would load only Policies that have a 'bugs' AND 'pbp'
95 theme:
96
97 my $critic = Perl::Critic->new( -theme => 'bugs && pbp' );
98
99 Unless the "-severity" option is explicitly given, setting
100 "-theme" silently causes the "-severity" to be set to 1. You
101 can set the default value for this option in your .perlcriticrc
102 file. See the "POLICY THEMES" section for more information
103 about themes.
104
105 -include is a reference to a list of string @PATTERNS. Policy
106 modules that match at least one "m/$PATTERN/imx" will always be
107 loaded, irrespective of all other settings. For example:
108
109 my $critic = Perl::Critic->new(-include => ['layout'] -severity => 4);
110
111 This would cause Perl::Critic to apply all the "CodeLayout::*"
112 Policy modules even though they have a severity level that is
113 less than 4. You can set the default value for this option in
114 your .perlcriticrc file. You can also use "-include" in con‐
115 junction with the "-exclude" option. Note that "-exclude"
116 takes precedence over "-include" when a Policy matches both
117 patterns.
118
119 -exclude is a reference to a list of string @PATTERNS. Policy
120 modules that match at least one "m/$PATTERN/imx" will not be
121 loaded, irrespective of all other settings. For example:
122
123 my $critic = Perl::Critic->new(-exclude => ['strict'] -severity => 1);
124
125 This would cause Perl::Critic to not apply the "RequireUseS‐
126 trict" and "ProhibitNoStrict" Policy modules even though they
127 have a severity level that is greater than 1. You can set the
128 default value for this option in your .perlcriticrc file. You
129 can also use "-exclude" in conjunction with the "-include"
130 option. Note that "-exclude" takes precedence over "-include"
131 when a Policy matches both patterns.
132
133 -singlepolicy is a string "PATTERN". Only one policy that
134 matches "m/$PATTERN/imx" will be used. Policies that do not
135 match will be excluded. This option has precedence over the
136 "-severity", "-theme", "-include", "-exclude", and "-only"
137 options. You can set the default value for this option in your
138 .perlcriticrc file.
139
140 -top is the maximum number of Violations to return when ranked
141 by their severity levels. This must be a positive integer.
142 Violations are still returned in the order that they occur
143 within the file. Unless the "-severity" option is explicitly
144 given, setting "-top" silently causes the "-severity" to be set
145 to 1. You can set the default value for this option in your
146 .perlcriticrc file.
147
148 -only is a boolean value. If set to a true value, Perl::Critic
149 will only choose from Policies that are mentioned in the user's
150 profile. If set to a false value (which is the default), then
151 Perl::Critic chooses from all the Policies that it finds at
152 your site. You can set the default value for this option in
153 your .perlcriticrc file.
154
155 -force is a boolean value that controls whether Perl::Critic
156 observes the magical "## no critic" pseudo-pragmas in your
157 code. If set to a true value, Perl::Critic will analyze all
158 code. If set to a false value (which is the default)
159 Perl::Critic will ignore code that is tagged with these com‐
160 ments. See "BENDING THE RULES" for more information. You can
161 set the default value for this option in your .perlcriticrc
162 file.
163
164 -verbose can be a positive integer (from 1 to 11), or a literal
165 format specification. See Perl::Critic::Violations for an
166 explanation of format specifications. You can set the default
167 value for this option in your .perlcriticrc file.
168
169 -config is a reference to a Perl::Critic::Config object. If
170 you have created your own Config object for some reason, you
171 can pass it in here instead of having Perl::Critic create one
172 for you. Using the "-config" option causes all the other
173 options to be silently ignored.
174
176 "critique( $source_code )"
177 Runs the $source_code through the Perl::Critic engine using all
178 the Policies that have been loaded into this engine. If
179 $source_code is a scalar reference, then it is treated as a
180 string of actual Perl code. If $source_code is a reference to
181 an instance of PPI::Document, then that instance is used
182 directly. Otherwise, it is treated as a path to a local file
183 containing Perl code. This method returns a list of
184 Perl::Critic::Violation objects for each violation of the
185 loaded Policies. The list is sorted in the order that the Vio‐
186 lations appear in the code. If there are no violations, this
187 method returns an empty list.
188
189 "add_policy( -policy => $policy_name, -params => \%param_hash )"
190 Creates a Policy object and loads it into this Critic. If the
191 object cannot be instantiated, it will throw a fatal exception.
192 Otherwise, it returns a reference to this Critic.
193
194 -policy is the name of a Perl::Critic::Policy subclass module.
195 The 'Perl::Critic::Policy' portion of the name can be omitted
196 for brevity. This argument is required.
197
198 -params is an optional reference to a hash of Policy parame‐
199 ters. The contents of this hash reference will be passed into
200 to the constructor of the Policy module. See the documentation
201 in the relevant Policy module for a description of the argu‐
202 ments it supports.
203
204 " policies() "
205 Returns a list containing references to all the Policy objects
206 that have been loaded into this engine. Objects will be in the
207 order that they were loaded.
208
209 " config() "
210 Returns the Perl::Critic::Config object that was created for or
211 given to this Critic.
212
214 For those folks who prefer to have a functional interface, The "cri‐
215 tique" method can be exported on request and called as a static func‐
216 tion. If the first argument is a hashref, its contents are used to
217 construct a new Perl::Critic object internally. The keys of that hash
218 should be the same as those supported by the "Perl::Critic::new"
219 method. Here are some examples:
220
221 use Perl::Critic qw(critique);
222
223 # Use default parameters...
224 @violations = critique( $some_file );
225
226 # Use custom parameters...
227 @violations = critique( {-severity => 2}, $some_file );
228
229 # As a one-liner
230 %> perl -MPerl::Critic=critique -e 'print critique(shift)' some_file.pm
231
232 None of the other object-methods are currently supported as static
233 functions. Sorry.
234
236 Most of the settings for Perl::Critic and each of the Policy modules
237 can be controlled by a configuration file. The default configuration
238 file is called .perlcriticrc. Perl::Critic will look for this file in
239 the current directory first, and then in your home directory. Alterna‐
240 tively, you can set the "PERLCRITIC" environment variable to explicitly
241 point to a different file in another location. If none of these files
242 exist, and the "-profile" option is not given to the constructor, then
243 all the modules that are found in the Perl::Critic::Policy namespace
244 will be loaded with their default configuration.
245
246 The format of the configuration file is a series of INI-style blocks
247 that contain key-value pairs separated by '='. Comments should start
248 with '#' and can be placed on a separate line or after the name-value
249 pairs if you desire.
250
251 Default settings for Perl::Critic itself can be set before the first
252 named block. For example, putting any or all of these at the top of
253 your configuration file will set the default value for the correspond‐
254 ing constructor argument.
255
256 severity = 3 #Integer or named level
257 only = 1 #Zero or One
258 force = 0 #Zero or One
259 verbose = 4 #Integer or format spec
260 top = 50 #A positive integer
261 theme = (pbp ⎪⎪ security) && bugs #A theme expression
262 include = NamingConventions ClassHierarchies #Space-delimited list
263 exclude = Variables Modules::RequirePackage #Space-delimited list
264
265 The remainder of the configuration file is a series of blocks like
266 this:
267
268 [Perl::Critic::Policy::Category::PolicyName]
269 severity = 1
270 set_themes = foo bar
271 add_themes = baz
272 arg1 = value1
273 arg2 = value2
274
275 "Perl::Critic::Policy::Category::PolicyName" is the full name of a mod‐
276 ule that implements the policy. The Policy modules distributed with
277 Perl::Critic have been grouped into categories according to the table
278 of contents in Damian Conway's book Perl Best Practices. For brevity,
279 you can omit the 'Perl::Critic::Policy' part of the module name.
280
281 "severity" is the level of importance you wish to assign to the Policy.
282 All Policy modules are defined with a default severity value ranging
283 from 1 (least severe) to 5 (most severe). However, you may disagree
284 with the default severity and choose to give it a higher or lower
285 severity, based on your own coding philosophy. You can set the "sever‐
286 ity" to an integer from 1 to 5, or use one of the equivalent names:
287
288 SEVERITY NAME ...is equivalent to... SEVERITY NUMBER
289 ----------------------------------------------------
290 gentle 5
291 stern 4
292 harsh 3
293 cruel 2
294 brutal 1
295
296 "set_themes" sets the theme for the Policy and overrides its default
297 theme. The argument is a string of one or more whitespace-delimited
298 alphanumeric words. Themes are case-insensitive. See "POLICY THEMES"
299 for more information.
300
301 "add_themes" appends to the default themes for this Policy. The argu‐
302 ment is a string of one or more whitespace-delimited words. Themes are
303 case-insensitive. See "POLICY THEMES" for more information.
304
305 The remaining key-value pairs are configuration parameters that will be
306 passed into the constructor for that Policy. The constructors for most
307 Policy objects do not support arguments, and those that do should have
308 reasonable defaults. See the documentation on the appropriate Policy
309 module for more details.
310
311 Instead of redefining the severity for a given Policy, you can com‐
312 pletely disable a Policy by prepending a '-' to the name of the module
313 in your configuration file. In this manner, the Policy will never be
314 loaded, regardless of the "-severity" given to the Perl::Critic con‐
315 structor.
316
317 A simple configuration might look like this:
318
319 #--------------------------------------------------------------
320 # I think these are really important, so always load them
321
322 [TestingAndDebugging::RequireUseStrict]
323 severity = 5
324
325 [TestingAndDebugging::RequireUseWarnings]
326 severity = 5
327
328 #--------------------------------------------------------------
329 # I think these are less important, so only load when asked
330
331 [Variables::ProhibitPackageVars]
332 severity = 2
333
334 [ControlStructures::ProhibitPostfixControls]
335 allow = if unless # My custom configuration
336 severity = cruel # Same as "severity = 2"
337
338 #--------------------------------------------------------------
339 # Give these policies a custom theme. I can activate just
340 # these policies by saying `perlcritic -theme larry`
341
342 [Modules::RequireFilenameMatchesPackage]
343 add_themes = larry
344
345 [TestingAndDebugging::RequireTestLables]
346 add_themes = larry curly moe
347
348 #--------------------------------------------------------------
349 # I do not agree with these at all, so never load them
350
351 [-NamingConventions::ProhibitMixedCaseVars]
352 [-NamingConventions::ProhibitMixedCaseSubs]
353
354 #--------------------------------------------------------------
355 # For all other Policies, I accept the default severity,
356 # so no additional configuration is required for them.
357
358 For additional configuration examples, see the perlcriticrc file that
359 is included in this examples directory of this distribution.
360
361 Damian Conway's own Perl::Critic configuration is also included in this
362 distribution as examples/perlcriticrc-conway.
363
365 A large number of Policy modules are distributed with Perl::Critic.
366 They are described briefly in the companion document Perl::Critic::Pol‐
367 icySummary and in more detail in the individual modules themselves.
368 Say ""perlcritic -doc PATTERN"" to see the perldoc for all Policy mod‐
369 ules that match the regex "m/PATTERN/imx"
370
372 Each Policy is defined with one or more "themes". Themes can be used
373 to create arbitrary groups of Policies. They are intended to provide
374 an alternative mechanism for selecting your preferred set of Policies.
375 For example, you may wish disable a certain subset of Policies when
376 analyzing test scripts. Conversely, you may wish to enable only a spe‐
377 cific subset of Policies when analyzing modules.
378
379 The Policies that ship with Perl::Critic are have been broken into the
380 following themes. This is just our attempt to provide some basic logi‐
381 cal groupings. You are free to invent new themes that suit your needs.
382
383 THEME DESCRIPTION
384 --------------------------------------------------------------------------
385 core All policies that ship with Perl::Critic
386 pbp Policies that come directly from "Perl Best Practices"
387 bugs Policies that that prevent or reveal bugs
388 maintenance Policies that affect the long-term health of the code
389 cosmetic Policies that only have a superficial effect
390 complexity Policies that specificaly relate to code complexity
391 security Policies that relate to security issues
392 tests Policies that are specific to test scripts
393
394 Any Policy may fit into multiple themes. Say "perlcritic -list" to get
395 a listing of all available Policies and the themes that are associated
396 with each one. You can also change the theme for any Policy in your
397 .perlcriticrc file. See the "CONFIGURATION" section for more informa‐
398 tion about that.
399
400 Using the "-theme" option, you can create an arbitrarily complex rule
401 that determines which Policies will be loaded. Precedence is the same
402 as regular Perl code, and you can use parens to enforce precedence as
403 well. Supported operators are:
404
405 Operator Altertative Example
406 ----------------------------------------------------------------------------
407 && and 'pbp && core'
408 ⎪⎪ or 'pbp ⎪⎪ (bugs && security)'
409 ! not 'pbp && ! (portability ⎪⎪ complexity)'
410
411 Theme names are case-insensitive. If the "-theme" is set to an empty
412 string, then it evaluates as true all Policies.
413
415 Perl::Critic takes a hard-line approach to your code: either you comply
416 or you don't. In the real world, it is not always practical (nor even
417 possible) to fully comply with coding standards. In such cases, it is
418 wise to show that you are knowingly violating the standards and that
419 you have a Damn Good Reason (DGR) for doing so.
420
421 To help with those situations, you can direct Perl::Critic to ignore
422 certain lines or blocks of code by using pseudo-pragmas:
423
424 require 'LegacyLibaray1.pl'; ## no critic
425 require 'LegacyLibrary2.pl'; ## no critic
426
427 for my $element (@list) {
428
429 ## no critic
430
431 $foo = ""; #Violates 'ProhibitEmptyQuotes'
432 $barf = bar() if $foo; #Violates 'ProhibitPostfixControls'
433 #Some more evil code...
434
435 ## use critic
436
437 #Some good code...
438 do_something($_);
439 }
440
441 The "## no critic" comments direct Perl::Critic to ignore the remaining
442 lines of code until the end of the current block, or until a ""## use
443 critic"" comment is found (whichever comes first). If the "## no
444 critic" comment is on the same line as a code statement, then only that
445 line of code is overlooked. To direct perlcritic to ignore the "## no
446 critic" comments, use the "-force" option.
447
448 A bare "## no critic" comment disables all the active Policies. If you
449 wish to disable only specific Policies, add a list of Policy names as
450 arguments, just as you would for the "no strict" or "no warnings" prag‐
451 mas. For example, this would disable the "ProhibitEmptyQuotes" and
452 "ProhibitPostfixControls" policies until the end of the block or until
453 the next "## use critic" comment (whichever comes first):
454
455 ## no critic (EmptyQuotes, PostfixControls)
456
457 # Now exempt from ValuesAndExpressions::ProhibitEmptyQuotes
458 $foo = "";
459
460 # Now exempt ControlStructures::ProhibitPostfixControls
461 $barf = bar() if $foo;
462
463 # Still subjected to ValuesAndExpression::RequireNumberSeparators
464 $long_int = 10000000000;
465
466 Since the Policy names are matched against the "## no critic" arguments
467 as regular expressions, you can abbreviate the Policy names or disable
468 an entire family of Policies in one shot like this:
469
470 ## no critic (NamingConventions)
471
472 # Now exempt from NamingConventions::ProhibitMixedCaseVars
473 my $camelHumpVar = 'foo';
474
475 # Now exempt from NamingConventions::ProhibitMixedCaseSubs
476 sub camelHumpSub {}
477
478 The argument list must be enclosed in parens and must contain one or
479 more comma-separated barewords (e.g. don't use quotes). The "## no
480 critic" pragmas can be nested, and Policies named by an inner pragma
481 will be disabled along with those already disabled an outer pragma.
482
483 Some Policies like "Subroutines::ProhibitExcessComplexity" apply to an
484 entire block of code. In those cases, "## no critic" must appear on
485 the line where the violation is reported. For example:
486
487 sub complicated_function { ## no critic (ProhibitExcessComplexity)
488 # Your code here...
489 }
490
491 Policies such as "Documentation::RequirePodSections" apply to the
492 entire document, in which case violations are reported at line 1. But
493 if the file requires a shebang line, it is impossible to put "## no
494 critic" on the first line of the file. This is a known limitation and
495 it will be addressed in a future release. As a workaround, you can
496 disable the affected policies at the command-line or in your .perl‐
497 criticrc file. But beware that this will affect the analysis of all
498 files.
499
500 Use this feature wisely. "## no critic" should be used in the smallest
501 possible scope, or only on individual lines of code. And you should
502 always be as specific as possible about which policies you want to dis‐
503 able (i.e. never use a bare "## no critic"). If Perl::Critic complains
504 about your code, try and find a compliant solution before resorting to
505 this feature.
506
508 Perl-Critic is evolving rapidly, so some of the interfaces have changed
509 in ways that are not backward-compatible. If you have been using an
510 older version of Perl-Critic and/or you have been developing custom
511 Policy modules, please read this section carefully.
512
513 VERSION 0.23
514
515 In version 0.23, the syntax for theme rules changed. The mathematical
516 operators ( "*", "+", "-" ) are no longer supported. You must use log‐
517 ical operators instead ( "&&", "!", "⎪⎪" ). However the meanings of
518 these operators is effectively the same. See "POLICY THEMES" for more
519 details.
520
521 VERSION 0.21
522
523 In version 0.21, we introduced the concept of policy "themes". All you
524 existing custom Policies should still be compatible. But to take
525 advantage of the theme feature, you should add a "default_themes"
526 method to your custom Policy modules. See Perl::Critic::DEVELOPER for
527 an up-to-date guide on creating Policy modules.
528
529 The internals of Perl::Critic were also refactored significantly. The
530 public API is largely unchanged, but if you've been accessing bits
531 inside Perl::Critic, then you may be in for a surprise.
532
533 VERSION 0.16
534
535 Starting in version 0.16, you can add a list Policy names as arguments
536 to the "## no critic" pseudo-pragma. This feature allows you to dis‐
537 able specific policies. So if you have been in the habit of adding
538 additional words after "no critic", then those words might cause unex‐
539 pected results. If you want to append other stuff to the "## no
540 critic" comment, then terminate the pseudo-pragma with a semi-colon,
541 and then start another comment. For example:
542
543 #This may not work as expected.
544 $email = 'foo@bar.com'; ## no critic for literal '@'
545
546 #This will work.
547 $email = 'foo@bar.com'; ## no critic; #for literal '@'
548
549 #This is even better.
550 $email = 'foo@bar.com'; ## no critic (RequireInterpolation);
551
552 VERSION 0.14
553
554 Starting in version 0.14, the interface to Perl::Critic::Violation
555 changed. This will also break any custom Policy modules that you might
556 have written for earlier modules. See Perl::Critic::DEVELOPER for an
557 up-to-date guide on creating Policy modules.
558
559 The notion of "priority" was also replaced with "severity" in version
560 0.14. Consequently, the default behavior of Perl::Critic is to only
561 load the most "severe" Policy modules, rather than loading all of them.
562 This decision was based on user-feedback suggesting that Perl-Critic
563 should be less critical for new users, and should steer them toward
564 gradually increasing the strictness as they progressively adopt better
565 coding practices.
566
567 VERSION 0.11
568
569 Starting in version 0.11, the internal mechanics of Perl-Critic were
570 rewritten so that only one traversal of the PPI document tree is
571 required. Unfortunately, this will break any custom Policy modules
572 that you might have written for earlier versions. Converting your
573 policies to work with the new version is pretty easy and actually
574 results in cleaner code. See Perl::Critic::DEVELOPER for an up-to-date
575 guide on creating Policy modules.
576
578 Coding standards are deeply personal and highly subjective. The
579 goal of Perl::Critic is to help you write code that conforms with a
580 set of best practices. Our primary goal is not to dictate what
581 those practices are, but rather, to implement the practices
582 discovered by others. Ultimately, you make the rules --
583 Perl::Critic is merely a tool for encouraging consistency. If there
584 is a policy that you think is important or that we have overlooked,
585 we would be very grateful for contributions, or you can simply load
586 your own private set of policies into Perl::Critic.
587
589 The modular design of Perl::Critic is intended to facilitate the addi‐
590 tion of new Policies. You'll need to have some understanding of PPI,
591 but most Policy modules are pretty straightforward and only require
592 about 20 lines of code. Please see the Perl::Critic::DEVELOPER file
593 included in this distribution for a step-by-step demonstration of how
594 to create new Policy modules.
595
596 If you develop any new Policy modules, feel free to send them to
597 "<thaljef@cpan.org>" and I'll be happy to put them into the
598 Perl::Critic distribution. Or if you would like to work on the
599 Perl::Critic project directly, check out our repository at
600 <http://perlcritic.tigris.org>. To subscribe to our mailing list, send
601 a message to "<dev-subscribe@perlcritic.tigris.org>".
602
603 The Perl::Critic team is also available for hire. If your organization
604 has its own coding standards, we can create custom Policies to enforce
605 your local guidelines. Or if your code base is prone to a particular
606 defect pattern, we can design Policies that will help you catch those
607 costly defects before they go into production. To discuss your needs
608 with the Perl::Critic team, just contact "<thaljef@cpan.org>".
609
611 Perl::Critic requires the following modules:
612
613 B::Keywords
614
615 Config::Tiny
616
617 File::Spec
618
619 IO::String
620
621 List::Util
622
623 List::MoreUtils
624
625 Module::Pluggable
626
627 PPI
628
629 Pod::Usage
630
631 Pod::PlainText
632
633 String::Format
634
635 The following modules are optional, but recommended for complete test‐
636 ing:
637
638 Test::Pod
639
640 Test::Pod::Coverage
641
643 Scrutinizing Perl code is hard for humans, let alone machines. If you
644 find any bugs, particularly false-positives or false-negatives from a
645 Perl::Critic::Policy, please submit them to
646 <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Perl-Critic>. Thanks.
647
649 Adam Kennedy - For creating PPI, the heart and soul of Perl::Critic.
650
651 Damian Conway - For writing Perl Best Practices, finally :)
652
653 Chris Dolan - For contributing the best features and Policy modules.
654
655 Andy Lester - Wise sage and master of all-things-testing.
656
657 Elliot Shank - The self-proclaimed quality freak.
658
659 Giuseppe Maxia - For all the great ideas and positive encouragement.
660
661 and Sharon, my wife - For putting up with my all-night code sessions.
662
664 Jeffrey Ryan Thalhammer <thaljef@cpan.org>
665
667 Copyright (c) 2005-2007 Jeffrey Ryan Thalhammer. All rights reserved.
668
669 This program is free software; you can redistribute it and/or modify it
670 under the same terms as Perl itself. The full text of this license can
671 be found in the LICENSE file included with this module.
672
673
674
675perl v5.8.8 2007-03-20 Perl::Critic(3)