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
17 coding standards to Perl source code. Essentially, it is a static
18 source code analysis engine. Perl::Critic is distributed with a number
19 of 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. Also, Test::Perl::Critic::Progressive is useful for
30 gradually applying coding standards to legacy code. For the ultimate
31 convenience (at the expense of some flexibility) see the criticism
32 pragma.
33
34 Win32 and ActivePerl users can find PPM distributions of Perl::Critic
35 at <http://theoryx5.uwinnipeg.ca/ppms/>.
36
37 If you'd like to try Perl::Critic without installing anything, there is
38 a web-service available at <http://perlcritic.com>. The web-service
39 does not yet support all the configuration features that are available
40 in the native Perl::Critic API, but it should give you a good idea of
41 what it does. You can also invoke the perlcritic web-service from the
42 command-line by doing an HTTP-post, such as one of these:
43
44 $> POST http://perlcritic.com/perl/critic.pl < MyModule.pm
45 $> lwp-request -m POST http://perlcritic.com/perl/critic.pl < MyModule.pm
46 $> wget -q -O - --post-file=MyModule.pm http://perlcritic.com/perl/critic.pl
47
48 Please note that the perlcritic web-service is still alpha code. The
49 URL and interface to the service are subject to change.
50
51 Also, the Perl Development Kit (PDK 8.0) from ActiveState includes a
52 very slick graphical interface to Perl-Critic. For details, go to
53 <http://www.activestate.com/perl_dev_kit>
54
56 This is considered to be a public class. Any changes to its interface
57 will go through a deprecation cycle.
58
60 "new( [ -profile => $FILE, -severity => $N, -theme => $string, -include
61 => \@PATTERNS, -exclude => \@PATTERNS, -top => $N, -only => $B,
62 -profile-strictness => $PROFILE_STRICTNESS_{WARN|FATAL|QUIET}, -force
63 => $B, -verbose => $N ], -color => $B, -pager => $string,
64 -criticism-fatal => $B)"
65 "new()"
66 Returns a reference to a new Perl::Critic object. Most arguments
67 are just passed directly into Perl::Critic::Config, but I have
68 described them here as well. The default value for all arguments
69 can be defined in your .perlcriticrc file. See the "CONFIGURATION"
70 section for more information about that. All arguments are
71 optional key-value pairs as follows:
72
73 -profile is a path to a configuration file. If $FILE is not
74 defined, Perl::Critic::Config attempts to find a .perlcriticrc
75 configuration file in the current directory, and then in your home
76 directory. Alternatively, you can set the "PERLCRITIC" environment
77 variable to point to a file in another location. If a
78 configuration file can't be found, or if $FILE is an empty string,
79 then all Policies will be loaded with their default configuration.
80 See "CONFIGURATION" for more information.
81
82 -severity is the minimum severity level. Only Policy modules that
83 have a severity greater than $N will be applied. Severity values
84 are integers ranging from 1 (least severe violations) to 5 (most
85 severe violations). The default is 5. For a given "-profile",
86 decreasing the "-severity" will usually reveal more Policy
87 violations. You can set the default value for this option in your
88 .perlcriticrc file. Users can redefine the severity level for any
89 Policy in their .perlcriticrc file. See "CONFIGURATION" for more
90 information.
91
92 If it is difficult for you to remember whether severity "5" is the
93 most or least restrictive level, then you can use one of these
94 named values:
95
96 SEVERITY NAME ...is equivalent to... SEVERITY NUMBER
97 --------------------------------------------------------
98 -severity => 'gentle' -severity => 5
99 -severity => 'stern' -severity => 4
100 -severity => 'harsh' -severity => 3
101 -severity => 'cruel' -severity => 2
102 -severity => 'brutal' -severity => 1
103
104 -theme is special expression that determines which Policies to
105 apply based on their respective themes. For example, the following
106 would load only Policies that have a 'bugs' AND 'pbp' theme:
107
108 my $critic = Perl::Critic->new( -theme => 'bugs && pbp' );
109
110 Unless the "-severity" option is explicitly given, setting "-theme"
111 silently causes the "-severity" to be set to 1. You can set the
112 default value for this option in your .perlcriticrc file. See the
113 "POLICY THEMES" section for more information about themes.
114
115 -include is a reference to a list of string @PATTERNS. Policy
116 modules that match at least one "m/$PATTERN/ixms" will always be
117 loaded, irrespective of all other settings. For example:
118
119 my $critic = Perl::Critic->new(-include => ['layout'] -severity => 4);
120
121 This would cause Perl::Critic to apply all the "CodeLayout::*"
122 Policy modules even though they have a severity level that is less
123 than 4. You can set the default value for this option in your
124 .perlcriticrc file. You can also use "-include" in conjunction
125 with the "-exclude" option. Note that "-exclude" takes precedence
126 over "-include" when a Policy matches both patterns.
127
128 -exclude is a reference to a list of string @PATTERNS. Policy
129 modules that match at least one "m/$PATTERN/ixms" will not be
130 loaded, irrespective of all other settings. For example:
131
132 my $critic = Perl::Critic->new(-exclude => ['strict'] -severity => 1);
133
134 This would cause Perl::Critic to not apply the "RequireUseStrict"
135 and "ProhibitNoStrict" Policy modules even though they have a
136 severity level that is greater than 1. You can set the default
137 value for this option in your .perlcriticrc file. You can also use
138 "-exclude" in conjunction with the "-include" option. Note that
139 "-exclude" takes precedence over "-include" when a Policy matches
140 both patterns.
141
142 -single-policy is a string "PATTERN". Only one policy that matches
143 "m/$PATTERN/ixms" will be used. Policies that do not match will be
144 excluded. This option has precedence over the "-severity",
145 "-theme", "-include", "-exclude", and "-only" options. You can set
146 the default value for this option in your .perlcriticrc file.
147
148 -top is the maximum number of Violations to return when ranked by
149 their severity levels. This must be a positive integer.
150 Violations are still returned in the order that they occur within
151 the file. Unless the "-severity" option is explicitly given,
152 setting "-top" silently causes the "-severity" to be set to 1. You
153 can set the default value for this option in your .perlcriticrc
154 file.
155
156 -only is a boolean value. If set to a true value, Perl::Critic
157 will only choose from Policies that are mentioned in the user's
158 profile. If set to a false value (which is the default), then
159 Perl::Critic chooses from all the Policies that it finds at your
160 site. You can set the default value for this option in your
161 .perlcriticrc file.
162
163 -profile-strictness is an enumerated value, one of
164 "$PROFILE_STRICTNESS_WARN" in Perl::Critic::Utils::Constants (the
165 default), "$PROFILE_STRICTNESS_FATAL" in
166 Perl::Critic::Utils::Constants, and "$PROFILE_STRICTNESS_QUIET" in
167 Perl::Critic::Utils::Constants. If set to
168 "$PROFILE_STRICTNESS_FATAL" in Perl::Critic::Utils::Constants,
169 Perl::Critic will make certain warnings about problems found in a
170 .perlcriticrc or file specified via the -profile option fatal. For
171 example, Perl::Critic normally only "warn"s about profiles
172 referring to non-existent Policies, but this value makes this
173 situation fatal. Correspondingly, "$PROFILE_STRICTNESS_QUIET" in
174 Perl::Critic::Utils::Constants makes Perl::Critic shut up about
175 these things.
176
177 -force is a boolean value that controls whether Perl::Critic
178 observes the magical "## no critic" annotations in your code. If
179 set to a true value, Perl::Critic will analyze all code. If set to
180 a false value (which is the default) Perl::Critic will ignore code
181 that is tagged with these annotations. See "BENDING THE RULES" for
182 more information. You can set the default value for this option in
183 your .perlcriticrc file.
184
185 -verbose can be a positive integer (from 1 to 11), or a literal
186 format specification. See Perl::Critic::Violation for an
187 explanation of format specifications. You can set the default
188 value for this option in your .perlcriticrc file.
189
190 -color and -pager are not used by Perl::Critic but is provided for
191 the benefit of perlcritic.
192
193 -criticism-fatal is not used by Perl::Critic but is provided for
194 the benefit of criticism.
195
196 -color-severity-highest, -color-severity-high,
197 -color-severity-medium, -color-severity-low, and
198 -color-severity-lowest are not used by Perl::Critic, but are
199 provided for the benefit of perlcritic. Each is set to the
200 Term::ANSIColor color specification to be used to display
201 violations of the corresponding severity.
202
203 -files-with-violations and -files-without-violations are not used
204 by Perl::Critic, but are provided for the benefit of perlcritic, to
205 cause only the relevant filenames to be displayed.
206
208 "critique( $source_code )"
209 Runs the $source_code through the Perl::Critic engine using all the
210 Policies that have been loaded into this engine. If $source_code
211 is a scalar reference, then it is treated as a string of actual
212 Perl code. If $source_code is a reference to an instance of
213 PPI::Document, then that instance is used directly. Otherwise, it
214 is treated as a path to a local file containing Perl code. This
215 method returns a list of Perl::Critic::Violation objects for each
216 violation of the loaded Policies. The list is sorted in the order
217 that the Violations appear in the code. If there are no
218 violations, this method returns an empty list.
219
220 "add_policy( -policy => $policy_name, -params => \%param_hash )"
221 Creates a Policy object and loads it into this Critic. If the
222 object cannot be instantiated, it will throw a fatal exception.
223 Otherwise, it returns a reference to this Critic.
224
225 -policy is the name of a Perl::Critic::Policy subclass module. The
226 'Perl::Critic::Policy' portion of the name can be omitted for
227 brevity. This argument is required.
228
229 -params is an optional reference to a hash of Policy parameters.
230 The contents of this hash reference will be passed into to the
231 constructor of the Policy module. See the documentation in the
232 relevant Policy module for a description of the arguments it
233 supports.
234
235 " policies() "
236 Returns a list containing references to all the Policy objects that
237 have been loaded into this engine. Objects will be in the order
238 that they were loaded.
239
240 " config() "
241 Returns the Perl::Critic::Config object that was created for or
242 given to this Critic.
243
244 " statistics() "
245 Returns the Perl::Critic::Statistics object that was created for
246 this Critic. The Statistics object accumulates data for all files
247 that are analyzed by this Critic.
248
250 For those folks who prefer to have a functional interface, The
251 "critique" method can be exported on request and called as a static
252 function. If the first argument is a hashref, its contents are used to
253 construct a new Perl::Critic object internally. The keys of that hash
254 should be the same as those supported by the "Perl::Critic::new"
255 method. Here are some examples:
256
257 use Perl::Critic qw(critique);
258
259 # Use default parameters...
260 @violations = critique( $some_file );
261
262 # Use custom parameters...
263 @violations = critique( {-severity => 2}, $some_file );
264
265 # As a one-liner
266 %> perl -MPerl::Critic=critique -e 'print critique(shift)' some_file.pm
267
268 None of the other object-methods are currently supported as static
269 functions. Sorry.
270
272 Most of the settings for Perl::Critic and each of the Policy modules
273 can be controlled by a configuration file. The default configuration
274 file is called .perlcriticrc. Perl::Critic will look for this file in
275 the current directory first, and then in your home directory.
276 Alternatively, you can set the "PERLCRITIC" environment variable to
277 explicitly point to a different file in another location. If none of
278 these files exist, and the "-profile" option is not given to the
279 constructor, then all the modules that are found in the
280 Perl::Critic::Policy namespace will be loaded with their default
281 configuration.
282
283 The format of the configuration file is a series of INI-style blocks
284 that contain key-value pairs separated by '='. Comments should start
285 with '#' and can be placed on a separate line or after the name-value
286 pairs if you desire.
287
288 Default settings for Perl::Critic itself can be set before the first
289 named block. For example, putting any or all of these at the top of
290 your configuration file will set the default value for the
291 corresponding constructor argument.
292
293 severity = 3 #Integer or named level
294 only = 1 #Zero or One
295 force = 0 #Zero or One
296 verbose = 4 #Integer or format spec
297 top = 50 #A positive integer
298 theme = (pbp || security) && bugs #A theme expression
299 include = NamingConventions ClassHierarchies #Space-delimited list
300 exclude = Variables Modules::RequirePackage #Space-delimited list
301 criticism-fatal = 1 #Zero or One
302 color = 1 #Zero or One
303 pager = less #pager to pipe output to
304
305 The remainder of the configuration file is a series of blocks like
306 this:
307
308 [Perl::Critic::Policy::Category::PolicyName]
309 severity = 1
310 set_themes = foo bar
311 add_themes = baz
312 maximum_violations_per_document = 57
313 arg1 = value1
314 arg2 = value2
315
316 "Perl::Critic::Policy::Category::PolicyName" is the full name of a
317 module that implements the policy. The Policy modules distributed with
318 Perl::Critic have been grouped into categories according to the table
319 of contents in Damian Conway's book Perl Best Practices. For brevity,
320 you can omit the 'Perl::Critic::Policy' part of the module name.
321
322 "severity" is the level of importance you wish to assign to the Policy.
323 All Policy modules are defined with a default severity value ranging
324 from 1 (least severe) to 5 (most severe). However, you may disagree
325 with the default severity and choose to give it a higher or lower
326 severity, based on your own coding philosophy. You can set the
327 "severity" to an integer from 1 to 5, or use one of the equivalent
328 names:
329
330 SEVERITY NAME ...is equivalent to... SEVERITY NUMBER
331 ----------------------------------------------------
332 gentle 5
333 stern 4
334 harsh 3
335 cruel 2
336 brutal 1
337
338 "set_themes" sets the theme for the Policy and overrides its default
339 theme. The argument is a string of one or more whitespace-delimited
340 alphanumeric words. Themes are case-insensitive. See "POLICY THEMES"
341 for more information.
342
343 "add_themes" appends to the default themes for this Policy. The
344 argument is a string of one or more whitespace-delimited words. Themes
345 are case-insensitive. See "POLICY THEMES" for more information.
346
347 "maximum_violations_per_document" limits the number of Violations the
348 Policy will return for a given document. Some Policies have a default
349 limit; see the documentation for the individual Policies to see whether
350 there is one. To force a Policy to not have a limit, specify
351 "no_limit" or the empty string for the value of this parameter.
352
353 The remaining key-value pairs are configuration parameters that will be
354 passed into the constructor for that Policy. The constructors for most
355 Policy objects do not support arguments, and those that do should have
356 reasonable defaults. See the documentation on the appropriate Policy
357 module for more details.
358
359 Instead of redefining the severity for a given Policy, you can
360 completely disable a Policy by prepending a '-' to the name of the
361 module in your configuration file. In this manner, the Policy will
362 never be loaded, regardless of the "-severity" given to the
363 Perl::Critic constructor.
364
365 A simple configuration might look like this:
366
367 #--------------------------------------------------------------
368 # I think these are really important, so always load them
369
370 [TestingAndDebugging::RequireUseStrict]
371 severity = 5
372
373 [TestingAndDebugging::RequireUseWarnings]
374 severity = 5
375
376 #--------------------------------------------------------------
377 # I think these are less important, so only load when asked
378
379 [Variables::ProhibitPackageVars]
380 severity = 2
381
382 [ControlStructures::ProhibitPostfixControls]
383 allow = if unless # My custom configuration
384 severity = cruel # Same as "severity = 2"
385
386 #--------------------------------------------------------------
387 # Give these policies a custom theme. I can activate just
388 # these policies by saying `perlcritic -theme larry`
389
390 [Modules::RequireFilenameMatchesPackage]
391 add_themes = larry
392
393 [TestingAndDebugging::RequireTestLables]
394 add_themes = larry curly moe
395
396 #--------------------------------------------------------------
397 # I do not agree with these at all, so never load them
398
399 [-NamingConventions::Capitalization]
400 [-ValuesAndExpressions::ProhibitMagicNumbers]
401
402 #--------------------------------------------------------------
403 # For all other Policies, I accept the default severity,
404 # so no additional configuration is required for them.
405
406 For additional configuration examples, see the perlcriticrc file that
407 is included in this examples directory of this distribution.
408
409 Damian Conway's own Perl::Critic configuration is also included in this
410 distribution as examples/perlcriticrc-conway.
411
413 A large number of Policy modules are distributed with Perl::Critic.
414 They are described briefly in the companion document
415 Perl::Critic::PolicySummary and in more detail in the individual
416 modules themselves. Say "perlcritic -doc PATTERN" to see the perldoc
417 for all Policy modules that match the regex "m/PATTERN/ixms"
418
419 There are a number of distributions of additional policies on CPAN. If
420 Perl::Critic doesn't contain a policy that you want, some one may have
421 already written it. See the "SEE ALSO" section below for a list of
422 some of these distributions.
423
425 Each Policy is defined with one or more "themes". Themes can be used
426 to create arbitrary groups of Policies. They are intended to provide
427 an alternative mechanism for selecting your preferred set of Policies.
428 For example, you may wish disable a certain subset of Policies when
429 analyzing test scripts. Conversely, you may wish to enable only a
430 specific subset of Policies when analyzing modules.
431
432 The Policies that ship with Perl::Critic have been broken into the
433 following themes. This is just our attempt to provide some basic
434 logical groupings. You are free to invent new themes that suit your
435 needs.
436
437 THEME DESCRIPTION
438 --------------------------------------------------------------------------
439 core All policies that ship with Perl::Critic
440 pbp Policies that come directly from "Perl Best Practices"
441 bugs Policies that that prevent or reveal bugs
442 maintenance Policies that affect the long-term health of the code
443 cosmetic Policies that only have a superficial effect
444 complexity Policies that specificaly relate to code complexity
445 security Policies that relate to security issues
446 tests Policies that are specific to test scripts
447
448 Any Policy may fit into multiple themes. Say "perlcritic -list" to get
449 a listing of all available Policies and the themes that are associated
450 with each one. You can also change the theme for any Policy in your
451 .perlcriticrc file. See the "CONFIGURATION" section for more
452 information about that.
453
454 Using the "-theme" option, you can create an arbitrarily complex rule
455 that determines which Policies will be loaded. Precedence is the same
456 as regular Perl code, and you can use parentheses to enforce precedence
457 as well. Supported operators are:
458
459 Operator Altertative Example
460 -----------------------------------------------------------------
461 && and 'pbp && core'
462 || or 'pbp || (bugs && security)'
463 ! not 'pbp && ! (portability || complexity)'
464
465 Theme names are case-insensitive. If the "-theme" is set to an empty
466 string, then it evaluates as true all Policies.
467
469 Perl::Critic takes a hard-line approach to your code: either you comply
470 or you don't. In the real world, it is not always practical (nor even
471 possible) to fully comply with coding standards. In such cases, it is
472 wise to show that you are knowingly violating the standards and that
473 you have a Damn Good Reason (DGR) for doing so.
474
475 To help with those situations, you can direct Perl::Critic to ignore
476 certain lines or blocks of code by using annotations:
477
478 require 'LegacyLibaray1.pl'; ## no critic
479 require 'LegacyLibrary2.pl'; ## no critic
480
481 for my $element (@list) {
482
483 ## no critic
484
485 $foo = ""; #Violates 'ProhibitEmptyQuotes'
486 $barf = bar() if $foo; #Violates 'ProhibitPostfixControls'
487 #Some more evil code...
488
489 ## use critic
490
491 #Some good code...
492 do_something($_);
493 }
494
495 The "## no critic" annotations direct Perl::Critic to ignore the
496 remaining lines of code until the end of the current block, or until a
497 "## use critic" annotation is found (whichever comes first). If the
498 "## no critic" annotation is on the same line as a code statement, then
499 only that line of code is overlooked. To direct this Critic to ignore
500 the "## no critic" annotations, use the "-force" option.
501
502 A bare "## no critic" annotation disables all the active Policies. If
503 you wish to disable only specific Policies, add a list of Policy names
504 as arguments, just as you would for the "no strict" or "no warnings"
505 pragmas. For example, this would disable the "ProhibitEmptyQuotes" and
506 "ProhibitPostfixControls" policies until the end of the block or until
507 the next "## use critic" annotation (whichever comes first):
508
509 ## no critic (EmptyQuotes, PostfixControls)
510
511 # Now exempt from ValuesAndExpressions::ProhibitEmptyQuotes
512 $foo = "";
513
514 # Now exempt ControlStructures::ProhibitPostfixControls
515 $barf = bar() if $foo;
516
517 # Still subjected to ValuesAndExpression::RequireNumberSeparators
518 $long_int = 10000000000;
519
520 Since the Policy names are matched against the "## no critic" arguments
521 as regular expressions, you can abbreviate the Policy names or disable
522 an entire family of Policies in one shot like this:
523
524 ## no critic (NamingConventions)
525
526 # Now exempt from NamingConventions::Capitalization
527 my $camelHumpVar = 'foo';
528
529 # Now exempt from NamingConventions::Capitalization
530 sub camelHumpSub {}
531
532 The argument list must be enclosed in parentheses and must contain one
533 or more comma-separated barewords (e.g. don't use quotes). The "## no
534 critic" annotations can be nested, and Policies named by an inner
535 annotation will be disabled along with those already disabled an outer
536 annotation.
537
538 Some Policies like "Subroutines::ProhibitExcessComplexity" apply to an
539 entire block of code. In those cases, "## no critic" must appear on
540 the line where the violation is reported. For example:
541
542 sub complicated_function { ## no critic (ProhibitExcessComplexity)
543 # Your code here...
544 }
545
546 Policies such as "Documentation::RequirePodSections" apply to the
547 entire document, in which case violations are reported at line 1.
548
549 Use this feature wisely. "## no critic" annotations should be used in
550 the smallest possible scope, or only on individual lines of code. And
551 you should always be as specific as possible about which Policies you
552 want to disable (i.e. never use a bare "## no critic"). If
553 Perl::Critic complains about your code, try and find a compliant
554 solution before resorting to this feature.
555
557 Coding standards are deeply personal and highly subjective. The goal
558 of Perl::Critic is to help you write code that conforms with a set of
559 best practices. Our primary goal is not to dictate what those
560 practices are, but rather, to implement the practices discovered by
561 others. Ultimately, you make the rules -- Perl::Critic is merely a
562 tool for encouraging consistency. If there is a policy that you think
563 is important or that we have overlooked, we would be very grateful for
564 contributions, or you can simply load your own private set of policies
565 into Perl::Critic.
566
568 The modular design of Perl::Critic is intended to facilitate the
569 addition of new Policies. You'll need to have some understanding of
570 PPI, but most Policy modules are pretty straightforward and only
571 require about 20 lines of code. Please see the Perl::Critic::DEVELOPER
572 file included in this distribution for a step-by-step demonstration of
573 how to create new Policy modules.
574
575 If you develop any new Policy modules, feel free to send them to
576 "<thaljef@cpan.org>" and I'll be happy to put them into the
577 Perl::Critic distribution. Or if you would like to work on the
578 Perl::Critic project directly, check out our repository at
579 <http://perlcritic.tigris.org>. To subscribe to our mailing list, send
580 a message to mailto:dev-subscribe@perlcritic.tigris.org <mailto:dev-
581 subscribe@perlcritic.tigris.org>.
582
583 The Perl::Critic team is also available for hire. If your organization
584 has its own coding standards, we can create custom Policies to enforce
585 your local guidelines. Or if your code base is prone to a particular
586 defect pattern, we can design Policies that will help you catch those
587 costly defects before they go into production. To discuss your needs
588 with the Perl::Critic team, just contact "<thaljef@cpan.org>".
589
591 Perl::Critic requires the following modules:
592
593 B::Keywords
594
595 Config::Tiny
596
597 Exception::Class
598
599 File::Spec
600
601 File::Spec::Unix
602
603 IO::String
604
605 List::MoreUtils
606
607 List::Util
608
609 Module::Pluggable
610
611 PPI
612
613 Pod::PlainText
614
615 Pod::Usage
616
617 Readonly
618
619 Scalar::Util
620
621 String::Format
622
623 version
624
625 The following modules are optional, but recommended for complete
626 testing:
627
628 File::HomeDir
629
630 File::Which
631
632 IO::String
633
634 IPC::Open2
635
636 Perl::Tidy
637
638 Pod::Spell
639
640 Test::Pod
641
642 Test::Pod::Coverage
643
644 Text::ParseWords
645
647 You are encouraged to subscribe to the mailing list; send a message to
648 mailto:users-subscribe@perlcritic.tigris.org <mailto:users-
649 subscribe@perlcritic.tigris.org>. See also the archives at
650 <http://perlcritic.tigris.org/servlets/SummarizeList?listName=users>.
651 You can also contact the author at "<thaljef@cpan.org>".
652
653 At least one member of the development team has started hanging around
654 in <irc://irc.perl.org/#perlcritic>.
655
656 You can also follow Perl::Critic on Twitter, at
657 <https://twitter.com/perlcritic>.
658
660 There are a number of distributions of additional Policies available.
661 A few are listed here:
662
663 Perl::Critic::More
664
665 Perl::Critic::Bangs
666
667 Perl::Critic::Lax
668
669 Perl::Critic::StricterSubs
670
671 Perl::Critic::Swift
672
673 Perl::Critic::Tics
674
675 These distributions enable you to use Perl::Critic in your unit tests:
676
677 Test::Perl::Critic
678
679 Test::Perl::Critic::Progressive
680
681 There is also a distribution that will install all the Perl::Critic
682 related modules known to the development team:
683
684 Task::Perl::Critic
685
686 If you want to make sure you have absolutely everything, you can use
687 this:
688
689 Task::Perl::Critic::IncludingOptionalDependencies
690
692 Scrutinizing Perl code is hard for humans, let alone machines. If you
693 find any bugs, particularly false-positives or false-negatives from a
694 Perl::Critic::Policy, please submit them to
695 http://rt.cpan.org/NoAuth/Bugs.html?Dist=Perl-Critic
696 <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Perl-Critic>. Thanks.
697
698 Most policies will produce false-negatives if they cannot understand a
699 particular block of code.
700
702 Adam Kennedy - For creating PPI, the heart and soul of Perl::Critic.
703
704 Damian Conway - For writing Perl Best Practices, finally :)
705
706 Chris Dolan - For contributing the best features and Policy modules.
707
708 Andy Lester - Wise sage and master of all-things-testing.
709
710 Elliot Shank - The self-proclaimed quality freak.
711
712 Giuseppe Maxia - For all the great ideas and positive encouragement.
713
714 and Sharon, my wife - For putting up with my all-night code sessions.
715
716 Thanks also to the Perl Foundation for providing a grant to support
717 Chris Dolan's project to implement twenty PBP policies.
718 <http://www.perlfoundation.org/april_1_2007_new_grant_awards>
719
721 Jeffrey Ryan Thalhammer <thaljef@cpan.org>
722
724 Copyright (c) 2005-2009 Jeffrey Ryan Thalhammer. All rights reserved.
725
726 This program is free software; you can redistribute it and/or modify it
727 under the same terms as Perl itself. The full text of this license can
728 be found in the LICENSE file included with this module.
729
730
731
732perl v5.12.1 2010-09-08 Perl::Critic(3)