.perlcriticrc
changeset 8 7e79c4337135
parent 5 7ce40ff50871
equal deleted inserted replaced
7:5b81887c26e9 8:7e79c4337135
       
     1 # Globals
     1 severity = 2
     2 severity = 2
     2 top = 50
     3 # force = 0
     3 verbose = 9
     4 # only = 0
     4 
     5 # allow-unsafe = 0
     5 [-Perl::Critic::Policy::Miscellanea::ProhibitUnrestrictedNoCritic]
     6 # profile-strictness = warn
       
     7 # color = 0
       
     8 # pager = 
       
     9 pager = $PAGER
       
    10 # top = 0
       
    11 # verbose = 4
       
    12 # include = 
       
    13 # exclude = 
       
    14 # single-policy = 
       
    15 # theme = 
       
    16 # color-severity-highest = bold red
       
    17 # color-severity-high = magenta
       
    18 # color-severity-medium = 
       
    19 # color-severity-low = 
       
    20 # color-severity-lowest = 
       
    21 # program-extensions = 
       
    22 #severity = 2
       
    23 #top = 50
       
    24 #verbose = 9
       
    25 verbose = %f:%l: (%s) %m\n    [%p]\n\n%d\n\n
       
    26 
       
    27 # Use `List::MoreUtils::any' instead of `grep' in boolean context.
       
    28 [BuiltinFunctions::ProhibitBooleanGrep]
       
    29 # set_themes                         = core pbp performance
       
    30 # add_themes                         =
       
    31 # severity                           = 2
       
    32 # maximum_violations_per_document    = no_limit
       
    33 
       
    34 
       
    35 # Map blocks should have a single statement.
       
    36 [BuiltinFunctions::ProhibitComplexMappings]
       
    37 # set_themes                         = complexity core maintenance pbp
       
    38 # add_themes                         =
       
    39 # severity                           = 3
       
    40 # maximum_violations_per_document    = no_limit
       
    41 
       
    42 # The maximum number of statements to allow within a map block.
       
    43 # Minimum value 1. No maximum.
       
    44 # max_statements = 1
       
    45 
       
    46 
       
    47 # Use 4-argument `substr' instead of writing `substr($foo, 2, 6) = $bar'.
       
    48 [BuiltinFunctions::ProhibitLvalueSubstr]
       
    49 # set_themes                         = core maintenance pbp
       
    50 # add_themes                         =
       
    51 # severity                           = 3
       
    52 # maximum_violations_per_document    = no_limit
       
    53 
       
    54 
       
    55 # Forbid $b before $a in sort blocks.
       
    56 [BuiltinFunctions::ProhibitReverseSortBlock]
       
    57 # set_themes                         = core cosmetic pbp
       
    58 # add_themes                         =
       
    59 # severity                           = 1
       
    60 # maximum_violations_per_document    = no_limit
       
    61 
       
    62 
       
    63 # Use Time::HiRes instead of something like `select(undef, undef, undef, .05)'.
       
    64 [BuiltinFunctions::ProhibitSleepViaSelect]
       
    65 # set_themes                         = bugs core pbp
       
    66 # add_themes                         =
       
    67 # severity                           = 5
       
    68 # maximum_violations_per_document    = no_limit
       
    69 
       
    70 
       
    71 # Write `eval { my $foo; bar($foo) }' instead of `eval "my $foo; bar($foo);"'.
       
    72 [BuiltinFunctions::ProhibitStringyEval]
       
    73 # set_themes                         = bugs core pbp
       
    74 # add_themes                         =
       
    75 # severity                           = 5
       
    76 # maximum_violations_per_document    = no_limit
       
    77 
       
    78 # Allow eval of "use" and "require" strings.
       
    79 # allow_includes = 0
       
    80 
       
    81 
       
    82 # Write `split /-/, $string' instead of `split '-', $string'.
       
    83 [BuiltinFunctions::ProhibitStringySplit]
       
    84 # set_themes                         = core cosmetic pbp
       
    85 # add_themes                         =
       
    86 # severity                           = 2
       
    87 # maximum_violations_per_document    = no_limit
       
    88 
       
    89 
       
    90 # Write `eval { $foo->can($name) }' instead of `UNIVERSAL::can($foo, $name)'.
       
    91 [BuiltinFunctions::ProhibitUniversalCan]
       
    92 # set_themes                         = core maintenance
       
    93 # add_themes                         =
       
    94 # severity                           = 3
       
    95 # maximum_violations_per_document    = no_limit
       
    96 
       
    97 
       
    98 # Write `eval { $foo->isa($pkg) }' instead of `UNIVERSAL::isa($foo, $pkg)'.
       
    99 [BuiltinFunctions::ProhibitUniversalIsa]
       
   100 # set_themes                         = core maintenance
       
   101 # add_themes                         =
       
   102 # severity                           = 3
       
   103 # maximum_violations_per_document    = no_limit
       
   104 
       
   105 
       
   106 # Don't use `grep' in void contexts.
       
   107 [BuiltinFunctions::ProhibitVoidGrep]
       
   108 # set_themes                         = core maintenance
       
   109 # add_themes                         =
       
   110 # severity                           = 3
       
   111 # maximum_violations_per_document    = no_limit
       
   112 
       
   113 
       
   114 # Don't use `map' in void contexts.
       
   115 [BuiltinFunctions::ProhibitVoidMap]
       
   116 # set_themes                         = core maintenance
       
   117 # add_themes                         =
       
   118 # severity                           = 3
       
   119 # maximum_violations_per_document    = no_limit
       
   120 
       
   121 
       
   122 # Write `grep { $_ =~ /$pattern/ } @list' instead of `grep /$pattern/, @list'.
       
   123 [BuiltinFunctions::RequireBlockGrep]
       
   124 # set_themes                         = bugs core pbp
       
   125 # add_themes                         =
       
   126 # severity                           = 4
       
   127 # maximum_violations_per_document    = no_limit
       
   128 
       
   129 
       
   130 # Write `map { $_ =~ /$pattern/ } @list' instead of `map /$pattern/, @list'.
       
   131 [BuiltinFunctions::RequireBlockMap]
       
   132 # set_themes                         = bugs core pbp
       
   133 # add_themes                         =
       
   134 # severity                           = 4
       
   135 # maximum_violations_per_document    = no_limit
       
   136 
       
   137 
       
   138 # Use `glob q{*}' instead of <*>.
       
   139 [BuiltinFunctions::RequireGlobFunction]
       
   140 # set_themes                         = bugs core pbp
       
   141 # add_themes                         =
       
   142 # severity                           = 5
       
   143 # maximum_violations_per_document    = no_limit
       
   144 
       
   145 
       
   146 # Sort blocks should have a single statement.
       
   147 [BuiltinFunctions::RequireSimpleSortBlock]
       
   148 # set_themes                         = complexity core maintenance pbp
       
   149 # add_themes                         =
       
   150 # severity                           = 3
       
   151 # maximum_violations_per_document    = no_limit
       
   152 
       
   153 
       
   154 # AUTOLOAD methods should be avoided.
       
   155 [ClassHierarchies::ProhibitAutoloading]
       
   156 # set_themes                         = core maintenance pbp
       
   157 # add_themes                         =
       
   158 # severity                           = 3
       
   159 # maximum_violations_per_document    = no_limit
       
   160 
       
   161 
       
   162 # Employ `use base' instead of `@ISA'.
       
   163 [ClassHierarchies::ProhibitExplicitISA]
       
   164 # set_themes                         = core maintenance pbp
       
   165 # add_themes                         =
       
   166 # severity                           = 3
       
   167 # maximum_violations_per_document    = no_limit
       
   168 
       
   169 
       
   170 # Write `bless {}, $class;' instead of just `bless {};'.
       
   171 [ClassHierarchies::ProhibitOneArgBless]
       
   172 # set_themes                         = bugs core pbp
       
   173 # add_themes                         =
       
   174 # severity                           = 5
       
   175 # maximum_violations_per_document    = no_limit
       
   176 
       
   177 
       
   178 # Use spaces instead of tabs.
       
   179 [CodeLayout::ProhibitHardTabs]
       
   180 # set_themes                         = core cosmetic pbp
       
   181 # add_themes                         =
       
   182 # severity                           = 3
       
   183 # maximum_violations_per_document    = no_limit
       
   184 
       
   185 # Allow hard tabs before first non-whitespace character.
       
   186 # allow_leading_tabs = 1
       
   187 
       
   188 
       
   189 # Write `open $handle, $path' instead of `open($handle, $path)'.
       
   190 [CodeLayout::ProhibitParensWithBuiltins]
       
   191 # set_themes                         = core cosmetic pbp
       
   192 # add_themes                         =
       
   193 # severity                           = 1
       
   194 # maximum_violations_per_document    = no_limit
       
   195 
       
   196 
       
   197 # Write `qw(foo bar baz)' instead of `('foo', 'bar', 'baz')'.
       
   198 [CodeLayout::ProhibitQuotedWordLists]
       
   199 # set_themes                         = core cosmetic
       
   200 # add_themes                         =
       
   201 # severity                           = 2
       
   202 # maximum_violations_per_document    = no_limit
       
   203 
       
   204 # The minimum number of words in a list that will be complained about.
       
   205 # Minimum value 1. No maximum.
       
   206 # min_elements = 2
       
   207 
       
   208 # Complain even if there are non-word characters in the values.
       
   209 # strict = 0
       
   210 
       
   211 
       
   212 # Don't use whitespace at the end of lines.
       
   213 [CodeLayout::ProhibitTrailingWhitespace]
       
   214 # set_themes                         = core maintenance
       
   215 # add_themes                         =
       
   216 # severity                           = 1
       
   217 # maximum_violations_per_document    = no_limit
       
   218 
       
   219 
       
   220 # Use the same newline through the source.
       
   221 [CodeLayout::RequireConsistentNewlines]
       
   222 # set_themes                         = bugs core
       
   223 # add_themes                         =
       
   224 # severity                           = 4
       
   225 # maximum_violations_per_document    = no_limit
       
   226 
       
   227 
       
   228 # Must run code through perltidy.
       
   229 [CodeLayout::RequireTidyCode]
       
   230 # set_themes                         = core cosmetic pbp
       
   231 # add_themes                         =
       
   232 # severity                           = 1
       
   233 # maximum_violations_per_document    = no_limit
       
   234 
       
   235 # The Perl::Tidy configuration file to use, if any.
       
   236 # perltidyrc = 
       
   237 
       
   238 
       
   239 # Put a comma at the end of every multi-line list declaration, including the last one.
       
   240 [CodeLayout::RequireTrailingCommas]
       
   241 # set_themes                         = core cosmetic pbp
       
   242 # add_themes                         =
       
   243 # severity                           = 1
       
   244 # maximum_violations_per_document    = no_limit
       
   245 
       
   246 
       
   247 # Write `for(0..20)' instead of `for($i=0; $i<=20; $i++)'.
       
   248 [ControlStructures::ProhibitCStyleForLoops]
       
   249 # set_themes                         = core maintenance pbp
       
   250 # add_themes                         =
       
   251 # severity                           = 2
       
   252 # maximum_violations_per_document    = no_limit
       
   253 
       
   254 
       
   255 # Don't write long "if-elsif-elsif-elsif-elsif...else" chains.
       
   256 [ControlStructures::ProhibitCascadingIfElse]
       
   257 # set_themes                         = complexity core maintenance pbp
       
   258 # add_themes                         =
       
   259 # severity                           = 3
       
   260 # maximum_violations_per_document    = no_limit
       
   261 
       
   262 # The maximum number of alternatives that will be allowed.
       
   263 # Minimum value 1. No maximum.
       
   264 # max_elsif = 2
       
   265 
       
   266 
       
   267 # Don't write deeply nested loops and conditionals.
       
   268 [ControlStructures::ProhibitDeepNests]
       
   269 # set_themes                         = complexity core maintenance
       
   270 # add_themes                         =
       
   271 # severity                           = 3
       
   272 # maximum_violations_per_document    = no_limit
       
   273 
       
   274 # The maximum number of nested constructs to allow.
       
   275 # Minimum value 1. No maximum.
       
   276 # max_nests = 5
       
   277 
       
   278 
       
   279 # Don't use labels that are the same as the special block names.
       
   280 [ControlStructures::ProhibitLabelsWithSpecialBlockNames]
       
   281 # set_themes                         = bugs core
       
   282 # add_themes                         =
       
   283 # severity                           = 4
       
   284 # maximum_violations_per_document    = no_limit
       
   285 
       
   286 
       
   287 # Don't modify `$_' in list functions.
       
   288 [ControlStructures::ProhibitMutatingListFunctions]
       
   289 # set_themes                         = bugs core pbp
       
   290 # add_themes                         =
       
   291 # severity                           = 5
       
   292 # maximum_violations_per_document    = no_limit
       
   293 
       
   294 # The base set of functions to check.
       
   295 # list_funcs = map grep List::Util::first List::MoreUtils::any List::MoreUtils::all List::MoreUtils::none List::MoreUtils::notall List::MoreUtils::true List::MoreUtils::false List::MoreUtils::firstidx List::MoreUtils::first_index List::MoreUtils::lastidx List::MoreUtils::last_index List::MoreUtils::insert_after List::MoreUtils::insert_after_string
       
   296 
       
   297 # The set of functions to check, in addition to those given in list_funcs.
       
   298 # add_list_funcs = 
       
   299 
       
   300 
       
   301 # Don't use operators like `not', `!~', and `le' within `until' and `unless'.
       
   302 [ControlStructures::ProhibitNegativeExpressionsInUnlessAndUntilConditions]
       
   303 # set_themes                         = core maintenance pbp
       
   304 # add_themes                         =
       
   305 # severity                           = 3
       
   306 # maximum_violations_per_document    = no_limit
       
   307 
       
   308 
       
   309 # Write `if($condition){ do_something() }' instead of `do_something() if $condition'.
     6 [ControlStructures::ProhibitPostfixControls]
   310 [ControlStructures::ProhibitPostfixControls]
     7 allow = if
   311 # set_themes                         = core cosmetic pbp
       
   312 # add_themes                         =
       
   313 # severity                           = 2
       
   314 # maximum_violations_per_document    = no_limit
       
   315 
       
   316 # The permitted postfix controls.
       
   317 # Valid values: for, foreach, if, unless, until, when, while.
       
   318 # allow = 
       
   319 
       
   320 # The exempt flow control functions.
       
   321 # flowcontrol = carp cluck confess croak die exit goto warn
       
   322 
       
   323 
       
   324 # Write `if(! $condition)' instead of `unless($condition)'.
       
   325 [ControlStructures::ProhibitUnlessBlocks]
       
   326 # set_themes                         = core cosmetic pbp
       
   327 # add_themes                         =
       
   328 # severity                           = 2
       
   329 # maximum_violations_per_document    = no_limit
       
   330 
       
   331 
       
   332 # Don't write code after an unconditional `die, exit, or next'.
       
   333 [ControlStructures::ProhibitUnreachableCode]
       
   334 # set_themes                         = bugs core
       
   335 # add_themes                         =
       
   336 # severity                           = 4
       
   337 # maximum_violations_per_document    = no_limit
       
   338 
       
   339 
       
   340 # Write `while(! $condition)' instead of `until($condition)'.
       
   341 [ControlStructures::ProhibitUntilBlocks]
       
   342 # set_themes                         = core cosmetic pbp
       
   343 # add_themes                         =
       
   344 # severity                           = 2
       
   345 # maximum_violations_per_document    = no_limit
       
   346 
       
   347 
       
   348 # Check your spelling.
       
   349 [Documentation::PodSpelling]
       
   350 # set_themes                         = core cosmetic pbp
       
   351 # add_themes                         =
       
   352 # severity                           = 1
       
   353 # maximum_violations_per_document    = no_limit
       
   354 
       
   355 # The command to invoke to check spelling.
       
   356 # spell_command = aspell list
       
   357 
       
   358 # The words to not consider as misspelled.
       
   359 # stop_words = 
       
   360 
       
   361 # A file containing words to not consider as misspelled.
       
   362 # stop_words_file = 
       
   363 
       
   364 
       
   365 # The `=head1 NAME' section should match the package.
       
   366 [Documentation::RequirePackageMatchesPodName]
       
   367 # set_themes                         = core cosmetic
       
   368 # add_themes                         =
       
   369 # severity                           = 1
       
   370 # maximum_violations_per_document    = no_limit
       
   371 
       
   372 
       
   373 # All POD should be after `__END__'.
       
   374 [Documentation::RequirePodAtEnd]
       
   375 # set_themes                         = core cosmetic pbp
       
   376 # add_themes                         =
       
   377 # severity                           = 1
       
   378 # maximum_violations_per_document    = no_limit
       
   379 
       
   380 
       
   381 # Provide text to display with your pod links.
       
   382 [Documentation::RequirePodLinksIncludeText]
       
   383 # set_themes                         = core maintenance
       
   384 # add_themes                         =
       
   385 # severity                           = 2
       
   386 # maximum_violations_per_document    = no_limit
       
   387 
       
   388 # Allow external sections without text.
       
   389 # allow_external_sections = 1
       
   390 
       
   391 # Allow internal sections without text.
       
   392 # allow_internal_sections = 1
       
   393 
       
   394 
       
   395 # Organize your POD into the customary sections.
       
   396 [Documentation::RequirePodSections]
       
   397 # set_themes                         = core maintenance pbp
       
   398 # add_themes                         =
       
   399 # severity                           = 2
       
   400 # maximum_violations_per_document    = no_limit
       
   401 
       
   402 # The sections to require for modules (separated by qr/\s* [|] \s*/xms).
       
   403 # lib_sections = 
       
   404 
       
   405 # The sections to require for programs (separated by qr/\s* [|] \s*/xms).
       
   406 # script_sections = 
       
   407 
       
   408 # The origin of sections to use.
       
   409 # Valid values: book, book_first_edition, module_starter_pbp, module_starter_pbp_0_0_3.
       
   410 # source = book_first_edition
       
   411 
       
   412 # The spelling of sections to use.
       
   413 # Valid values: en_AU, en_US.
       
   414 # language = 
       
   415 
       
   416 
       
   417 # Use functions from Carp instead of `warn' or `die'.
       
   418 [ErrorHandling::RequireCarping]
       
   419 # set_themes                         = core maintenance pbp
       
   420 # add_themes                         =
       
   421 # severity                           = 3
       
   422 # maximum_violations_per_document    = no_limit
       
   423 
       
   424 # Don't complain about die or warn if the message ends in a newline.
       
   425 # allow_messages_ending_with_newlines = 1
       
   426 
       
   427 # Don't complain about die or warn in main::, unless in a subroutine.
       
   428 # allow_in_main_unless_in_subroutine = 0
       
   429 
       
   430 
       
   431 # You can't depend upon the value of `$@'/`$EVAL_ERROR' to tell whether an `eval' failed.
       
   432 [ErrorHandling::RequireCheckingReturnValueOfEval]
       
   433 # set_themes                         = bugs core
       
   434 # add_themes                         =
       
   435 # severity                           = 3
       
   436 # maximum_violations_per_document    = no_limit
       
   437 
       
   438 
       
   439 # Discourage stuff like `@files = `ls $directory`'.
       
   440 [InputOutput::ProhibitBacktickOperators]
       
   441 # set_themes                         = core maintenance
       
   442 # add_themes                         =
       
   443 # severity                           = 3
       
   444 # maximum_violations_per_document    = no_limit
       
   445 
       
   446 # Allow backticks everywhere except in void contexts.
       
   447 # only_in_void_context = 
       
   448 
       
   449 
       
   450 # Write `open my $fh, q{<}, $filename;' instead of `open FH, q{<}, $filename;'.
       
   451 [InputOutput::ProhibitBarewordFileHandles]
       
   452 # set_themes                         = bugs core pbp
       
   453 # add_themes                         =
       
   454 # severity                           = 5
       
   455 # maximum_violations_per_document    = no_limit
       
   456 
       
   457 
       
   458 # Use "<>" or "<ARGV>" or a prompting module instead of "<STDIN>".
       
   459 [InputOutput::ProhibitExplicitStdin]
       
   460 # set_themes                         = core maintenance pbp
       
   461 # add_themes                         =
       
   462 # severity                           = 4
       
   463 # maximum_violations_per_document    = no_limit
       
   464 
       
   465 
       
   466 # Use prompt() instead of -t.
       
   467 [InputOutput::ProhibitInteractiveTest]
       
   468 # set_themes                         = bugs core pbp
       
   469 # add_themes                         =
       
   470 # severity                           = 5
       
   471 # maximum_violations_per_document    = no_limit
       
   472 
       
   473 
       
   474 # Use `local $/ = undef' or File::Slurp instead of joined readline.
       
   475 [InputOutput::ProhibitJoinedReadline]
       
   476 # set_themes                         = core pbp performance
       
   477 # add_themes                         =
       
   478 # severity                           = 3
       
   479 # maximum_violations_per_document    = no_limit
       
   480 
       
   481 
       
   482 # Never write `select($fh)'.
       
   483 [InputOutput::ProhibitOneArgSelect]
       
   484 # set_themes                         = bugs core pbp
       
   485 # add_themes                         =
       
   486 # severity                           = 4
       
   487 # maximum_violations_per_document    = no_limit
       
   488 
       
   489 
       
   490 # Write `while( $line = <> ){...}' instead of `for(<>){...}'.
       
   491 [InputOutput::ProhibitReadlineInForLoop]
       
   492 # set_themes                         = bugs core pbp
       
   493 # add_themes                         =
       
   494 # severity                           = 4
       
   495 # maximum_violations_per_document    = no_limit
       
   496 
       
   497 
       
   498 # Write `open $fh, q{<}, $filename;' instead of `open $fh, "<$filename";'.
       
   499 [InputOutput::ProhibitTwoArgOpen]
       
   500 # set_themes                         = bugs core pbp security
       
   501 # add_themes                         =
       
   502 # severity                           = 5
       
   503 # maximum_violations_per_document    = no_limit
       
   504 
       
   505 
       
   506 # Write `print {$FH} $foo, $bar;' instead of `print $FH $foo, $bar;'.
       
   507 [InputOutput::RequireBracedFileHandleWithPrint]
       
   508 # set_themes                         = core cosmetic pbp
       
   509 # add_themes                         =
       
   510 # severity                           = 1
       
   511 # maximum_violations_per_document    = no_limit
       
   512 
       
   513 
       
   514 # Close filehandles as soon as possible after opening them.
       
   515 [InputOutput::RequireBriefOpen]
       
   516 # set_themes                         = core maintenance pbp
       
   517 # add_themes                         =
       
   518 # severity                           = 4
       
   519 # maximum_violations_per_document    = no_limit
       
   520 
       
   521 # The maximum number of lines between an open() and a close().
       
   522 # Minimum value 1. No maximum.
       
   523 # lines = 9
       
   524 
       
   525 
       
   526 # Write `my $error = close $fh;' instead of `close $fh;'.
       
   527 [InputOutput::RequireCheckedClose]
       
   528 # set_themes                         = core maintenance
       
   529 # add_themes                         =
       
   530 # severity                           = 2
       
   531 # maximum_violations_per_document    = no_limit
       
   532 
       
   533 
       
   534 # Write `my $error = open $fh, $mode, $filename;' instead of `open $fh, $mode, $filename;'.
       
   535 [InputOutput::RequireCheckedOpen]
       
   536 # set_themes                         = core maintenance
       
   537 # add_themes                         =
       
   538 # severity                           = 3
       
   539 # maximum_violations_per_document    = no_limit
       
   540 
       
   541 
       
   542 # Return value of flagged function ignored.
       
   543 [InputOutput::RequireCheckedSyscalls]
       
   544 # set_themes                         = core maintenance
       
   545 # add_themes                         =
       
   546 # severity                           = 1
       
   547 # maximum_violations_per_document    = no_limit
       
   548 
       
   549 # The set of functions to require checking the return value of.
       
   550 # functions = open close print say
       
   551 
       
   552 # The set of functions to not require checking the return value of.
       
   553 # exclude_functions = 
       
   554 
       
   555 
       
   556 # Write `open $fh, q{<:encoding(UTF-8)}, $filename;' instead of `open $fh, q{{<:utf8}, $filename;'.
       
   557 [InputOutput::RequireEncodingWithUTF8Layer]
       
   558 # set_themes                         = bugs core security
       
   559 # add_themes                         =
       
   560 # severity                           = 5
       
   561 # maximum_violations_per_document    = no_limit
       
   562 
       
   563 
       
   564 # Do not use `format'.
       
   565 [Miscellanea::ProhibitFormats]
       
   566 # set_themes                         = core maintenance pbp
       
   567 # add_themes                         =
       
   568 # severity                           = 3
       
   569 # maximum_violations_per_document    = no_limit
       
   570 
       
   571 
       
   572 # Do not use `tie'.
       
   573 [Miscellanea::ProhibitTies]
       
   574 # set_themes                         = core maintenance pbp
       
   575 # add_themes                         =
       
   576 # severity                           = 2
       
   577 # maximum_violations_per_document    = no_limit
       
   578 
       
   579 
       
   580 # Forbid a bare `## no critic'
       
   581 [Miscellanea::ProhibitUnrestrictedNoCritic]
       
   582 # set_themes                         = core maintenance
       
   583 # add_themes                         =
       
   584 # severity                           = 3
       
   585 # maximum_violations_per_document    = no_limit
       
   586 
       
   587 
       
   588 # Remove ineffective "## no critic" annotations.
       
   589 [Miscellanea::ProhibitUselessNoCritic]
       
   590 # set_themes                         = core maintenance
       
   591 # add_themes                         =
       
   592 # severity                           = 2
       
   593 # maximum_violations_per_document    = no_limit
       
   594 
       
   595 
       
   596 # Export symbols via `@EXPORT_OK' or `%EXPORT_TAGS' instead of `@EXPORT'.
       
   597 [Modules::ProhibitAutomaticExportation]
       
   598 # set_themes                         = bugs core
       
   599 # add_themes                         =
       
   600 # severity                           = 4
       
   601 # maximum_violations_per_document    = no_limit
       
   602 
       
   603 
       
   604 # Avoid putting conditional logic around compile-time includes.
       
   605 [Modules::ProhibitConditionalUseStatements]
       
   606 # set_themes                         = bugs core
       
   607 # add_themes                         =
       
   608 # severity                           = 3
       
   609 # maximum_violations_per_document    = no_limit
       
   610 
       
   611 
       
   612 # Ban modules that aren't blessed by your shop.
       
   613 [Modules::ProhibitEvilModules]
       
   614 # set_themes                         = bugs core
       
   615 # add_themes                         =
       
   616 # severity                           = 5
       
   617 # maximum_violations_per_document    = no_limit
       
   618 
       
   619 # The names of or patterns for modules to forbid.
       
   620 # modules = Class::ISA {Found use of Class::ISA. This module is deprecated by the Perl 5 Porters.} Pod::Plainer {Found use of Pod::Plainer. This module is deprecated by the Perl 5 Porters.} Shell {Found use of Shell. This module is deprecated by the Perl 5 Porters.} Switch {Found use of Switch. This module is deprecated by the Perl 5 Porters.}
       
   621 
       
   622 # A file containing names of or patterns for modules to forbid.
       
   623 # modules_file = 
       
   624 
       
   625 
       
   626 # Minimize complexity in code that is outside of subroutines.
       
   627 [Modules::ProhibitExcessMainComplexity]
       
   628 # set_themes                         = complexity core maintenance
       
   629 # add_themes                         =
       
   630 # severity                           = 3
       
   631 # maximum_violations_per_document    = no_limit
       
   632 
       
   633 # The maximum complexity score allowed.
       
   634 # Minimum value 1. No maximum.
       
   635 # max_mccabe = 20
       
   636 
       
   637 
       
   638 # Put packages (especially subclasses) in separate files.
       
   639 [Modules::ProhibitMultiplePackages]
       
   640 # set_themes                         = bugs core
       
   641 # add_themes                         =
       
   642 # severity                           = 4
       
   643 # maximum_violations_per_document    = no_limit
       
   644 
       
   645 
       
   646 # Write `require Module' instead of `require 'Module.pm''.
       
   647 [Modules::RequireBarewordIncludes]
       
   648 # set_themes                         = core portability
       
   649 # add_themes                         =
       
   650 # severity                           = 5
       
   651 # maximum_violations_per_document    = no_limit
       
   652 
       
   653 
       
   654 # End each module with an explicitly `1;' instead of some funky expression.
       
   655 [Modules::RequireEndWithOne]
       
   656 # set_themes                         = bugs core pbp
       
   657 # add_themes                         =
       
   658 # severity                           = 4
       
   659 # maximum_violations_per_document    = no_limit
       
   660 
       
   661 
       
   662 # Always make the `package' explicit.
       
   663 [Modules::RequireExplicitPackage]
       
   664 # set_themes                         = bugs core
       
   665 # add_themes                         =
       
   666 # severity                           = 4
       
   667 # maximum_violations_per_document    = 1
       
   668 
       
   669 # Don't require programs to contain a package statement.
       
   670 # exempt_scripts = 1
       
   671 
       
   672 # Allow the specified modules to be imported outside a package.
       
   673 # allow_import_of = 
       
   674 
       
   675 
       
   676 # Package declaration must match filename.
       
   677 [Modules::RequireFilenameMatchesPackage]
       
   678 # set_themes                         = bugs core
       
   679 # add_themes                         =
       
   680 # severity                           = 5
       
   681 # maximum_violations_per_document    = no_limit
       
   682 
       
   683 
       
   684 # `use English' must be passed a `-no_match_vars' argument.
       
   685 [Modules::RequireNoMatchVarsWithUseEnglish]
       
   686 # set_themes                         = core performance
       
   687 # add_themes                         =
       
   688 # severity                           = 2
       
   689 # maximum_violations_per_document    = no_limit
       
   690 
       
   691 
       
   692 # Give every module a `$VERSION' number.
       
   693 [Modules::RequireVersionVar]
       
   694 # set_themes                         = core pbp readability
       
   695 # add_themes                         =
       
   696 # severity                           = 2
       
   697 # maximum_violations_per_document    = no_limit
       
   698 
       
   699 
       
   700 # Distinguish different program components by case.
       
   701 [NamingConventions::Capitalization]
       
   702 # set_themes                         = core cosmetic pbp
       
   703 # add_themes                         =
       
   704 # severity                           = 1
       
   705 # maximum_violations_per_document    = no_limit
       
   706 
       
   707 # How package name components should be capitalized.  Valid values are :single_case, :all_lower, :all_upper:, :starts_with_lower, :starts_with_upper, :no_restriction, or a regex.
       
   708 # packages = :starts_with_upper
       
   709 
       
   710 # Package names that are exempt from capitalization rules.  The values here are regexes that will be surrounded by \A and \z.
       
   711 # package_exemptions = main
       
   712 
       
   713 # How subroutine names should be capitalized.  Valid values are :single_case, :all_lower, :all_upper, :starts_with_lower, :starts_with_upper, :no_restriction, or a regex.
       
   714 # subroutines = :single_case
       
   715 
       
   716 # Subroutine names that are exempt from capitalization rules.  The values here are regexes that will be surrounded by \A and \z.
       
   717 # subroutine_exemptions = AUTOLOAD BUILD BUILDARGS CLEAR CLOSE DELETE DEMOLISH DESTROY EXISTS EXTEND FETCH FETCHSIZE FIRSTKEY GETC NEXTKEY POP PRINT PRINTF PUSH READ READLINE SCALAR SHIFT SPLICE STORE STORESIZE TIEARRAY TIEHANDLE TIEHASH TIESCALAR UNSHIFT UNTIE WRITE
       
   718 
       
   719 # How local lexical variables names should be capitalized.  Valid values are :single_case, :all_lower, :all_upper, :starts_with_lower, :starts_with_upper, :no_restriction, or a regex.
       
   720 # local_lexical_variables = :single_case
       
   721 
       
   722 # Local lexical variable names that are exempt from capitalization rules.  The values here are regexes that will be surrounded by \A and \z.
       
   723 # local_lexical_variable_exemptions = 
       
   724 
       
   725 # How lexical variables that are scoped to a subset of subroutines, should be capitalized.  Valid values are :single_case, :all_lower, :all_upper, :starts_with_lower, :starts_with_upper, :no_restriction, or a regex.
       
   726 # scoped_lexical_variables = :single_case
       
   727 
       
   728 # Names for variables in anonymous blocks that are exempt from capitalization rules.  The values here are regexes that will be surrounded by \A and \z.
       
   729 # scoped_lexical_variable_exemptions = 
       
   730 
       
   731 # How lexical variables at the file level should be capitalized.  Valid values are :single_case, :all_lower, :all_upper, :starts_with_lower, :starts_with_upper, :no_restriction, or a regex.
       
   732 # file_lexical_variables = :single_case
       
   733 
       
   734 # File-scope lexical variable names that are exempt from capitalization rules.  The values here are regexes that will be surrounded by \A and \z.
       
   735 # file_lexical_variable_exemptions = 
       
   736 
       
   737 # How global (package) variables should be capitalized.  Valid values are :single_case, :all_lower, :all_upper, :starts_with_lower, :starts_with_upper, :no_restriction, or a regex.
       
   738 # global_variables = :single_case
       
   739 
       
   740 # Global variable names that are exempt from capitalization rules.  The values here are regexes that will be surrounded by \A and \z.
       
   741 # global_variable_exemptions = \$VERSION @ISA @EXPORT(?:_OK)? %EXPORT_TAGS \$AUTOLOAD %ENV %SIG \$TODO
       
   742 
       
   743 # How constant names should be capitalized.  Valid values are :single_case, :all_lower, :all_upper, :starts_with_lower, :starts_with_upper, :no_restriction, or a regex.
       
   744 # constants = :all_upper
       
   745 
       
   746 # Constant names that are exempt from capitalization rules.  The values here are regexes that will be surrounded by \A and \z.
       
   747 # constant_exemptions = 
       
   748 
       
   749 # How labels should be capitalized.  Valid values are :single_case, :all_lower, :all_upper, :starts_with_lower, :starts_with_upper, :no_restriction, or a regex.
       
   750 # labels = :all_upper
       
   751 
       
   752 # Labels that are exempt from capitalization rules.  The values here are regexes that will be surrounded by \A and \z.
       
   753 # label_exemptions = 
       
   754 
       
   755 
       
   756 # Don't use vague variable or subroutine names like 'last' or 'record'.
       
   757 [NamingConventions::ProhibitAmbiguousNames]
       
   758 # set_themes                         = core maintenance pbp
       
   759 # add_themes                         =
       
   760 # severity                           = 3
       
   761 # maximum_violations_per_document    = no_limit
       
   762 
       
   763 # The variable names that are not to be allowed.
       
   764 # forbid = abstract bases close contract last left no record right second set
       
   765 
       
   766 
       
   767 # Prohibit indirect object call syntax.
       
   768 [Objects::ProhibitIndirectSyntax]
       
   769 # set_themes                         = core maintenance pbp
       
   770 # add_themes                         =
       
   771 # severity                           = 4
       
   772 # maximum_violations_per_document    = no_limit
       
   773 
       
   774 # Indirect method syntax is forbidden for these methods.
       
   775 # Values that are always included: new.
       
   776 # forbid = 
       
   777 
       
   778 
       
   779 # Write `@{ $array_ref }' instead of `@$array_ref'.
       
   780 [References::ProhibitDoubleSigils]
       
   781 # set_themes                         = core cosmetic pbp
       
   782 # add_themes                         =
       
   783 # severity                           = 2
       
   784 # maximum_violations_per_document    = no_limit
       
   785 
       
   786 
       
   787 # Capture variable used outside conditional.
       
   788 [RegularExpressions::ProhibitCaptureWithoutTest]
       
   789 # set_themes                         = core maintenance pbp
       
   790 # add_themes                         =
       
   791 # severity                           = 3
       
   792 # maximum_violations_per_document    = no_limit
       
   793 
       
   794 # Names of ways to generate exceptions.
       
   795 # Values that are always included: confess, croak, die.
       
   796 # exception_source = 
       
   797 
       
   798 
       
   799 # Split long regexps into smaller `qr//' chunks.
       
   800 [RegularExpressions::ProhibitComplexRegexes]
       
   801 # set_themes                         = core maintenance pbp
       
   802 # add_themes                         =
       
   803 # severity                           = 3
       
   804 # maximum_violations_per_document    = no_limit
       
   805 
       
   806 # The maximum number of characters to allow in a regular expression.
       
   807 # Minimum value 1. No maximum.
       
   808 # max_characters = 60
       
   809 
       
   810 
       
   811 # Use named character classes instead of explicit character lists.
       
   812 [RegularExpressions::ProhibitEnumeratedClasses]
       
   813 # set_themes                         = core cosmetic pbp unicode
       
   814 # add_themes                         =
       
   815 # severity                           = 1
       
   816 # maximum_violations_per_document    = no_limit
       
   817 
       
   818 
       
   819 # Use character classes for literal meta-characters instead of escapes.
       
   820 [RegularExpressions::ProhibitEscapedMetacharacters]
       
   821 # set_themes                         = core cosmetic pbp
       
   822 # add_themes                         =
       
   823 # severity                           = 1
       
   824 # maximum_violations_per_document    = no_limit
       
   825 
       
   826 
       
   827 # Use `eq' or hash instead of fixed-pattern regexps.
       
   828 [RegularExpressions::ProhibitFixedStringMatches]
       
   829 # set_themes                         = core pbp performance
       
   830 # add_themes                         =
       
   831 # severity                           = 2
       
   832 # maximum_violations_per_document    = no_limit
       
   833 
       
   834 
       
   835 # Use `[abc]' instead of `a|b|c'.
       
   836 [RegularExpressions::ProhibitSingleCharAlternation]
       
   837 # set_themes                         = core pbp performance
       
   838 # add_themes                         =
       
   839 # severity                           = 1
       
   840 # maximum_violations_per_document    = no_limit
       
   841 
       
   842 
       
   843 # Only use a capturing group if you plan to use the captured value.
       
   844 [RegularExpressions::ProhibitUnusedCapture]
       
   845 # set_themes                         = core maintenance pbp
       
   846 # add_themes                         =
       
   847 # severity                           = 3
       
   848 # maximum_violations_per_document    = no_limit
       
   849 
       
   850 
       
   851 # Use only `//' or `{}' to delimit regexps.
       
   852 [RegularExpressions::ProhibitUnusualDelimiters]
       
   853 # set_themes                         = core cosmetic pbp
       
   854 # add_themes                         =
       
   855 # severity                           = 1
       
   856 # maximum_violations_per_document    = no_limit
       
   857 
       
   858 # In addition to allowing '{}', allow '()', '[]', and '{}'.
       
   859 # allow_all_brackets = 
       
   860 
       
   861 
       
   862 # Use `{' and `}' to delimit multi-line regexps.
       
   863 [RegularExpressions::RequireBracesForMultiline]
       
   864 # set_themes                         = core cosmetic pbp
       
   865 # add_themes                         =
       
   866 # severity                           = 1
       
   867 # maximum_violations_per_document    = no_limit
       
   868 
       
   869 # In addition to allowing '{}', allow '()', '[]', and '{}'.
       
   870 # allow_all_brackets = 
       
   871 
       
   872 
       
   873 # Always use the `/s' modifier with regular expressions.
       
   874 [RegularExpressions::RequireDotMatchAnything]
       
   875 # set_themes                         = core cosmetic pbp
       
   876 # add_themes                         =
       
   877 # severity                           = 2
       
   878 # maximum_violations_per_document    = no_limit
       
   879 
       
   880 
       
   881 # Always use the `/x' modifier with regular expressions.
       
   882 [RegularExpressions::RequireExtendedFormatting]
       
   883 # set_themes                         = core maintenance pbp
       
   884 # add_themes                         =
       
   885 # severity                           = 3
       
   886 # maximum_violations_per_document    = no_limit
       
   887 
       
   888 # The number of characters that a regular expression must contain before this policy will complain.
       
   889 # Minimum value 0. No maximum.
       
   890 # minimum_regex_length_to_complain_about = 0
       
   891 
       
   892 # Should regexes that only contain whitespace and word characters be complained about?.
       
   893 # strict = 0
       
   894 
       
   895 
       
   896 # Always use the `/m' modifier with regular expressions.
       
   897 [RegularExpressions::RequireLineBoundaryMatching]
       
   898 # set_themes                         = core cosmetic pbp
       
   899 # add_themes                         =
       
   900 # severity                           = 2
       
   901 # maximum_violations_per_document    = no_limit
       
   902 
       
   903 
       
   904 # Don't call functions with a leading ampersand sigil.
       
   905 [Subroutines::ProhibitAmpersandSigils]
       
   906 # set_themes                         = core maintenance pbp
       
   907 # add_themes                         =
       
   908 # severity                           = 2
       
   909 # maximum_violations_per_document    = no_limit
       
   910 
       
   911 
       
   912 # Don't declare your own `open' function.
       
   913 [Subroutines::ProhibitBuiltinHomonyms]
       
   914 # set_themes                         = bugs core pbp
       
   915 # add_themes                         =
       
   916 # severity                           = 4
       
   917 # maximum_violations_per_document    = no_limit
       
   918 
       
   919 
       
   920 # Minimize complexity by factoring code into smaller subroutines.
       
   921 [Subroutines::ProhibitExcessComplexity]
       
   922 # set_themes                         = complexity core maintenance
       
   923 # add_themes                         =
       
   924 # severity                           = 3
       
   925 # maximum_violations_per_document    = no_limit
       
   926 
       
   927 # The maximum complexity score allowed.
       
   928 # Minimum value 1. No maximum.
       
   929 # max_mccabe = 20
       
   930 
       
   931 
       
   932 # Return failure with bare `return' instead of `return undef'.
       
   933 [Subroutines::ProhibitExplicitReturnUndef]
       
   934 # set_themes                         = bugs core pbp
       
   935 # add_themes                         =
       
   936 # severity                           = 5
       
   937 # maximum_violations_per_document    = no_limit
       
   938 
       
   939 
       
   940 # Too many arguments.
       
   941 [Subroutines::ProhibitManyArgs]
       
   942 # set_themes                         = core maintenance pbp
       
   943 # add_themes                         =
       
   944 # severity                           = 3
       
   945 # maximum_violations_per_document    = no_limit
       
   946 
       
   947 # The maximum number of arguments to allow a subroutine to have.
       
   948 # Minimum value 1. No maximum.
       
   949 # max_arguments = 5
       
   950 
       
   951 
       
   952 # `sub never { sub correct {} }'.
       
   953 [Subroutines::ProhibitNestedSubs]
       
   954 # set_themes                         = bugs core
       
   955 # add_themes                         =
       
   956 # severity                           = 5
       
   957 # maximum_violations_per_document    = no_limit
       
   958 
       
   959 
       
   960 # Behavior of `sort' is not defined if called in scalar context.
       
   961 [Subroutines::ProhibitReturnSort]
       
   962 # set_themes                         = bugs core
       
   963 # add_themes                         =
       
   964 # severity                           = 5
       
   965 # maximum_violations_per_document    = no_limit
       
   966 
       
   967 
       
   968 # Don't write `sub my_function (@@) {}'.
       
   969 [Subroutines::ProhibitSubroutinePrototypes]
       
   970 # set_themes                         = bugs core pbp
       
   971 # add_themes                         =
       
   972 # severity                           = 5
       
   973 # maximum_violations_per_document    = no_limit
       
   974 
       
   975 
       
   976 # Prevent unused private subroutines.
       
   977 [Subroutines::ProhibitUnusedPrivateSubroutines]
       
   978 # set_themes                         = core maintenance
       
   979 # add_themes                         =
       
   980 # severity                           = 3
       
   981 # maximum_violations_per_document    = no_limit
       
   982 
       
   983 # Pattern that determines what a private subroutine is.
       
   984 # private_name_regex = \b_\w+\b
       
   985 
       
   986 # Subroutines matching the private name regex to allow under this policy.
       
   987 # allow = 
       
   988 
       
   989 
       
   990 # Prevent access to private subs in other packages.
       
   991 [Subroutines::ProtectPrivateSubs]
       
   992 # set_themes                         = core maintenance
       
   993 # add_themes                         =
       
   994 # severity                           = 3
       
   995 # maximum_violations_per_document    = no_limit
       
   996 
       
   997 # Pattern that determines what a private subroutine is.
       
   998 # private_name_regex = \b_\w+\b
       
   999 
       
  1000 # Subroutines matching the private name regex to allow under this policy.
       
  1001 # Values that are always included: POSIX::_PC_CHOWN_RESTRICTED, POSIX::_PC_LINK_MAX, POSIX::_PC_MAX_CANON, POSIX::_PC_MAX_INPUT, POSIX::_PC_NAME_MAX, POSIX::_PC_NO_TRUNC, POSIX::_PC_PATH_MAX, POSIX::_PC_PIPE_BUF, POSIX::_PC_VDISABLE, POSIX::_POSIX_ARG_MAX, POSIX::_POSIX_CHILD_MAX, POSIX::_POSIX_CHOWN_RESTRICTED, POSIX::_POSIX_JOB_CONTROL, POSIX::_POSIX_LINK_MAX, POSIX::_POSIX_MAX_CANON, POSIX::_POSIX_MAX_INPUT, POSIX::_POSIX_NAME_MAX, POSIX::_POSIX_NGROUPS_MAX, POSIX::_POSIX_NO_TRUNC, POSIX::_POSIX_OPEN_MAX, POSIX::_POSIX_PATH_MAX, POSIX::_POSIX_PIPE_BUF, POSIX::_POSIX_SAVED_IDS, POSIX::_POSIX_SSIZE_MAX, POSIX::_POSIX_STREAM_MAX, POSIX::_POSIX_TZNAME_MAX, POSIX::_POSIX_VDISABLE, POSIX::_POSIX_VERSION, POSIX::_SC_ARG_MAX, POSIX::_SC_CHILD_MAX, POSIX::_SC_CLK_TCK, POSIX::_SC_JOB_CONTROL, POSIX::_SC_NGROUPS_MAX, POSIX::_SC_OPEN_MAX, POSIX::_SC_PAGESIZE, POSIX::_SC_SAVED_IDS, POSIX::_SC_STREAM_MAX, POSIX::_SC_TZNAME_MAX, POSIX::_SC_VERSION, POSIX::_exit.
       
  1002 # allow = 
       
  1003 
       
  1004 
       
  1005 # Always unpack `@_' first.
       
  1006 [Subroutines::RequireArgUnpacking]
       
  1007 # set_themes                         = core maintenance pbp
       
  1008 # add_themes                         =
       
  1009 # severity                           = 4
       
  1010 # maximum_violations_per_document    = no_limit
       
  1011 
       
  1012 # The number of statements to allow without unpacking.
       
  1013 # Minimum value 0. No maximum.
       
  1014 # short_subroutine_statements = 0
       
  1015 
       
  1016 # Should unpacking from array slices and elements be allowed?.
       
  1017 # allow_subscripts = 0
       
  1018 
       
  1019 # Allow the usual delegation idiom to these namespaces/subroutines.
       
  1020 # Values that are always included: NEXT::, SUPER::.
       
  1021 # allow_delegation_to = 
       
  1022 
       
  1023 
       
  1024 # End every path through a subroutine with an explicit `return' statement.
       
  1025 [Subroutines::RequireFinalReturn]
       
  1026 # set_themes                         = bugs core pbp
       
  1027 # add_themes                         =
       
  1028 # severity                           = 4
       
  1029 # maximum_violations_per_document    = no_limit
       
  1030 
       
  1031 # The additional subroutines to treat as terminal.
       
  1032 # Values that are always included: Carp::confess, Carp::croak, confess, croak, die, exec, exit, throw.
       
  1033 # terminal_funcs = 
       
  1034 
       
  1035 
       
  1036 # Prohibit various flavors of `no strict'.
       
  1037 [TestingAndDebugging::ProhibitNoStrict]
       
  1038 # set_themes                         = bugs core pbp
       
  1039 # add_themes                         =
       
  1040 # severity                           = 5
       
  1041 # maximum_violations_per_document    = no_limit
       
  1042 
       
  1043 # Allow vars, subs, and/or refs.
       
  1044 # allow = 
       
  1045 
       
  1046 
       
  1047 # Prohibit various flavors of `no warnings'.
       
  1048 [TestingAndDebugging::ProhibitNoWarnings]
       
  1049 # set_themes                         = bugs core pbp
       
  1050 # add_themes                         =
       
  1051 # severity                           = 4
       
  1052 # maximum_violations_per_document    = no_limit
       
  1053 
       
  1054 # Permitted warning categories.
       
  1055 # allow = 
       
  1056 
       
  1057 # Allow "no warnings" if it restricts the kinds of warnings that are turned off.
       
  1058 # allow_with_category_restriction = 0
       
  1059 
       
  1060 
       
  1061 # Don't turn off strict for large blocks of code.
       
  1062 [TestingAndDebugging::ProhibitProlongedStrictureOverride]
       
  1063 # set_themes                         = bugs core pbp
       
  1064 # add_themes                         =
       
  1065 # severity                           = 4
       
  1066 # maximum_violations_per_document    = no_limit
       
  1067 
       
  1068 # The maximum number of statements in a no strict block.
       
  1069 # Minimum value 1. No maximum.
       
  1070 # statements = 3
       
  1071 
       
  1072 
       
  1073 # Tests should all have labels.
       
  1074 [TestingAndDebugging::RequireTestLabels]
       
  1075 # set_themes                         = core maintenance tests
       
  1076 # add_themes                         =
       
  1077 # severity                           = 3
       
  1078 # maximum_violations_per_document    = no_limit
       
  1079 
       
  1080 # The additional modules to require labels for.
       
  1081 # Values that are always included: Test::More.
       
  1082 # modules = 
       
  1083 
       
  1084 
       
  1085 # Always `use strict'.
       
  1086 [TestingAndDebugging::RequireUseStrict]
       
  1087 # set_themes                         = bugs core pbp
       
  1088 # add_themes                         =
       
  1089 # severity                           = 5
       
  1090 # maximum_violations_per_document    = 1
       
  1091 
       
  1092 # The additional modules to treat as equivalent to "strict".
       
  1093 # Values that are always included: Moose, Moose::Role, Moose::Util::TypeConstraints, strict.
       
  1094 # equivalent_modules = 
       
  1095 
       
  1096 
       
  1097 # Always `use warnings'.
       
  1098 [TestingAndDebugging::RequireUseWarnings]
       
  1099 # set_themes                         = bugs core pbp
       
  1100 # add_themes                         =
       
  1101 # severity                           = 4
       
  1102 # maximum_violations_per_document    = 1
       
  1103 
       
  1104 # The additional modules to treat as equivalent to "warnings".
       
  1105 # Values that are always included: Moose, Moose::Role, Moose::Util::TypeConstraints, warnings.
       
  1106 # equivalent_modules = 
       
  1107 
       
  1108 
       
  1109 # Don't use the comma operator as a statement separator.
       
  1110 [ValuesAndExpressions::ProhibitCommaSeparatedStatements]
       
  1111 # set_themes                         = bugs core pbp
       
  1112 # add_themes                         =
       
  1113 # severity                           = 4
       
  1114 # maximum_violations_per_document    = no_limit
       
  1115 
       
  1116 # Allow map and grep blocks to return lists.
       
  1117 # allow_last_statement_to_be_comma_separated_in_map_and_grep = 0
       
  1118 
       
  1119 
       
  1120 # Prohibit version values from outside the module.
       
  1121 [ValuesAndExpressions::ProhibitComplexVersion]
       
  1122 # set_themes                         = core maintenance
       
  1123 # add_themes                         =
       
  1124 # severity                           = 3
       
  1125 # maximum_violations_per_document    = no_limit
       
  1126 
       
  1127 # Make "use version; our $VERSION = qv('1.2.3');" a violation of this policy.
       
  1128 # forbid_use_version = 0
       
  1129 
       
  1130 
       
  1131 # Don't `use constant FOO => 15'.
       
  1132 [ValuesAndExpressions::ProhibitConstantPragma]
       
  1133 # set_themes                         = bugs core pbp
       
  1134 # add_themes                         =
       
  1135 # severity                           = 4
       
  1136 # maximum_violations_per_document    = no_limit
       
  1137 
       
  1138 
       
  1139 # Write `q{}' instead of `'''.
       
  1140 [ValuesAndExpressions::ProhibitEmptyQuotes]
       
  1141 # set_themes                         = core cosmetic pbp
       
  1142 # add_themes                         =
       
  1143 # severity                           = 2
       
  1144 # maximum_violations_per_document    = no_limit
       
  1145 
       
  1146 
       
  1147 # Write `"\N{DELETE}"' instead of `"\x7F"', etc.
       
  1148 [ValuesAndExpressions::ProhibitEscapedCharacters]
       
  1149 # set_themes                         = core cosmetic pbp
       
  1150 # add_themes                         =
       
  1151 # severity                           = 2
       
  1152 # maximum_violations_per_document    = no_limit
       
  1153 
       
  1154 
       
  1155 # Use concatenation or HEREDOCs instead of literal line breaks in strings.
       
  1156 [ValuesAndExpressions::ProhibitImplicitNewlines]
       
  1157 # set_themes                         = core cosmetic pbp
       
  1158 # add_themes                         =
       
  1159 # severity                           = 3
       
  1160 # maximum_violations_per_document    = no_limit
       
  1161 
       
  1162 
       
  1163 # Always use single quotes for literal strings.
       
  1164 [ValuesAndExpressions::ProhibitInterpolationOfLiterals]
       
  1165 # set_themes                         = core cosmetic pbp
       
  1166 # add_themes                         =
       
  1167 # severity                           = 1
       
  1168 # maximum_violations_per_document    = no_limit
       
  1169 
       
  1170 # Kinds of delimiters to permit, e.g. "qq{", "qq(", "qq[", "qq/".
       
  1171 # allow = 
       
  1172 
       
  1173 # If the string contains ' characters, allow "" to quote it.
       
  1174 # allow_if_string_contains_single_quote = 0
       
  1175 
       
  1176 
       
  1177 # Write `oct(755)' instead of `0755'.
       
  1178 [ValuesAndExpressions::ProhibitLeadingZeros]
       
  1179 # set_themes                         = bugs core pbp
       
  1180 # add_themes                         =
       
  1181 # severity                           = 5
       
  1182 # maximum_violations_per_document    = no_limit
       
  1183 
       
  1184 # Don't allow any leading zeros at all.  Otherwise builtins that deal with Unix permissions, e.g. chmod, don't get flagged.
       
  1185 # strict = 0
       
  1186 
       
  1187 
       
  1188 # Long chains of method calls indicate tightly coupled code.
       
  1189 [ValuesAndExpressions::ProhibitLongChainsOfMethodCalls]
       
  1190 # set_themes                         = core maintenance
       
  1191 # add_themes                         =
       
  1192 # severity                           = 2
       
  1193 # maximum_violations_per_document    = no_limit
       
  1194 
       
  1195 # The number of chained calls to allow.
       
  1196 # Minimum value 1. No maximum.
       
  1197 # max_chain_length = 3
       
  1198 
       
  1199 
       
  1200 # Don't use values that don't explain themselves.
       
  1201 [ValuesAndExpressions::ProhibitMagicNumbers]
       
  1202 # set_themes                         = core maintenance
       
  1203 # add_themes                         =
       
  1204 # severity                           = 2
       
  1205 # maximum_violations_per_document    = 10
       
  1206 
       
  1207 # Individual and ranges of values to allow, and/or "all_integers".
       
  1208 # allowed_values = 0 1 2
       
  1209 
       
  1210 # Kind of literals to allow.
       
  1211 # Valid values: Binary, Exp, Float, Hex, Octal.
       
  1212 # allowed_types = Float
       
  1213 
       
  1214 # Should anything to the right of a "=>" be allowed?.
       
  1215 # allow_to_the_right_of_a_fat_comma = 1
       
  1216 
       
  1217 # Names of subroutines that create constants.
       
  1218 # Values that are always included: Readonly, Readonly::Array, Readonly::Hash, Readonly::Scalar, const.
       
  1219 # constant_creator_subroutines = 
       
  1220 
       
  1221 
       
  1222 # Don't mix numeric operators with string operands, or vice-versa.
       
  1223 [ValuesAndExpressions::ProhibitMismatchedOperators]
       
  1224 # set_themes                         = bugs core
       
  1225 # add_themes                         =
       
  1226 # severity                           = 3
       
  1227 # maximum_violations_per_document    = no_limit
       
  1228 
       
  1229 
       
  1230 # Write ` !$foo && $bar || $baz ' instead of ` not $foo && $bar or $baz'.
       
  1231 [ValuesAndExpressions::ProhibitMixedBooleanOperators]
       
  1232 # set_themes                         = bugs core pbp
       
  1233 # add_themes                         =
       
  1234 # severity                           = 4
       
  1235 # maximum_violations_per_document    = no_limit
       
  1236 
       
  1237 
       
  1238 # Use `q{}' or `qq{}' instead of quotes for awkward-looking strings.
       
  1239 [ValuesAndExpressions::ProhibitNoisyQuotes]
       
  1240 # set_themes                         = core cosmetic pbp
       
  1241 # add_themes                         =
       
  1242 # severity                           = 2
       
  1243 # maximum_violations_per_document    = no_limit
       
  1244 
       
  1245 
       
  1246 # Don't use quotes (`'', `"', ``') as delimiters for the quote-like operators.
       
  1247 [ValuesAndExpressions::ProhibitQuotesAsQuotelikeOperatorDelimiters]
       
  1248 # set_themes                         = core maintenance
       
  1249 # add_themes                         =
       
  1250 # severity                           = 3
       
  1251 # maximum_violations_per_document    = no_limit
       
  1252 
       
  1253 # The operators to allow single-quotes as delimiters for.
       
  1254 # Valid values: m, q, qq, qr, qw, qx, s, tr, y.
       
  1255 # single_quote_allowed_operators = m s qr qx
       
  1256 
       
  1257 # The operators to allow double-quotes as delimiters for.
       
  1258 # Valid values: m, q, qq, qr, qw, qx, s, tr, y.
       
  1259 # double_quote_allowed_operators = 
       
  1260 
       
  1261 # The operators to allow back-quotes (back-ticks) as delimiters for.
       
  1262 # Valid values: m, q, qq, qr, qw, qx, s, tr, y.
       
  1263 # back_quote_allowed_operators = 
       
  1264 
       
  1265 
       
  1266 # Don't write ` print <<'__END__' '.
       
  1267 [ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator]
       
  1268 # set_themes                         = core maintenance
       
  1269 # add_themes                         =
       
  1270 # severity                           = 3
       
  1271 # maximum_violations_per_document    = no_limit
       
  1272 
       
  1273 
       
  1274 # Don't use strings like `v1.4' or `1.4.5' when including other modules.
       
  1275 [ValuesAndExpressions::ProhibitVersionStrings]
       
  1276 # set_themes                         = core maintenance pbp
       
  1277 # add_themes                         =
       
  1278 # severity                           = 3
       
  1279 # maximum_violations_per_document    = no_limit
       
  1280 
       
  1281 
       
  1282 # Require $VERSION to be a constant rather than a computed value.
       
  1283 [ValuesAndExpressions::RequireConstantVersion]
       
  1284 # set_themes                         = core maintenance
       
  1285 # add_themes                         =
       
  1286 # severity                           = 2
       
  1287 # maximum_violations_per_document    = no_limit
       
  1288 
       
  1289 # Allow qv() and version->new() without a 'use version' on the same line.
       
  1290 # allow_version_without_use_on_same_line = 0
       
  1291 
       
  1292 
       
  1293 # Warns that you might have used single quotes when you really wanted double-quotes.
       
  1294 [ValuesAndExpressions::RequireInterpolationOfMetachars]
       
  1295 # set_themes                         = core cosmetic pbp
       
  1296 # add_themes                         =
       
  1297 # severity                           = 1
       
  1298 # maximum_violations_per_document    = no_limit
       
  1299 
       
  1300 # RCS keywords to ignore in potential interpolation.
       
  1301 # rcs_keywords = 
       
  1302 
       
  1303 
       
  1304 # Write ` 141_234_397.0145 ' instead of ` 141234397.0145 '.
       
  1305 [ValuesAndExpressions::RequireNumberSeparators]
       
  1306 # set_themes                         = core cosmetic pbp
       
  1307 # add_themes                         =
       
  1308 # severity                           = 2
       
  1309 # maximum_violations_per_document    = no_limit
       
  1310 
       
  1311 # The minimum absolute value to require separators in.
       
  1312 # Minimum value 10. No maximum.
       
  1313 # min_value = 10_000
       
  1314 
       
  1315 
       
  1316 # Write ` print <<'THE_END' ' or ` print <<"THE_END" '.
       
  1317 [ValuesAndExpressions::RequireQuotedHeredocTerminator]
       
  1318 # set_themes                         = core maintenance pbp
       
  1319 # add_themes                         =
       
  1320 # severity                           = 3
       
  1321 # maximum_violations_per_document    = no_limit
       
  1322 
       
  1323 
       
  1324 # Write ` <<'THE_END'; ' instead of ` <<'theEnd'; '.
       
  1325 [ValuesAndExpressions::RequireUpperCaseHeredocTerminator]
       
  1326 # set_themes                         = core cosmetic pbp
       
  1327 # add_themes                         =
       
  1328 # severity                           = 2
       
  1329 # maximum_violations_per_document    = no_limit
       
  1330 
       
  1331 
       
  1332 # Do not write ` my $foo .= 'bar'; '.
       
  1333 [Variables::ProhibitAugmentedAssignmentInDeclaration]
       
  1334 # set_themes                         = bugs core
       
  1335 # add_themes                         =
       
  1336 # severity                           = 4
       
  1337 # maximum_violations_per_document    = no_limit
       
  1338 
       
  1339 
       
  1340 # Do not write ` my $foo = $bar if $baz; '.
       
  1341 [Variables::ProhibitConditionalDeclarations]
       
  1342 # set_themes                         = bugs core
       
  1343 # add_themes                         =
       
  1344 # severity                           = 5
       
  1345 # maximum_violations_per_document    = no_limit
       
  1346 
       
  1347 
       
  1348 # Use `my' instead of `local', except when you have to.
       
  1349 [Variables::ProhibitLocalVars]
       
  1350 # set_themes                         = core maintenance pbp
       
  1351 # add_themes                         =
       
  1352 # severity                           = 2
       
  1353 # maximum_violations_per_document    = no_limit
       
  1354 
       
  1355 
       
  1356 # Avoid `$`', `$&', `$'' and their English equivalents.
       
  1357 [Variables::ProhibitMatchVars]
       
  1358 # set_themes                         = core pbp performance
       
  1359 # add_themes                         =
       
  1360 # severity                           = 4
       
  1361 # maximum_violations_per_document    = no_limit
       
  1362 
       
  1363 
       
  1364 # Eliminate globals declared with `our' or `use vars'.
       
  1365 [Variables::ProhibitPackageVars]
       
  1366 # set_themes                         = core maintenance pbp
       
  1367 # add_themes                         =
       
  1368 # severity                           = 3
       
  1369 # maximum_violations_per_document    = no_limit
       
  1370 
       
  1371 # The base set of packages to allow variables for.
       
  1372 # packages = Data::Dumper File::Find FindBin Log::Log4perl
       
  1373 
       
  1374 # The set of packages to allow variables for, in addition to those given in "packages".
       
  1375 # add_packages = 
       
  1376 
       
  1377 
       
  1378 # Use double colon (::) to separate package name components instead of single quotes (').
       
  1379 [Variables::ProhibitPerl4PackageNames]
       
  1380 # set_themes                         = core maintenance
       
  1381 # add_themes                         =
       
  1382 # severity                           = 2
       
  1383 # maximum_violations_per_document    = no_limit
       
  1384 
       
  1385 
       
  1386 # Write `$EVAL_ERROR' instead of `$@'.
       
  1387 [Variables::ProhibitPunctuationVars]
       
  1388 # set_themes                         = core cosmetic pbp
       
  1389 # add_themes                         =
       
  1390 # severity                           = 2
       
  1391 # maximum_violations_per_document    = no_limit
       
  1392 
       
  1393 # The additional variables to allow.
       
  1394 # Values that are always included: $1, $2, $3, $4, $5, $6, $7, $8, $9, $], $_, @_, _.
       
  1395 allow = $! $@
       
  1396 
       
  1397 # Controls checking interpolated strings for punctuation variables.
       
  1398 # Valid values: disable, simple, thorough.
       
  1399 # string_mode = thorough
       
  1400 
       
  1401 
       
  1402 # Do not reuse a variable name in a lexical scope
       
  1403 [Variables::ProhibitReusedNames]
       
  1404 # set_themes                         = bugs core
       
  1405 # add_themes                         =
       
  1406 # severity                           = 3
       
  1407 # maximum_violations_per_document    = no_limit
       
  1408 
       
  1409 # The variables to not consider as duplicates.
       
  1410 # allow = $self $class
       
  1411 
       
  1412 
       
  1413 # Don't ask for storage you don't need.
       
  1414 [Variables::ProhibitUnusedVariables]
       
  1415 # set_themes                         = core maintenance
       
  1416 # add_themes                         =
       
  1417 # severity                           = 3
       
  1418 # maximum_violations_per_document    = no_limit
       
  1419 
       
  1420 
       
  1421 # Prevent access to private vars in other packages.
       
  1422 [Variables::ProtectPrivateVars]
       
  1423 # set_themes                         = core maintenance
       
  1424 # add_themes                         =
       
  1425 # severity                           = 3
       
  1426 # maximum_violations_per_document    = no_limit
       
  1427 
       
  1428 
       
  1429 # Write `local $foo = $bar;' instead of just `local $foo;'.
       
  1430 [Variables::RequireInitializationForLocalVars]
       
  1431 # set_themes                         = bugs core pbp
       
  1432 # add_themes                         =
       
  1433 # severity                           = 3
       
  1434 # maximum_violations_per_document    = no_limit
       
  1435 
       
  1436 
       
  1437 # Write `for my $element (@list) {...}' instead of `for $element (@list) {...}'.
       
  1438 [Variables::RequireLexicalLoopIterators]
       
  1439 # set_themes                         = bugs core pbp
       
  1440 # add_themes                         =
       
  1441 # severity                           = 5
       
  1442 # maximum_violations_per_document    = no_limit
       
  1443 
       
  1444 
       
  1445 # Magic variables should be assigned as "local".
       
  1446 [Variables::RequireLocalizedPunctuationVars]
       
  1447 # set_themes                         = bugs core pbp
       
  1448 # add_themes                         =
       
  1449 # severity                           = 4
       
  1450 # maximum_violations_per_document    = no_limit
       
  1451 
       
  1452 # Global variables to exclude from this policy.
       
  1453 # Values that are always included: $ARG, $_, @_.
       
  1454 # allow = 
       
  1455 
       
  1456 
       
  1457 # Negative array index should be used.
       
  1458 [Variables::RequireNegativeIndices]
       
  1459 # set_themes                         = core maintenance pbp
       
  1460 # add_themes                         =
       
  1461 # severity                           = 4
       
  1462 # maximum_violations_per_document    = no_limit
       
  1463 
       
  1464