1Perl::Critic(3)       User Contributed Perl Documentation      Perl::Critic(3)
2
3
4

NAME

6       Perl::Critic - Critique Perl source code for best-practices.
7

SYNOPSIS

9           use Perl::Critic;
10           my $file = shift;
11           my $critic = Perl::Critic->new();
12           my @violations = $critic->critique($file);
13           print @violations;
14

DESCRIPTION

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 programs.  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       If you'd like to try Perl::Critic without installing anything, there is
35       a web-service available at <http://perlcritic.com>.  The web-service
36       does not yet support all the configuration features that are available
37       in the native Perl::Critic API, but it should give you a good idea of
38       what it does.
39
40       Also, ActivePerl includes a very slick graphical interface to Perl-
41       Critic called "perlcritic-gui".  You can get a free community edition
42       of ActivePerl from <http://www.activestate.com>.
43

INTERFACE SUPPORT

45       This is considered to be a public class.  Any changes to its interface
46       will go through a deprecation cycle.
47

CONSTRUCTOR

49       "new( [ -profile => $FILE, -severity => $N, -theme => $string, -include
50       => \@PATTERNS, -exclude => \@PATTERNS, -top => $N, -only => $B,
51       -profile-strictness => $PROFILE_STRICTNESS_{WARN|FATAL|QUIET}, -force
52       => $B, -verbose => $N ], -color => $B, -pager => $string, -allow-unsafe
53       => $B, -criticism-fatal => $B)"
54       "new()"
55           Returns a reference to a new Perl::Critic object.  Most arguments
56           are just passed directly into Perl::Critic::Config, but I have
57           described them here as well.  The default value for all arguments
58           can be defined in your .perlcriticrc file.  See the "CONFIGURATION"
59           section for more information about that.  All arguments are
60           optional key-value pairs as follows:
61
62           -profile is a path to a configuration file. If $FILE is not
63           defined, Perl::Critic::Config attempts to find a .perlcriticrc
64           configuration file in the current directory, and then in your home
65           directory.  Alternatively, you can set the "PERLCRITIC" environment
66           variable to point to a file in another location.  If a
67           configuration file can't be found, or if $FILE is an empty string,
68           then all Policies will be loaded with their default configuration.
69           See "CONFIGURATION" for more information.
70
71           -severity is the minimum severity level.  Only Policy modules that
72           have a severity greater than $N will be applied.  Severity values
73           are integers ranging from 1 (least severe violations) to 5 (most
74           severe violations).  The default is 5.  For a given "-profile",
75           decreasing the "-severity" will usually reveal more Policy
76           violations. You can set the default value for this option in your
77           .perlcriticrc file.  Users can redefine the severity level for any
78           Policy in their .perlcriticrc file.  See "CONFIGURATION" for more
79           information.
80
81           If it is difficult for you to remember whether severity "5" is the
82           most or least restrictive level, then you can use one of these
83           named values:
84
85               SEVERITY NAME   ...is equivalent to...   SEVERITY NUMBER
86               --------------------------------------------------------
87               -severity => 'gentle'                     -severity => 5
88               -severity => 'stern'                      -severity => 4
89               -severity => 'harsh'                      -severity => 3
90               -severity => 'cruel'                      -severity => 2
91               -severity => 'brutal'                     -severity => 1
92
93           The names reflect how severely the code is criticized: a "gentle"
94           criticism reports only the most severe violations, and so on down
95           to a "brutal" criticism which reports even the most minor
96           violations.
97
98           -theme is special expression that determines which Policies to
99           apply based on their respective themes.  For example, the following
100           would load only Policies that have a 'bugs' AND 'pbp' theme:
101
102             my $critic = Perl::Critic->new( -theme => 'bugs && pbp' );
103
104           Unless the "-severity" option is explicitly given, setting "-theme"
105           silently causes the "-severity" to be set to 1.  You can set the
106           default value for this option in your .perlcriticrc file.  See the
107           "POLICY THEMES" section for more information about themes.
108
109           -include is a reference to a list of string @PATTERNS.  Policy
110           modules that match at least one "m/$PATTERN/ixms" will always be
111           loaded, irrespective of all other settings.  For example:
112
113               my $critic = Perl::Critic->new(-include => ['layout'], -severity => 4);
114
115           This would cause Perl::Critic to apply all the "CodeLayout::*"
116           Policy modules even though they have a severity level that is less
117           than 4. You can set the default value for this option in your
118           .perlcriticrc file.  You can also use "-include" in conjunction
119           with the "-exclude" option.  Note that "-exclude" takes precedence
120           over "-include" when a Policy matches both patterns.
121
122           -exclude is a reference to a list of string @PATTERNS.  Policy
123           modules that match at least one "m/$PATTERN/ixms" will not be
124           loaded, irrespective of all other settings.  For example:
125
126               my $critic = Perl::Critic->new(-exclude => ['strict'], -severity => 1);
127
128           This would cause Perl::Critic to not apply the "RequireUseStrict"
129           and "ProhibitNoStrict" Policy modules even though they have a
130           severity level that is greater than 1.  You can set the default
131           value for this option in your .perlcriticrc file.  You can also use
132           "-exclude" in conjunction with the "-include" option.  Note that
133           "-exclude" takes precedence over "-include" when a Policy matches
134           both patterns.
135
136           -single-policy is a string "PATTERN".  Only one policy that matches
137           "m/$PATTERN/ixms" will be used.  Policies that do not match will be
138           excluded.  This option has precedence over the "-severity",
139           "-theme", "-include", "-exclude", and "-only" options.  You can set
140           the default value for this option in your .perlcriticrc file.
141
142           -top is the maximum number of Violations to return when ranked by
143           their severity levels.  This must be a positive integer.
144           Violations are still returned in the order that they occur within
145           the file. Unless the "-severity" option is explicitly given,
146           setting "-top" silently causes the "-severity" to be set to 1.  You
147           can set the default value for this option in your .perlcriticrc
148           file.
149
150           -only is a boolean value.  If set to a true value, Perl::Critic
151           will only choose from Policies that are mentioned in the user's
152           profile.  If set to a false value (which is the default), then
153           Perl::Critic chooses from all the Policies that it finds at your
154           site. You can set the default value for this option in your
155           .perlcriticrc file.
156
157           -profile-strictness is an enumerated value, one of
158           "$PROFILE_STRICTNESS_WARN" in Perl::Critic::Utils::Constants (the
159           default), "$PROFILE_STRICTNESS_FATAL" in
160           Perl::Critic::Utils::Constants, and "$PROFILE_STRICTNESS_QUIET" in
161           Perl::Critic::Utils::Constants.  If set to
162           "$PROFILE_STRICTNESS_FATAL" in Perl::Critic::Utils::Constants,
163           Perl::Critic will make certain warnings about problems found in a
164           .perlcriticrc or file specified via the -profile option fatal. For
165           example, Perl::Critic normally only "warn"s about profiles
166           referring to non-existent Policies, but this value makes this
167           situation fatal.  Correspondingly, "$PROFILE_STRICTNESS_QUIET" in
168           Perl::Critic::Utils::Constants makes Perl::Critic shut up about
169           these things.
170
171           -force is a boolean value that controls whether Perl::Critic
172           observes the magical "## no critic" annotations in your code. If
173           set to a true value, Perl::Critic will analyze all code.  If set to
174           a false value (which is the default) Perl::Critic will ignore code
175           that is tagged with these annotations.  See "BENDING THE RULES" for
176           more information.  You can set the default value for this option in
177           your .perlcriticrc file.
178
179           -verbose can be a positive integer (from 1 to 11), or a literal
180           format specification.  See Perl::Critic::Violation for an
181           explanation of format specifications.  You can set the default
182           value for this option in your .perlcriticrc file.
183
184           -unsafe directs Perl::Critic to allow the use of Policies that are
185           marked as "unsafe" by the author.  Such policies may compile
186           untrusted code or do other nefarious things.
187
188           -color and -pager are not used by Perl::Critic but is provided for
189           the benefit of perlcritic.
190
191           -criticism-fatal is not used by Perl::Critic but is provided for
192           the benefit of criticism.
193
194           -color-severity-highest, -color-severity-high, -color-severity-
195           medium, -color-severity-low, and -color-severity-lowest are not
196           used by Perl::Critic, but are provided for the benefit of
197           perlcritic.  Each is set to the Term::ANSIColor color specification
198           to be used to display violations of the corresponding severity.
199
200           -files-with-violations and -files-without-violations are not used
201           by Perl::Critic, but are provided for the benefit of perlcritic, to
202           cause only the relevant filenames to be displayed.
203

METHODS

205       "critique( $source_code )"
206           Runs the $source_code through the Perl::Critic engine using all the
207           Policies that have been loaded into this engine.  If $source_code
208           is a scalar reference, then it is treated as a string of actual
209           Perl code.  If $source_code is a reference to an instance of
210           PPI::Document, then that instance is used directly. Otherwise, it
211           is treated as a path to a local file containing Perl code.  This
212           method returns a list of Perl::Critic::Violation objects for each
213           violation of the loaded Policies.  The list is sorted in the order
214           that the Violations appear in the code.  If there are no
215           violations, this method returns an empty list.
216
217       "add_policy( -policy => $policy_name, -params => \%param_hash )"
218           Creates a Policy object and loads it into this Critic.  If the
219           object cannot be instantiated, it will throw a fatal exception.
220           Otherwise, it returns a reference to this Critic.
221
222           -policy is the name of a Perl::Critic::Policy subclass module.  The
223           'Perl::Critic::Policy' portion of the name can be omitted for
224           brevity.  This argument is required.
225
226           -params is an optional reference to a hash of Policy parameters.
227           The contents of this hash reference will be passed into to the
228           constructor of the Policy module.  See the documentation in the
229           relevant Policy module for a description of the arguments it
230           supports.
231
232       " policies() "
233           Returns a list containing references to all the Policy objects that
234           have been loaded into this engine.  Objects will be in the order
235           that they were loaded.
236
237       " config() "
238           Returns the Perl::Critic::Config object that was created for or
239           given to this Critic.
240
241       " statistics() "
242           Returns the Perl::Critic::Statistics object that was created for
243           this Critic.  The Statistics object accumulates data for all files
244           that are analyzed by this Critic.
245

FUNCTIONAL INTERFACE

247       For those folks who prefer to have a functional interface, The
248       "critique" method can be exported on request and called as a static
249       function.  If the first argument is a hashref, its contents are used to
250       construct a new Perl::Critic object internally.  The keys of that hash
251       should be the same as those supported by the "Perl::Critic::new()"
252       method.  Here are some examples:
253
254           use Perl::Critic qw(critique);
255
256           # Use default parameters...
257           @violations = critique( $some_file );
258
259           # Use custom parameters...
260           @violations = critique( {-severity => 2}, $some_file );
261
262           # As a one-liner
263           %> perl -MPerl::Critic=critique -e 'print critique(shift)' some_file.pm
264
265       None of the other object-methods are currently supported as static
266       functions.  Sorry.
267

CONFIGURATION

269       Most of the settings for Perl::Critic and each of the Policy modules
270       can be controlled by a configuration file.  The default configuration
271       file is called .perlcriticrc.  Perl::Critic will look for this file in
272       the current directory first, and then in your home directory.
273       Alternatively, you can set the "PERLCRITIC" environment variable to
274       explicitly point to a different file in another location.  If none of
275       these files exist, and the "-profile" option is not given to the
276       constructor, then all the modules that are found in the
277       Perl::Critic::Policy namespace will be loaded with their default
278       configuration.
279
280       The format of the configuration file is a series of INI-style blocks
281       that contain key-value pairs separated by '='. Comments should start
282       with '#' and can be placed on a separate line or after the name-value
283       pairs if you desire.
284
285       Default settings for Perl::Critic itself can be set before the first
286       named block. For example, putting any or all of these at the top of
287       your configuration file will set the default value for the
288       corresponding constructor argument.
289
290           severity  = 3                                     #Integer or named level
291           only      = 1                                     #Zero or One
292           force     = 0                                     #Zero or One
293           verbose   = 4                                     #Integer or format spec
294           top       = 50                                    #A positive integer
295           theme     = (pbp || security) && bugs             #A theme expression
296           include   = NamingConventions ClassHierarchies    #Space-delimited list
297           exclude   = Variables  Modules::RequirePackage    #Space-delimited list
298           criticism-fatal = 1                               #Zero or One
299           color     = 1                                     #Zero or One
300           allow-unsafe = 1                                  #Zero or One
301           pager     = less                                  #pager to pipe output to
302
303       The remainder of the configuration file is a series of blocks like
304       this:
305
306           [Perl::Critic::Policy::Category::PolicyName]
307           severity = 1
308           set_themes = foo bar
309           add_themes = baz
310           maximum_violations_per_document = 57
311           arg1 = value1
312           arg2 = value2
313
314       "Perl::Critic::Policy::Category::PolicyName" is the full name of a
315       module that implements the policy.  The Policy modules distributed with
316       Perl::Critic have been grouped into categories according to the table
317       of contents in Damian Conway's book Perl Best Practices. For brevity,
318       you can omit the 'Perl::Critic::Policy' part of the module name.
319
320       "severity" is the level of importance you wish to assign to the Policy.
321       All Policy modules are defined with a default severity value ranging
322       from 1 (least severe) to 5 (most severe).  However, you may disagree
323       with the default severity and choose to give it a higher or lower
324       severity, based on your own coding philosophy.  You can set the
325       "severity" to an integer from 1 to 5, or use one of the equivalent
326       names:
327
328           SEVERITY NAME ...is equivalent to... SEVERITY NUMBER
329           ----------------------------------------------------
330           gentle                                             5
331           stern                                              4
332           harsh                                              3
333           cruel                                              2
334           brutal                                             1
335
336       The names reflect how severely the code is criticized: a "gentle"
337       criticism reports only the most severe violations, and so on down to a
338       "brutal" criticism which reports even the most minor violations.
339
340       "set_themes" sets the theme for the Policy and overrides its default
341       theme.  The argument is a string of one or more whitespace-delimited
342       alphanumeric words.  Themes are case-insensitive.  See "POLICY THEMES"
343       for more information.
344
345       "add_themes" appends to the default themes for this Policy.  The
346       argument is a string of one or more whitespace-delimited words. Themes
347       are case- insensitive.  See "POLICY THEMES" for more information.
348
349       "maximum_violations_per_document" limits the number of Violations the
350       Policy will return for a given document.  Some Policies have a default
351       limit; see the documentation for the individual Policies to see whether
352       there is one.  To force a Policy to not have a limit, specify
353       "no_limit" or the empty string for the value of this parameter.
354
355       The remaining key-value pairs are configuration parameters that will be
356       passed into the constructor for that Policy.  The constructors for most
357       Policy objects do not support arguments, and those that do should have
358       reasonable defaults.  See the documentation on the appropriate Policy
359       module for more details.
360
361       Instead of redefining the severity for a given Policy, you can
362       completely disable a Policy by prepending a '-' to the name of the
363       module in your configuration file.  In this manner, the Policy will
364       never be loaded, regardless of the "-severity" given to the
365       Perl::Critic constructor.
366
367       A simple configuration might look like this:
368
369           #--------------------------------------------------------------
370           # I think these are really important, so always load them
371
372           [TestingAndDebugging::RequireUseStrict]
373           severity = 5
374
375           [TestingAndDebugging::RequireUseWarnings]
376           severity = 5
377
378           #--------------------------------------------------------------
379           # I think these are less important, so only load when asked
380
381           [Variables::ProhibitPackageVars]
382           severity = 2
383
384           [ControlStructures::ProhibitPostfixControls]
385           allow = if unless  # My custom configuration
386           severity = cruel   # Same as "severity = 2"
387
388           #--------------------------------------------------------------
389           # Give these policies a custom theme.  I can activate just
390           # these policies by saying `perlcritic -theme larry`
391
392           [Modules::RequireFilenameMatchesPackage]
393           add_themes = larry
394
395           [TestingAndDebugging::RequireTestLables]
396           add_themes = larry curly moe
397
398           #--------------------------------------------------------------
399           # I do not agree with these at all, so never load them
400
401           [-NamingConventions::Capitalization]
402           [-ValuesAndExpressions::ProhibitMagicNumbers]
403
404           #--------------------------------------------------------------
405           # For all other Policies, I accept the default severity,
406           # so no additional configuration is required for them.
407
408       For additional configuration examples, see the perlcriticrc file that
409       is included in this examples directory of this distribution.
410
411       Damian Conway's own Perl::Critic configuration is also included in this
412       distribution as examples/perlcriticrc-conway.
413

THE POLICIES

415       A large number of Policy modules are distributed with Perl::Critic.
416       They are described briefly in the companion document
417       Perl::Critic::PolicySummary and in more detail in the individual
418       modules themselves.  Say "perlcritic -doc PATTERN" to see the perldoc
419       for all Policy modules that match the regex "m/PATTERN/ixms"
420
421       There are a number of distributions of additional policies on CPAN. If
422       Perl::Critic doesn't contain a policy that you want, some one may have
423       already written it.  See the "SEE ALSO" section below for a list of
424       some of these distributions.
425

POLICY THEMES

427       Each Policy is defined with one or more "themes".  Themes can be used
428       to create arbitrary groups of Policies.  They are intended to provide
429       an alternative mechanism for selecting your preferred set of Policies.
430       For example, you may wish disable a certain subset of Policies when
431       analyzing test programs.  Conversely, you may wish to enable only a
432       specific subset of Policies when analyzing modules.
433
434       The Policies that ship with Perl::Critic have been broken into the
435       following themes.  This is just our attempt to provide some basic
436       logical groupings.  You are free to invent new themes that suit your
437       needs.
438
439           THEME             DESCRIPTION
440           --------------------------------------------------------------------------
441           core              All policies that ship with Perl::Critic
442           pbp               Policies that come directly from "Perl Best Practices"
443           bugs              Policies that that prevent or reveal bugs
444           certrec           Policies that CERT recommends
445           certrule          Policies that CERT considers rules
446           maintenance       Policies that affect the long-term health of the code
447           cosmetic          Policies that only have a superficial effect
448           complexity        Policies that specifically relate to code complexity
449           security          Policies that relate to security issues
450           tests             Policies that are specific to test programs
451
452       Any Policy may fit into multiple themes.  Say "perlcritic -list" to get
453       a listing of all available Policies and the themes that are associated
454       with each one.  You can also change the theme for any Policy in your
455       .perlcriticrc file.  See the "CONFIGURATION" section for more
456       information about that.
457
458       Using the "-theme" option, you can create an arbitrarily complex rule
459       that determines which Policies will be loaded.  Precedence is the same
460       as regular Perl code, and you can use parentheses to enforce precedence
461       as well.  Supported operators are:
462
463           Operator    Alternative    Example
464           -----------------------------------------------------------------
465           &&          and            'pbp && core'
466           ||          or             'pbp || (bugs && security)'
467           !           not            'pbp && ! (portability || complexity)'
468
469       Theme names are case-insensitive.  If the "-theme" is set to an empty
470       string, then it evaluates as true all Policies.
471

BENDING THE RULES

473       Perl::Critic takes a hard-line approach to your code: either you comply
474       or you don't.  In the real world, it is not always practical (nor even
475       possible) to fully comply with coding standards.  In such cases, it is
476       wise to show that you are knowingly violating the standards and that
477       you have a Damn Good Reason (DGR) for doing so.
478
479       To help with those situations, you can direct Perl::Critic to ignore
480       certain lines or blocks of code by using annotations:
481
482           require 'LegacyLibaray1.pl';  ## no critic
483           require 'LegacyLibrary2.pl';  ## no critic
484
485           for my $element (@list) {
486
487               ## no critic
488
489               $foo = "";               #Violates 'ProhibitEmptyQuotes'
490               $barf = bar() if $foo;   #Violates 'ProhibitPostfixControls'
491               #Some more evil code...
492
493               ## use critic
494
495               #Some good code...
496               do_something($_);
497           }
498
499       The "## no critic" annotations direct Perl::Critic to ignore the
500       remaining lines of code until a "## use critic" annotation is found. If
501       the "## no critic" annotation is on the same line as a code statement,
502       then only that line of code is overlooked.  To direct perlcritic to
503       ignore the "## no critic" annotations, use the "--force" option.
504
505       A bare "## no critic" annotation disables all the active Policies.  If
506       you wish to disable only specific Policies, add a list of Policy names
507       as arguments, just as you would for the "no strict" or "no warnings"
508       pragmas.  For example, this would disable the "ProhibitEmptyQuotes" and
509       "ProhibitPostfixControls" policies until the end of the block or until
510       the next "## use critic" annotation (whichever comes first):
511
512           ## no critic (EmptyQuotes, PostfixControls)
513
514           # Now exempt from ValuesAndExpressions::ProhibitEmptyQuotes
515           $foo = "";
516
517           # Now exempt ControlStructures::ProhibitPostfixControls
518           $barf = bar() if $foo;
519
520           # Still subjected to ValuesAndExpression::RequireNumberSeparators
521           $long_int = 10000000000;
522
523       Since the Policy names are matched against the "## no critic" arguments
524       as regular expressions, you can abbreviate the Policy names or disable
525       an entire family of Policies in one shot like this:
526
527           ## no critic (NamingConventions)
528
529           # Now exempt from NamingConventions::Capitalization
530           my $camelHumpVar = 'foo';
531
532           # Now exempt from NamingConventions::Capitalization
533           sub camelHumpSub {}
534
535       The argument list must be enclosed in parentheses or brackets and must
536       contain one or more comma-separated barewords (e.g. don't use quotes).
537       The "## no critic" annotations can be nested, and Policies named by an
538       inner annotation will be disabled along with those already disabled an
539       outer annotation.
540
541       Some Policies like "Subroutines::ProhibitExcessComplexity" apply to an
542       entire block of code.  In those cases, the "## no critic" annotation
543       must appear on the line where the violation is reported.  For example:
544
545           sub complicated_function {  ## no critic (ProhibitExcessComplexity)
546               # Your code here...
547           }
548
549       Policies such as "Documentation::RequirePodSections" apply to the
550       entire document, in which case violations are reported at line 1.
551
552       Use this feature wisely.  "## no critic" annotations should be used in
553       the smallest possible scope, or only on individual lines of code. And
554       you should always be as specific as possible about which Policies you
555       want to disable (i.e. never use a bare "## no critic").  If
556       Perl::Critic complains about your code, try and find a compliant
557       solution before resorting to this feature.
558

THE Perl::Critic PHILOSOPHY

560       Coding standards are deeply personal and highly subjective.  The goal
561       of Perl::Critic is to help you write code that conforms with a set of
562       best practices.  Our primary goal is not to dictate what those
563       practices are, but rather, to implement the practices discovered by
564       others.  Ultimately, you make the rules -- Perl::Critic is merely a
565       tool for encouraging consistency.  If there is a policy that you think
566       is important or that we have overlooked, we would be very grateful for
567       contributions, or you can simply load your own private set of policies
568       into Perl::Critic.
569

EXTENDING THE CRITIC

571       The modular design of Perl::Critic is intended to facilitate the
572       addition of new Policies.  You'll need to have some understanding of
573       PPI, but most Policy modules are pretty straightforward and only
574       require about 20 lines of code.  Please see the Perl::Critic::DEVELOPER
575       file included in this distribution for a step-by-step demonstration of
576       how to create new Policy modules.
577
578       If you develop any new Policy modules, feel free to send them to
579       "<team@perlcritic.com>" and I'll be happy to consider putting them into
580       the Perl::Critic distribution.  Or if you would like to work on the
581       Perl::Critic project directly, you can fork our repository at
582       <https://github.com/Perl-Critic/Perl-Critic.git>.
583
584       The Perl::Critic team is also available for hire.  If your organization
585       has its own coding standards, we can create custom Policies to enforce
586       your local guidelines.  Or if your code base is prone to a particular
587       defect pattern, we can design Policies that will help you catch those
588       costly defects before they go into production. To discuss your needs
589       with the Perl::Critic team, just contact "<team@perlcritic.com>".
590

PREREQUISITES

592       Perl::Critic requires the following modules:
593
594       B::Keywords
595
596       Config::Tiny
597
598       Exception::Class
599
600       File::HomeDir
601
602       File::Spec
603
604       File::Spec::Unix
605
606       File::Which
607
608       IO::String
609
610       List::MoreUtils
611
612       List::Util
613
614       Module::Pluggable
615
616       Perl::Tidy
617
618       Pod::Spell
619
620       PPI
621
622       Pod::PlainText
623
624       Pod::Select
625
626       Pod::Usage
627
628       Readonly
629
630       Scalar::Util
631
632       String::Format
633
634       Task::Weaken
635
636       Term::ANSIColor
637
638       Text::ParseWords
639
640       version
641

CONTACTING THE DEVELOPMENT TEAM

643       You are encouraged to subscribe to the public mailing list at
644       <https://groups.google.com/d/forum/perl-critic>.  At least one member
645       of the development team is usually hanging around in
646       <irc://irc.perl.org/#perlcritic> and you can follow Perl::Critic on
647       Twitter, at <https://twitter.com/perlcritic>.
648

SEE ALSO

650       There are a number of distributions of additional Policies available. A
651       few are listed here:
652
653       Perl::Critic::More
654
655       Perl::Critic::Bangs
656
657       Perl::Critic::Lax
658
659       Perl::Critic::StricterSubs
660
661       Perl::Critic::Swift
662
663       Perl::Critic::Tics
664
665       These distributions enable you to use Perl::Critic in your unit tests:
666
667       Test::Perl::Critic
668
669       Test::Perl::Critic::Progressive
670
671       There is also a distribution that will install all the Perl::Critic
672       related modules known to the development team:
673
674       Task::Perl::Critic
675

BUGS

677       Scrutinizing Perl code is hard for humans, let alone machines.  If you
678       find any bugs, particularly false-positives or false-negatives from a
679       Perl::Critic::Policy, please submit them at
680       <https://github.com/Perl-Critic/Perl-Critic/issues>.  Thanks.
681

CREDITS

683       Adam Kennedy - For creating PPI, the heart and soul of Perl::Critic.
684
685       Damian Conway - For writing Perl Best Practices, finally :)
686
687       Chris Dolan - For contributing the best features and Policy modules.
688
689       Andy Lester - Wise sage and master of all-things-testing.
690
691       Elliot Shank - The self-proclaimed quality freak.
692
693       Giuseppe Maxia - For all the great ideas and positive encouragement.
694
695       and Sharon, my wife - For putting up with my all-night code sessions.
696
697       Thanks also to the Perl Foundation for providing a grant to support
698       Chris Dolan's project to implement twenty PBP policies.
699       <http://www.perlfoundation.org/april_1_2007_new_grant_awards>
700

AUTHOR

702       Jeffrey Ryan Thalhammer <jeff@imaginative-software.com>
703
705       Copyright (c) 2005-2018 Imaginative Software Systems.  All rights
706       reserved.
707
708       This program is free software; you can redistribute it and/or modify it
709       under the same terms as Perl itself.  The full text of this license can
710       be found in the LICENSE file included with this module.
711
712
713
714perl v5.28.0                      2018-07-15                   Perl::Critic(3)
Impressum