Login
Importing Perl-Critic-0.13.
[gknop/Perl-Critic.git] / lib / Perl / Critic.pm
CommitLineData
59b05e08
JRT
1package Perl::Critic;
2
3use strict;
4use warnings;
5use File::Spec;
6use English qw(-no_match_vars);
7use Perl::Critic::Config;
8use Perl::Critic::Utils;
9use Carp;
10use PPI;
11
12our $VERSION = '0.13';
13$VERSION = eval $VERSION; ## no critic
14
15#----------------------------------------------------------------------------
16#
17sub new {
18
19 my ( $class, %args ) = @_;
20
21 # Default arguments
22 my $priority = defined $args{-priority} ? $args{-priority} : 0;
23 my $profile_path = $args{-profile};
24 my $force = $args{-force} || 0;
25
26 # Create and init object
27 my $self = bless {}, $class;
28 $self->{_force} = $force;
29 $self->{_policies} = [];
30
31 # Read profile and add policies
32 my $config = Perl::Critic::Config->new( %args );
33 while ( my ( $policy, $params ) = each %{$config} ) {
34 $self->add_policy( -policy => $policy, -config => $params );
35 }
36 return $self;
37}
38
39#----------------------------------------------------------------------------
40#
41sub add_policy {
42
43 my ( $self, %args ) = @_;
44 my $module_name = $args{-policy} || return;
45 my $config = $args{-config} || {};
46
47 #Qualify name if full module name not given
48 my $namespace = 'Perl::Critic::Policy';
49 if ( $module_name !~ m{ \A $namespace }mx ) {
50 $module_name = $namespace . q{::} . $module_name;
51 }
52
53 #Convert module name to file path. I'm trying to do
54 #this in a portable way, but I'm not sure it actually is.
55 my $module_file = File::Spec->catfile( split q{::}, $module_name );
56 $module_file .= '.pm';
57
58 #Try to load module and instantiate
59 eval {
60 require $module_file; ## no critic
61 my $policy = $module_name->new( %{$config} );
62 push @{ $self->{_policies} }, $policy;
63 };
64
65 #Failure to load is not fatal
66 if ($EVAL_ERROR) {
67 carp qq{Cannot load policy module $module_name: $EVAL_ERROR};
68 return;
69 }
70
71 return $self;
72}
73
74#----------------------------------------------------------------------------
75#
76sub critique {
77 # Here we go!
78 my ( $self, $source_code ) = @_;
79
80 # Parse the code
81 my $doc = PPI::Document->new($source_code);
82
83 # Bail on error
84 if( ! defined $doc ) {
85 my $errstr = PPI::Document::errstr();
86 my $file = -f $source_code ? $source_code : 'stdin';
87 die qq{Cannot parse code: $errstr of '$file'\n};
88 }
89
90 # Pre-index location of each node (for speed)
91 $doc->index_locations();
92
93 # Filter exempt code, if desired
94 $self->{_force} || _filter_code($doc);
95
96 # Remove the magic shebang fix
97 _unfix_shebang($doc);
98
99 # Run engine, testing each Policy at each element
100 my $elems = $doc->find( 'PPI::Element' ) || return; #Nothing to do!
101 my @pols = @{ $self->policies() }; @pols || return; #Nothing to do!
102 return map { my $e = $_; map { $_->violates($e, $doc) } @pols } @{$elems};
103}
104
105#----------------------------------------------------------------------------
106#
107sub policies { $_[0]->{_policies} }
108
109#============================================================================
110#PRIVATE SUBS
111
112sub _filter_code {
113
114 my $doc = shift;
115 my $nodes_ref = $doc->find('PPI::Token::Comment') || return;
116 my $no_critic = qr{\A \s* \#\# \s* no \s+ critic}mx;
117 my $use_critic = qr{\A \s* \#\# \s* use \s+ critic}mx;
118
119 PRAGMA:
120 for my $pragma ( grep { $_ =~ $no_critic } @{$nodes_ref} ) {
121
122 #Handle single-line usage
123 if ( my $sib = $pragma->sprevious_sibling() ) {
124 if ( $sib->location->[0] == $pragma->location->[0] ) {
125 $sib->statement->delete();
126 next PRAGMA;
127 }
128 }
129
130 SIB:
131 while ( my $sib = $pragma->next_sibling() ) {
132 my $ended = $sib->isa('PPI::Token::Comment') && $sib =~ $use_critic;
133 $sib->delete(); #$sib is undef now.
134 last SIB if $ended;
135 }
136 }
137 continue {
138 $pragma->delete();
139 }
140}
141
142sub _unfix_shebang {
143
144
145 #When you install a script using ExtUtils::MakeMaker or
146 #Module::Build, it inserts some magical code into the top of the
147 #file (just after the shebang). This code allows people to call
148 #your script using a shell, like `sh my_script`. Unfortunately,
149 #this code causes several Policy violations, so we just remove it.
150
151 my $doc = shift;
152 my $first_stmnt = $doc->schild(0) || return;
153
154
155 #Different versions of MakeMaker and Build use slightly differnt
156 #shebang fixing strings. This matches most of the ones I've found
157 #in my own Perl distribution, but it may not be bullet-proof.
158
159 my $fixin_rx = qr{^eval 'exec .* \$0 \${1\+"\$@"}'\s*[\r\n]\s*if.+;};
160 if ( $first_stmnt =~ $fixin_rx ) { $first_stmnt->delete() }
161}
162
1631;
164
165#----------------------------------------------------------------------------
166
167__END__
168
169=pod
170
171=head1 NAME
172
173Perl::Critic - Critique Perl source for style and standards
174
175=head1 SYNOPSIS
176
177 use Perl::Critic;
178
179 #Create Critic and load Policies from default config file
180 $critic = Perl::Critic->new();
181
182 #Create Critic and load only the most important Polices
183 $critic = Perl::Critic->new(-priority => 1);
184
185 #Create Critic and load Policies from specific config file
186 $critic = Perl::Critic->new(-profile => $file);
187
188 #Create Critic and load Policy by hand
189 $critic = Perl::Critic->new(-profile => 'NONE');
190 $critic->add_policy('MyPolicyModule');
191
192 #Analyze code for policy violations
193 @violations = $critic->critique($source_code);
194
195=head1 DESCRIPTION
196
197Perl::Critic is an extensible framework for creating and applying
198coding standards to Perl source code. Essentially, it is a static
199source code analysis engine. Perl::Critic is distributed with a
200number of L<Perl::Critic::Policy> modules that attempt to enforce
201various coding guidelines. Most Policies are based on Damian Conway's
202book B<Perl Best Practices>. You can choose and customize those
203Polices through the Perl::Critic interface. You can also create new
204Policy modules that suit your own tastes.
205
206For a convenient command-line interface to Perl::Critic, see the
207documentation for L<perlcritic>. If you want to integrate
208Perl::Critic with your build process, L<Test::Perl::Critic> provides a
209nice interface that is suitable for test scripts.
210
211=head1 CONSTRUCTOR
212
213=over 8
214
215=item new ( [ -profile => $FILE, -priority => $N, -include => \@PATTERNS, -exclude => \@PATTERNS, -force => 1 ] )
216
217Returns a reference to a new Perl::Critic object. Most arguments are
218just passed directly into L<Perl::Critic::Config>, but I have described
219them here as well. All arguments are optional key-value pairs as
220follows:
221
222B<-profile> is a path to a configuration file. If C<$FILE> is not
223defined, Perl::Critic::Config attempts to find a F<.perlcriticrc>
224configuration file in the current directory, and then in your home
225directory. Alternatively, you can set the C<PERLCRITIC> environment
226variable to point to a file in another location. If a configuration
227file can't be found, or if C<$FILE> is an empty string, then it
228defaults to include all the Policy modules that ship with
229Perl::Critic. See L<"CONFIGURATION"> for more information.
230
231B<-priority> is the maximum priority value of Policies that should be
232added to the Perl::Critic::Config. 1 is the "highest" priority,
233and all numbers larger than 1 have "lower" priority. Once the
234user-preferences have been read from the C<-profile>, All Policies
235that are configured with a priority greater than C<$N> will be removed
236from this Config. For a given C<-profile>, increasing C<$N> will
237result in more Policy violations. The default C<-priority> is 1. See
238L<"CONFIGURATION"> for more information.
239
240B<-include> is a reference to a list of C<@PATTERNS>. Once the
241user-preferences have been read from the C<-profile>, all Policies
242that do not match at least one C<m/$PATTERN/imx> will be removed
243from this Config. Using the C<-include> option causes the <-priority>
244option to be ignored.
245
246B<-exclude> is a reference to a list of C<@PATTERNS>. Once the
247user-preferences have been read from the C<-profile>, all Policies
248that match at least one C<m/$PATTERN/imx> will be removed from
249the Config. Using the C<-exclude> option causes the <-priority>
250option to be ignored. The C<-exclude> patterns are applied after the
251<-include> patterns, therefore, the C<-exclude> patterns take
252precedence.
253
254B<-force> controls whether Perl::Critic observes the magical C<"no
255critic"> pseudo-pragmas in your code. If set to a true value,
256Perl::Critic will analyze all code. If set to a false value (which is
257the default) Perl::Critic will overlook code that is tagged with these
258comments. See L<"BENDING THE RULES"> for more information.
259
260=back
261
262=head1 METHODS
263
264=over 8
265
266=item add_policy( -policy => $STRING [, -config => \%HASH ] )
267
268Loads a Policy into this Critic engine. The engine will attempt to
269C<require> the module named by $STRING and instantiate it. If the
270module fails to load or cannot be instantiated, it will throw a
271warning and return a false value. Otherwise, it returns a reference
272to this Critic engine.
273
274B<-policy> is the name of a L<Perl::Critic::Policy> subclass
275module. The C<'Perl::Critic::Policy'> portion of the name can be
276omitted for brevity. This argument is required.
277
278B<-config> is an optional reference to a hash of Policy configuration
279parameters (Note that this is B<not> a Perl::Critic::Config object). The
280contents of this hash reference will be passed into to the constructor
281of the Policy module. See the documentation in the relevant Policy
282module for a description of the arguments it supports.
283
284=item critique( $source_code )
285
286Runs the C<$source_code> through the Perl::Critic engine using all the
287policies that have been loaded into this engine. If C<$source_code>
288is a scalar reference, then it is treated as string of actual Perl
289code. Otherwise, it is treated as a path to a file containing Perl
290code. Returns a list of L<Perl::Critic::Violation> objects for each
291violation of the loaded Policies. The list is sorted in the order
292that the Violations appear in the code. If there are no violations,
293returns an empty list.
294
295=item policies( void )
296
297Returns a list containing references to all the Policy objects that
298have been loaded into this engine. Objects will be in the order that
299they were loaded.
300
301=back
302
303=head1 CONFIGURATION
304
305The default configuration file is called F<.perlcriticrc>.
306Perl::Critic::Config will look for this file in the current directory
307first, and then in your home directory. Alternatively, you can set
308the PERLCRITIC environment variable to explicitly point to a different
309file in another location. If none of these files exist, and the
310C<-profile> option is not given to the constructor,
311Perl::Critic::Config defaults to include all the policies that are
312shipped with Perl::Critic.
313
314The format of the configuration file is a series of named sections
315that contain key-value pairs separated by '='. Comments should
316start with '#' and can be placed on a separate line or after the
317name-value pairs if you desire. The general recipe is a series of
318blocks like this:
319
320 [Perl::Critic::Policy::Category::PolicyName]
321 priority = 1
322 arg1 = value1
323 arg2 = value2
324
325C<Perl::Critic::Policy::Category::PolicyName> is the full name of a
326module that implements the policy. The Policy modules distributed
327with Perl::Critic have been grouped into categories according to the
328table of contents in Damian Conway's book B<Perl Best Practices>. For
329brevity, you can omit the C<'Perl::Critic::Policy'> part of the
330module name. All Policy modules must be a subclass of
331L<Perl::Critic::Policy>.
332
333C<priority> is the level of importance you wish to assign to this
334policy. 1 is the "highest" priority level, and all numbers greater
335than 1 have increasingly "lower" priority. Only those policies with a
336priority less than or equal to the C<-priority> value given to the
337constructor will be loaded. The priority can be an arbitrarily large
338positive integer. If the priority is not defined, it defaults to 1.
339
340The remaining key-value pairs are configuration parameters for that
341specific Policy and will be passed into the constructor of the
342L<Perl::Critic::Policy> subclass. The constructors for most Policy
343modules do not support arguments, and those that do should have
344reasonable defaults. See the documentation on the appropriate Policy
345module for more details.
346
347By default, all the policies that are distributed with Perl::Critic
348are added to the Config. Rather than assign a priority level to a
349Policy, you can simply "turn off" a Policy by prepending a '-' to the
350name of the module in the config file. In this manner, the Policy
351will never be loaded, regardless of the C<-priority> given to the
352constructor.
353
354
355A simple configuration might look like this:
356
357 #--------------------------------------------------------------
358 # These are really important, so always load them
359
360 [TestingAndDebugging::RequirePackageStricture]
361 priority = 1
362
363 [TestingAndDebugging::RequirePackageWarnings]
364 priority = 1
365
366 #--------------------------------------------------------------
367 # These are less important, so only load when asked
368
369 [Variables::ProhibitPackageVars]
370 priority = 2
371
372 [ControlStructures::ProhibitPostfixControls]
373 priority = 2
374
375 #--------------------------------------------------------------
376 # I do not agree with these, so never load them
377
378 [-NamingConventions::ProhibitMixedCaseVars]
379 [-NamingConventions::ProhibitMixedCaseSubs]
380
381=head1 THE POLICIES
382
383The following Policy modules are distributed with Perl::Critic. The
384Policy modules have been categorized according to the table of
385contents in Damian Conway's book B<Perl Best Practices>. Since most
386coding standards take the form "do this..." or "don't do that...", I
387have adopted the convention of naming each module C<RequireSomething>
388or C<ProhibitSomething>. See the documentation of each module for
389it's specific details.
390
391=head2 L<Perl::Critic::Policy::BuiltinFunctions::ProhibitLvalueSubstr>
392
393Use 4-argument C<substr> instead of writing C<substr($foo, 2, 6) = $bar>
394
395=head2 L<Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect>
396
397Use L<Time::HiRes> instead of C<select(undef, undef, undef, .05)>
398
399=head2 L<Perl::Critic::Policy::BuiltinFunctions::ProhibitStringyEval>
400
401Write C<eval { my $foo; bar($foo) }> instead of C<eval "my $foo; bar($foo);">
402
403=head2 L<Perl::Critic::Policy::BuiltinFunctions::RequireBlockGrep>
404
405Write C<grep { $_ =~ /$pattern/ } @list> instead of C<grep /$pattern/, @list>
406
407=head2 L<Perl::Critic::Policy::BuiltinFunctions::RequireBlockMap>
408
409Write C<map { $_ =~ /$pattern/ } @list> instead of C<map /$pattern/, @list>
410
411=head2 L<Perl::Critic::Policy::BuiltinFunctions::RequireGlobFunction>
412
413Use C<glob q{*}> instead of <*>
414
415=head2 L<Perl::Critic::Policy::ClassHierarchies::ProhibitOneArgBless>
416
417Write C<bless {}, $class;> instead of just C<bless {};>
418
419=head2 L<Perl::Critic::Policy::CodeLayout::ProhibitHardTabs>
420
421Use spaces instead of tabs
422
423=head2 L<Perl::Critic::Policy::CodeLayout::ProhibitParensWithBuiltins>
424
425Write C<open $handle, $path> instead of C<open($handle, $path)>
426
427=head2 L<Perl::Critic::Policy::CodeLayout::ProhibitQuotedWordLists>
428
429Write C< qw(foo bar baz) > instead of C< ('foo', 'bar', 'baz') >
430
431=head2 L<Perl::Critic::Policy::CodeLayout::RequireTidyCode>
432
433Must run code through L<perltidy>
434
435=head2 L<Perl::Critic::Policy::CodeLayout::RequireTrailingCommas>
436
437Put a comma at the end of every multi-line list declaration, including the last one
438
439=head2 L<Perl::Critic::Policy::ControlStructures::ProhibitCascadingIfElse>
440
441Don't write long "if-elsif-elsif-elsif-elsif...else" chains
442
443=head2 L<Perl::Critic::Policy::ControlStructures::ProhibitCStyleForLoops>
444
445Write C<for(0..20)> instead of C<for($i=0; $i<=20; $i++)>
446
447=head2 L<Perl::Critic::Policy::ControlStructures::ProhibitPostfixControls>
448
449Write C<if($condition){ do_something() }> instead of C<do_something() if $condition>
450
451=head2 L<Perl::Critic::Policy::ControlStructures::ProhibitUnlessBlocks>
452
453Write C<if(! $condition)> instead of C<unless($condition)>
454
455=head2 L<Perl::Critic::Policy::ControlStructures::ProhibitUntilBlocks>
456
457Write C<while(! $condition)> instead of C<until($condition)>
458
459=head2 L<Perl::Critic::Policy::InputOutput::ProhibitBacktickOperators>
460
461Discourage stuff like C<@files = `ls $directory`>
462
463=head2 L<Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles>
464
465Write C<open my $fh, q{<}, $filename;> instead of C<open FH, q{<}, $filename;>
466
467=head2 L<Perl::Critic::Policy::InputOutput::ProhibitOneArgSelect>
468
469Never write C<select($fh)>
470
471=head2 L<Perl::Critic::Policy::InputOutput::ProhibitTwoArgOpen>
472
473Write C<open $fh, q{<}, $filename;> instead of C<open $fh, "<$filename";>
474
475=head2 L<Perl::Critic::Policy::Miscellanea::RequireRcsKeywords>
476
477Put source-control keywords in every file.
478
479=head2 L<Perl::Critic::Policy::Modules::ProhibitMultiplePackages>
480
481Put packages (especially subclasses) in separate files
482
483=head2 L<Perl::Critic::Policy::Modules::RequireBarewordIncludes>
484
485Write C<require Module> instead of C<require 'Module.pm'>
486
487=head2 L<Perl::Critic::Policy::Modules::ProhibitSpecificModules>
488
489Don't use evil modules
490
491=head2 L<Perl::Critic::Policy::Modules::RequireExplicitPackage>
492
493Always make the C<package> explicit
494
495=head2 L<Perl::Critic::Policy::Modules::RequireVersionVar>
496
497Give every module a C<$VERSION> number
498
499=head2 L<Perl::Critic::Policy::RegularExpressions::RequireLineBoundaryMatching>
500
501Always use the C</m> modifier with regular expressions
502
503=head2 L<Perl::Critic::Policy::RegularExpressions::RequireExtendedFormatting>
504
505Always use the C</x> modifier with regular expressions
506
507=head2 L<Perl::Critic::Policy::NamingConventions::ProhibitMixedCaseSubs>
508
509Write C<sub my_function{}> instead of C<sub MyFunction{}>
510
511=head2 L<Perl::Critic::Policy::NamingConventions::ProhibitMixedCaseVars>
512
513Write C<$my_variable = 42> instead of C<$MyVariable = 42>
514
515=head2 L<Perl::Critic::Policy::Subroutines::ProhibitBuiltinHomonyms>
516
517Don't declare your own C<open> function.
518
519=head2 L<Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef>
520
521Return failure with bare C<return> instead of C<return undef>
522
523=head2 L<Perl::Critic::Policy::Subroutines::ProhibitSubroutinePrototypes>
524
525Don't write C<sub my_function (@@) {}>
526
527=head2 L<Perl::Critic::Policy::TestingAndDebugging::RequirePackageStricture>
528
529Always C<use strict>
530
531=head2 L<Perl::Critic::Policy::TestingAndDebugging::RequirePackageWarnings>
532
533Always C<use warnings>
534
535=head2 L<Perl::Critic::Policy::ValuesAndExpressions::ProhibitConstantPragma>
536
537Don't C< use constant $FOO => 15 >
538
539=head2 L<Perl::Critic::Policy::ValuesAndExpressions::ProhibitEmptyQuotes>
540
541Write C<q{}> instead of C<''>
542
543=head2 L<Perl::Critic::Policy::ValuesAndExpressions::ProhibitInterpolationOfLiterals>
544
545Always use single quotes for literal strings.
546
547=head2 L<Perl::Critic::Policy::ValuesAndExpressions::ProhibitLeadingZeros>
548
549Write C<oct(755)> instead of C<0755>
550
551=head2 L<Perl::Critic::Policy::ValuesAndExpressions::ProhibitNoisyQuotes>
552
553Use C<q{}> or C<qq{}> instead of quotes for awkward-looking strings
554
555=head2 L<Perl::Critic::Policy::ValuesAndExpressions::RequireInterpolationOfMetachars>
556
557Warns that you might have used single quotes when you really wanted double-quotes.
558
559=head2 L<Perl::Critic::Policy::ValuesAndExpressions::RequireNumberSeparators>
560
561Write C< 141_234_397.0145 > instead of C< 141234397.0145 >
562
563=head2 L<Perl::Critic::Policy::ValuesAndExpressions::RequireQuotedHeredocTerminator>
564
565Write C< print <<'THE_END' > or C< print <<"THE_END" >
566
567=head2 L<Perl::Critic::Policy::ValuesAndExpressions::RequireUpperCaseHeredocTerminator>
568
569Write C< <<'THE_END'; > instead of C< <<'theEnd'; >
570
571=head2 L<Perl::Critic::Policy::Variables::ProhibitLocalVars>
572
573Use C<my> instead of C<local>, except when you have to.
574
575=head2 L<Perl::Critic::Policy::Variables::ProhibitPackageVars>
576
577Eliminate globals declared with C<our> or C<use vars>
578
579=head2 L<Perl::Critic::Policy::Variables::ProhibitPunctuationVars>
580
581Write C<$EVAL_ERROR> instead of C<$@>
582
583=head1 BENDING THE RULES
584
585B<NOTE:> This feature changed in version 0.09 and is not backward
586compatible with earlier versions.
587
588Perl::Critic takes a hard-line approach to your code: either you
589comply or you don't. In the real world, it is not always practical
590(or even possible) to fully comply with coding standards. In such
591cases, it is wise to show that you are knowingly violating the
592standards and that you have a Damn Good Reason (DGR) for doing so.
593
594To help with those situations, you can direct Perl::Critic to ignore
595certain lines or blocks of code by using pseudo-pragmas:
596
597 require 'LegacyLibaray1.pl'; ## no critic
598 require 'LegacyLibrary2.pl'; ## no critic
599
600 for my $element (@list) {
601
602 ## no critic
603
604 $foo = ""; #Violates 'ProhibitEmptyQuotes'
605 $barf = bar() if $foo; #Violates 'ProhibitPostfixControls'
606 #Some more evil code...
607
608 ## use critic
609
610 #Some good code...
611 do_something($_);
612 }
613
614The C<"## no critic"> comments direct Perl::Critic to overlook the
615remaining lines of code until the end of the current block, or until a
616C<"## use critic"> comment is found (whichever comes first). If the
617C<"## no critic"> comment is on the same line as a code statement,
618then only that line of code is overlooked. To direct perlcritic to
619ignore the C<"## no critic"> comments, use the C<-force> option.
620
621Use this feature wisely. C<"## no critic"> should be used in the
622smallest possible scope, or only on individual lines of code. If
623Perl::Critic complains about your code, try and find a compliant
624solution before resorting to this feature.
625
626=head1 EXTENDING THE CRITIC
627
628The modular design of Perl::Critic is intended to facilitate the
629addition of new Policies. To create a new Policy, make a subclass of
630L<Perl::Critic::Policy> and override the C<violates()> method. Your
631module should go somewhere in the Perl::Critic::Policy namespace. To
632use the new Policy, just add it to your F<.perlcriticrc> file. You'll
633need to have some understanding of L<PPI>, but most Policy modules are
634pretty straightforward and only require about 20 lines of code.
635
636If you develop any new Policy modules, feel free to send them to
637<thaljef@cpan.org> and I'll be happy to put them into the Perl::Critic
638distribution.
639
640=head1 IMPORTANT CHANGES
641
642As new Policy modules were added to Perl::Critic, the overall
643performance started to deteriorate rapidly. Since each module would
644traverse the document (several times for some modules), a lot of time
645was spent iterating over the same document nodes. So starting in
646version 0.11, I have switched to a stream-based approach where the
647document is traversed once and every Policy module is tested at each
648node. The result is roughly a 300% improvement.
649
650Unfortunately, Policy modules prior to version 0.11 won't be
651compatible. Hopefully, few people have started creating their own
652Policy modules. Converting them to the stream-based model is fairly
653easy, and actually results in somewhat cleaner code. Look at the
654ControlStrucutres::* modules for some examples.
655
656=head1 PREREQUISITES
657
658Perl::Critic requires the following modules:
659
660L<PPI>
661
662L<Config::Tiny>
663
664L<File::Spec>
665
666L<List::Util>
667
668L<List::MoreUtils>
669
670L<Pod::Usage>
671
672L<Pod::PlainText>
673
674L<IO::String>
675
676L<String::Format>
677
678The following modules are optional, but recommended for complete
679testing:
680
681L<Test::Pod>
682
683L<Test::Pod::Coverage>
684
685L<Test::Perl::Critic>
686
687=head1 BUGS
688
689Scrutinizing Perl code is hard for humans, let alone machines. If you
690find any bugs, particularly false-positives or false-negatives from a
691Perl::Critic::Policy, please submit them to
692L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Perl-Critic>. Thanks.
693
694=head1 CREDITS
695
696Adam Kennedy - For creating L<PPI>, the heart and soul of Perl::Critic.
697
698Damian Conway - For writing B<Perl Best Practices>
699
700Giuseppe Maxia - For all the great ideas and enhancements.
701
702Chris Dolan - For numerous bug reports and suggestions.
703
704Sharon, my wife - For putting up with my all-night code sessions
705
706=head1 AUTHOR
707
708Jeffrey Ryan Thalhammer <thaljef@cpan.org>
709
710=head1 COPYRIGHT
711
712Copyright (c) 2005 Jeffrey Ryan Thalhammer. All rights reserved.
713
714This program is free software; you can redistribute it and/or modify
715it under the same terms as Perl itself. The full text of this license
716can be found in the LICENSE file included with this module.
717
718=cut