Jeffrey Ryan Thalhammer > Perl-Critic

Perl-Critic

This Release Perl-Critic-1.121  [Download] [Browse 02 Nov 2013
Latest Dev. Release Perl-Critic-1.121_01  [Download] [Browse 17 Nov 2013
Other Releases
Links Discussion Forum ] [ View/Report Bugs ] [ Website ] [ Dependencies ] [ Other Tools ]
Repository git://github.com/Perl-Critic/Perl-Critic.git
CPAN Testers PASS (2296)   FAIL (113)   UNKNOWN (1)   [ View Reports ] [ Perl/Platform Version Matrix ]
Rating **** (10 Reviews) [ Rate this distribution ]
License The Perl 5 License (Artistic 1 & GPL 1)
Special Files
Build.PL
Changes
INSTALL
LICENSE
Makefile.PL
MANIFEST
META.json
README

Modules

Perl::Critic Critique Perl source code for best-practices.     1.121
Perl::Critic::Annotation A "## no critic" annotation in a document.     1.121
Perl::Critic::Command Guts of perlcritic.     1.121
Perl::Critic::Config The final derived Perl::Critic configuration, combined from any profile file and command-line parameters.     1.121
Perl::Critic::Document Caching wrapper around a PPI::Document.     1.121
Perl::Critic::Exception A problem identified by Perl::Critic.     1.121
Perl::Critic::Exception::AggregateConfiguration A collection of a set of problems found in the configuration and/or command-line options.     1.121
Perl::Critic::Exception::Configuration A problem with Perl::Critic configuration.     1.121
Perl::Critic::Exception::Configuration::Generic A problem with Perl::Critic configuration that doesn't involve an option.     1.121
Perl::Critic::Exception::Configuration::NonExistentPolicy The configuration referred to a non-existent policy.     1.121
Perl::Critic::Exception::Configuration::Option A problem with an option in the Perl::Critic configuration.     1.121
Perl::Critic::Exception::Configuration::Option::Global A problem with Perl::Critic global configuration.     1.121
Perl::Critic::Exception::Configuration::Option::Global::ExtraParameter The configuration referred to a non-existent global option.     1.121
Perl::Critic::Exception::Configuration::Option::Global::ParameterValue A problem with the value of a global parameter.     1.121
Perl::Critic::Exception::Configuration::Option::Policy A problem with configuration of a policy.     1.121
Perl::Critic::Exception::Configuration::Option::Policy::ExtraParameter The configuration referred to a non-existent parameter for a policy.     1.121
Perl::Critic::Exception::Configuration::Option::Policy::ParameterValue A problem with the value of a parameter for a policy.     1.121
Perl::Critic::Exception::Fatal A problem that should cause Perl::Critic to stop running.     1.121
Perl::Critic::Exception::Fatal::Generic A problem for which there is no specialized information.     1.121
Perl::Critic::Exception::Fatal::Internal A problem with the Perl::Critic implementation, i.e. a bug.     1.121
Perl::Critic::Exception::Fatal::PolicyDefinition A bug in a policy.     1.121
Perl::Critic::Exception::IO A problem with input or output.     1.121
Perl::Critic::Exception::Parse The code doesn't look like code.     1.121
Perl::Critic::OptionsProcessor The global configuration default values, combined with command-line values.     1.121
Perl::Critic::Policy Base class for all Policy modules.     1.121
Perl::Critic::Policy::BuiltinFunctions::ProhibitBooleanGrep Use List::MoreUtils::any instead of grep in boolean context.     1.121
Perl::Critic::Policy::BuiltinFunctions::ProhibitComplexMappings Map blocks should have a single statement.     1.121
Perl::Critic::Policy::BuiltinFunctions::ProhibitLvalueSubstr Use 4-argument substr instead of writing substr($foo, 2, 6) = $bar.     1.121
Perl::Critic::Policy::BuiltinFunctions::ProhibitReverseSortBlock Forbid $b before $a in sort blocks.     1.121
Perl::Critic::Policy::BuiltinFunctions::ProhibitSleepViaSelect Use Time::HiRes instead of something like select(undef, undef, undef, .05).     1.121
Perl::Critic::Policy::BuiltinFunctions::ProhibitStringyEval Write eval { my $foo; bar($foo) } instead of eval "my $foo; bar($foo);".     1.121
Perl::Critic::Policy::BuiltinFunctions::ProhibitStringySplit Write split /-/, $string instead of split '-', $string.     1.121
Perl::Critic::Policy::BuiltinFunctions::ProhibitUniversalCan Write eval { $foo->can($name) } instead of UNIVERSAL::can($foo, $name).     1.121
Perl::Critic::Policy::BuiltinFunctions::ProhibitUniversalIsa Write eval { $foo->isa($pkg) } instead of UNIVERSAL::isa($foo, $pkg).     1.121
Perl::Critic::Policy::BuiltinFunctions::ProhibitVoidGrep Don't use grep in void contexts.     1.121
Perl::Critic::Policy::BuiltinFunctions::ProhibitVoidMap Don't use map in void contexts.     1.121
Perl::Critic::Policy::BuiltinFunctions::RequireBlockGrep Write grep { $_ =~ /$pattern/ } @list instead of grep /$pattern/, @list.     1.121
Perl::Critic::Policy::BuiltinFunctions::RequireBlockMap Write map { $_ =~ /$pattern/ } @list instead of map /$pattern/, @list.     1.121
Perl::Critic::Policy::BuiltinFunctions::RequireGlobFunction Use glob q{*} instead of <*>.     1.121
Perl::Critic::Policy::BuiltinFunctions::RequireSimpleSortBlock Sort blocks should have a single statement.     1.121
Perl::Critic::Policy::ClassHierarchies::ProhibitAutoloading AUTOLOAD methods should be avoided.     1.121
Perl::Critic::Policy::ClassHierarchies::ProhibitExplicitISA Employ use base instead of @ISA.     1.121
Perl::Critic::Policy::ClassHierarchies::ProhibitOneArgBless Write bless {}, $class; instead of just bless {};.     1.121
Perl::Critic::Policy::CodeLayout::ProhibitHardTabs Use spaces instead of tabs.     1.121
Perl::Critic::Policy::CodeLayout::ProhibitParensWithBuiltins Write open $handle, $path instead of open($handle, $path).     1.121
Perl::Critic::Policy::CodeLayout::ProhibitQuotedWordLists Write qw(foo bar baz) instead of ('foo', 'bar', 'baz').     1.121
Perl::Critic::Policy::CodeLayout::ProhibitTrailingWhitespace Don't use whitespace at the end of lines.     1.121
Perl::Critic::Policy::CodeLayout::RequireConsistentNewlines Use the same newline through the source.     1.121
Perl::Critic::Policy::CodeLayout::RequireTidyCode Must run code through perltidy.     1.121
Perl::Critic::Policy::CodeLayout::RequireTrailingCommas Put a comma at the end of every multi-line list declaration, including the last one.     1.121
Perl::Critic::Policy::ControlStructures::ProhibitCStyleForLoops Write for(0..20) instead of for($i=0; $i<=20; $i++).     1.121
Perl::Critic::Policy::ControlStructures::ProhibitCascadingIfElse Don't write long "if-elsif-elsif-elsif-elsif...else" chains.     1.121
Perl::Critic::Policy::ControlStructures::ProhibitDeepNests Don't write deeply nested loops and conditionals.     1.121
Perl::Critic::Policy::ControlStructures::ProhibitLabelsWithSpecialBlockNames Don't use labels that are the same as the special block names.     1.121
Perl::Critic::Policy::ControlStructures::ProhibitMutatingListFunctions Don't modify $_ in list functions.     1.121
Perl::Critic::Policy::ControlStructures::ProhibitNegativeExpressionsInUnlessAndUntilConditions Don't use operators like not, !~, and le within until and unless.     1.121
Perl::Critic::Policy::ControlStructures::ProhibitPostfixControls Write if($condition){ do_something() } instead of do_something() if $condition.     1.121
Perl::Critic::Policy::ControlStructures::ProhibitUnlessBlocks Write if(! $condition) instead of unless($condition).     1.121
Perl::Critic::Policy::ControlStructures::ProhibitUnreachableCode Don't write code after an unconditional die, exit, or next.     1.121
Perl::Critic::Policy::ControlStructures::ProhibitUntilBlocks Write while(! $condition) instead of until($condition).     1.121
Perl::Critic::Policy::Documentation::PodSpelling Check your spelling.     1.121
Perl::Critic::Policy::Documentation::RequirePackageMatchesPodName The =head1 NAME section should match the package.     1.121
Perl::Critic::Policy::Documentation::RequirePodAtEnd All POD should be after __END__.     1.121
Perl::Critic::Policy::Documentation::RequirePodLinksIncludeText Provide text to display with your pod links.     1.121
Perl::Critic::Policy::Documentation::RequirePodSections Organize your POD into the customary sections.     1.121
Perl::Critic::Policy::ErrorHandling::RequireCarping Use functions from Carp instead of warn or die.     1.121
Perl::Critic::Policy::ErrorHandling::RequireCheckingReturnValueOfEval You can't depend upon the value of $@/$EVAL_ERROR to tell whether an eval failed.     1.121
Perl::Critic::Policy::InputOutput::ProhibitBacktickOperators Discourage stuff like @files = `ls $directory`.     1.121
Perl::Critic::Policy::InputOutput::ProhibitBarewordFileHandles Write open my $fh, q{<}, $filename; instead of open FH, q{<}, $filename;.     1.121
Perl::Critic::Policy::InputOutput::ProhibitExplicitStdin Use "<>" or "<ARGV>" or a prompting module instead of "<STDIN>".     1.121
Perl::Critic::Policy::InputOutput::ProhibitInteractiveTest Use prompt() instead of -t.     1.121
Perl::Critic::Policy::InputOutput::ProhibitJoinedReadline Use local $/ = undef or File::Slurp instead of joined readline.     1.121
Perl::Critic::Policy::InputOutput::ProhibitOneArgSelect Never write select($fh).     1.121
Perl::Critic::Policy::InputOutput::ProhibitReadlineInForLoop Write while( $line = <> ){...} instead of for(<>){...}.     1.121
Perl::Critic::Policy::InputOutput::ProhibitTwoArgOpen Write open $fh, q{<}, $filename; instead of open $fh, "<$filename";.     1.121
Perl::Critic::Policy::InputOutput::RequireBracedFileHandleWithPrint Write print {$FH} $foo, $bar; instead of print $FH $foo, $bar;.     1.121
Perl::Critic::Policy::InputOutput::RequireBriefOpen Close filehandles as soon as possible after opening them.     1.121
Perl::Critic::Policy::InputOutput::RequireCheckedClose Write my $error = close $fh; instead of close $fh;.     1.121
Perl::Critic::Policy::InputOutput::RequireCheckedOpen Write my $error = open $fh, $mode, $filename; instead of open $fh, $mode, $filename;.     1.121
Perl::Critic::Policy::InputOutput::RequireCheckedSyscalls Return value of flagged function ignored.     1.121
Perl::Critic::Policy::InputOutput::RequireEncodingWithUTF8Layer Write open $fh, q{<:encoding(UTF-8)}, $filename; instead of open $fh, q{{<:utf8}, $filename;.     1.121
Perl::Critic::Policy::Miscellanea::ProhibitFormats Do not use format.     1.121
Perl::Critic::Policy::Miscellanea::ProhibitTies Do not use tie.     1.121
Perl::Critic::Policy::Miscellanea::ProhibitUnrestrictedNoCritic Forbid a bare ## no critic     1.121
Perl::Critic::Policy::Miscellanea::ProhibitUselessNoCritic Remove ineffective "## no critic" annotations.     1.121
Perl::Critic::Policy::Modules::ProhibitAutomaticExportation Export symbols via @EXPORT_OK or %EXPORT_TAGS instead of @EXPORT.     1.121
Perl::Critic::Policy::Modules::ProhibitConditionalUseStatements Avoid putting conditional logic around compile-time includes.     1.121
Perl::Critic::Policy::Modules::ProhibitEvilModules Ban modules that aren't blessed by your shop.     1.121
Perl::Critic::Policy::Modules::ProhibitExcessMainComplexity Minimize complexity in code that is outside of subroutines.     1.121
Perl::Critic::Policy::Modules::ProhibitMultiplePackages Put packages (especially subclasses) in separate files.     1.121
Perl::Critic::Policy::Modules::RequireBarewordIncludes Write require Module instead of require 'Module.pm'.     1.121
Perl::Critic::Policy::Modules::RequireEndWithOne End each module with an explicitly 1; instead of some funky expression.     1.121
Perl::Critic::Policy::Modules::RequireExplicitPackage Always make the package explicit.     1.121
Perl::Critic::Policy::Modules::RequireFilenameMatchesPackage Package declaration must match filename.     1.121
Perl::Critic::Policy::Modules::RequireNoMatchVarsWithUseEnglish use English must be passed a -no_match_vars argument.     1.121
Perl::Critic::Policy::Modules::RequireVersionVar Give every module a $VERSION number.     1.121
Perl::Critic::Policy::NamingConventions::Capitalization Distinguish different program components by case.     1.121
Perl::Critic::Policy::NamingConventions::ProhibitAmbiguousNames Don't use vague variable or subroutine names like 'last' or 'record'.     1.121
Perl::Critic::Policy::Objects::ProhibitIndirectSyntax Prohibit indirect object call syntax.     1.121
Perl::Critic::Policy::References::ProhibitDoubleSigils Write @{ $array_ref } instead of @$array_ref.     1.121
Perl::Critic::Policy::RegularExpressions::ProhibitCaptureWithoutTest Capture variable used outside conditional.     1.121
Perl::Critic::Policy::RegularExpressions::ProhibitComplexRegexes Split long regexps into smaller qr// chunks.     1.121
Perl::Critic::Policy::RegularExpressions::ProhibitEnumeratedClasses Use named character classes instead of explicit character lists.     1.121
Perl::Critic::Policy::RegularExpressions::ProhibitEscapedMetacharacters Use character classes for literal meta-characters instead of escapes.     1.121
Perl::Critic::Policy::RegularExpressions::ProhibitFixedStringMatches Use eq or hash instead of fixed-pattern regexps.     1.121
Perl::Critic::Policy::RegularExpressions::ProhibitSingleCharAlternation Use [abc] instead of a|b|c.     1.121
Perl::Critic::Policy::RegularExpressions::ProhibitUnusedCapture Only use a capturing group if you plan to use the captured value.     1.121
Perl::Critic::Policy::RegularExpressions::ProhibitUnusualDelimiters Use only // or {} to delimit regexps.     1.121
Perl::Critic::Policy::RegularExpressions::RequireBracesForMultiline Use { and } to delimit multi-line regexps.     1.121
Perl::Critic::Policy::RegularExpressions::RequireDotMatchAnything Always use the /s modifier with regular expressions.     1.121
Perl::Critic::Policy::RegularExpressions::RequireExtendedFormatting Always use the /x modifier with regular expressions.     1.121
Perl::Critic::Policy::RegularExpressions::RequireLineBoundaryMatching Always use the /m modifier with regular expressions.     1.121
Perl::Critic::Policy::Subroutines::ProhibitAmpersandSigils Don't call functions with a leading ampersand sigil.     1.121
Perl::Critic::Policy::Subroutines::ProhibitBuiltinHomonyms Don't declare your own open function.     1.121
Perl::Critic::Policy::Subroutines::ProhibitExcessComplexity Minimize complexity by factoring code into smaller subroutines.     1.121
Perl::Critic::Policy::Subroutines::ProhibitExplicitReturnUndef Return failure with bare return instead of return undef.     1.121
Perl::Critic::Policy::Subroutines::ProhibitManyArgs Too many arguments.     1.121
Perl::Critic::Policy::Subroutines::ProhibitNestedSubs sub never { sub correct {} }.     1.121
Perl::Critic::Policy::Subroutines::ProhibitReturnSort Behavior of sort is not defined if called in scalar context.     1.121
Perl::Critic::Policy::Subroutines::ProhibitSubroutinePrototypes Don't write sub my_function (@@) {}.     1.121
Perl::Critic::Policy::Subroutines::ProhibitUnusedPrivateSubroutines Prevent unused private subroutines.     1.121
Perl::Critic::Policy::Subroutines::ProtectPrivateSubs Prevent access to private subs in other packages.     1.121
Perl::Critic::Policy::Subroutines::RequireArgUnpacking Always unpack @_ first.     1.121
Perl::Critic::Policy::Subroutines::RequireFinalReturn End every path through a subroutine with an explicit return statement.     1.121
Perl::Critic::Policy::TestingAndDebugging::ProhibitNoStrict Prohibit various flavors of no strict.     1.121
Perl::Critic::Policy::TestingAndDebugging::ProhibitNoWarnings Prohibit various flavors of no warnings.     1.121
Perl::Critic::Policy::TestingAndDebugging::ProhibitProlongedStrictureOverride Don't turn off strict for large blocks of code.     1.121
Perl::Critic::Policy::TestingAndDebugging::RequireTestLabels Tests should all have labels.     1.121
Perl::Critic::Policy::TestingAndDebugging::RequireUseStrict Always use strict.     1.121
Perl::Critic::Policy::TestingAndDebugging::RequireUseWarnings Always use warnings.     1.121
Perl::Critic::Policy::ValuesAndExpressions::ProhibitCommaSeparatedStatements Don't use the comma operator as a statement separator.     1.121
Perl::Critic::Policy::ValuesAndExpressions::ProhibitComplexVersion Prohibit version values from outside the module.     1.121
Perl::Critic::Policy::ValuesAndExpressions::ProhibitConstantPragma Don't use constant FOO => 15.     1.121
Perl::Critic::Policy::ValuesAndExpressions::ProhibitEmptyQuotes Write q{} instead of ''.     1.121
Perl::Critic::Policy::ValuesAndExpressions::ProhibitEscapedCharacters Write "\N{DELETE}" instead of "\x7F", etc.     1.121
Perl::Critic::Policy::ValuesAndExpressions::ProhibitImplicitNewlines Use concatenation or HEREDOCs instead of literal line breaks in strings.     1.121
Perl::Critic::Policy::ValuesAndExpressions::ProhibitInterpolationOfLiterals Always use single quotes for literal strings.     1.121
Perl::Critic::Policy::ValuesAndExpressions::ProhibitLeadingZeros Write oct(755) instead of 0755.     1.121
Perl::Critic::Policy::ValuesAndExpressions::ProhibitLongChainsOfMethodCalls Long chains of method calls indicate tightly coupled code.     1.121
Perl::Critic::Policy::ValuesAndExpressions::ProhibitMagicNumbers Don't use values that don't explain themselves.     1.121
Perl::Critic::Policy::ValuesAndExpressions::ProhibitMismatchedOperators Don't mix numeric operators with string operands, or vice-versa.     1.121
Perl::Critic::Policy::ValuesAndExpressions::ProhibitMixedBooleanOperators Write !$foo && $bar || $baz instead of not $foo && $bar or $baz.     1.121
Perl::Critic::Policy::ValuesAndExpressions::ProhibitNoisyQuotes Use q{} or qq{} instead of quotes for awkward-looking strings.     1.121
Perl::Critic::Policy::ValuesAndExpressions::ProhibitQuotesAsQuotelikeOperatorDelimiters Don't use quotes (', ", `) as delimiters for the quote-like operators.     1.121
Perl::Critic::Policy::ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator Don't write print <<'__END__' .     1.121
Perl::Critic::Policy::ValuesAndExpressions::ProhibitVersionStrings Don't use strings like v1.4 or 1.4.5 when including other modules.     1.121
Perl::Critic::Policy::ValuesAndExpressions::RequireConstantVersion Require $VERSION to be a constant rather than a computed value.     1.121
Perl::Critic::Policy::ValuesAndExpressions::RequireInterpolationOfMetachars Warns that you might have used single quotes when you really wanted double-quotes.     1.121
Perl::Critic::Policy::ValuesAndExpressions::RequireNumberSeparators Write 141_234_397.0145 instead of 141234397.0145 .     1.121
Perl::Critic::Policy::ValuesAndExpressions::RequireQuotedHeredocTerminator Write print <<'THE_END' or print <<"THE_END" .     1.121
Perl::Critic::Policy::ValuesAndExpressions::RequireUpperCaseHeredocTerminator Write <<'THE_END'; instead of <<'theEnd'; .     1.121
Perl::Critic::Policy::Variables::ProhibitAugmentedAssignmentInDeclaration Do not write my $foo .= 'bar'; .     1.121
Perl::Critic::Policy::Variables::ProhibitConditionalDeclarations Do not write my $foo = $bar if $baz; .     1.121
Perl::Critic::Policy::Variables::ProhibitEvilVariables Ban variables that aren't blessed by your shop.     1.121
Perl::Critic::Policy::Variables::ProhibitLocalVars Use my instead of local, except when you have to.     1.121
Perl::Critic::Policy::Variables::ProhibitMatchVars Avoid $`, $&, $' and their English equivalents.     1.121
Perl::Critic::Policy::Variables::ProhibitPackageVars Eliminate globals declared with our or use vars.     1.121
Perl::Critic::Policy::Variables::ProhibitPerl4PackageNames Use double colon (::) to separate package name components instead of single quotes (').     1.121
Perl::Critic::Policy::Variables::ProhibitPunctuationVars Write $EVAL_ERROR instead of $@.     1.121
Perl::Critic::Policy::Variables::ProhibitReusedNames Do not reuse a variable name in a lexical scope     1.121
Perl::Critic::Policy::Variables::ProhibitUnusedVariables Don't ask for storage you don't need.     1.121
Perl::Critic::Policy::Variables::ProtectPrivateVars Prevent access to private vars in other packages.     1.121
Perl::Critic::Policy::Variables::RequireInitializationForLocalVars Write local $foo = $bar; instead of just local $foo;.     1.121
Perl::Critic::Policy::Variables::RequireLexicalLoopIterators Write for my $element (@list) {...} instead of for $element (@list) {...}.     1.121
Perl::Critic::Policy::Variables::RequireLocalizedPunctuationVars Magic variables should be assigned as "local".     1.121
Perl::Critic::Policy::Variables::RequireNegativeIndices Negative array index should be used.     1.121
Perl::Critic::PolicyConfig Configuration data for a Policy.     1.121
Perl::Critic::PolicyFactory Instantiates Policy objects.     1.121
Perl::Critic::PolicyListing Display minimal information about Policies.     1.121
Perl::Critic::PolicyParameter Metadata about a parameter for a Policy.     1.121
Perl::Critic::PolicyParameter::Behavior Default type-specific actions for a parameter.     1.121
Perl::Critic::PolicyParameter::Behavior::Boolean Actions appropriate for a boolean parameter.     1.121
Perl::Critic::PolicyParameter::Behavior::Enumeration Actions appropriate for an enumerated value.     1.121
Perl::Critic::PolicyParameter::Behavior::Integer Actions appropriate for an integer parameter.     1.121
Perl::Critic::PolicyParameter::Behavior::String Actions appropriate for a simple string parameter.     1.121
Perl::Critic::PolicyParameter::Behavior::StringList Actions appropriate for a parameter that is a list of strings.     1.121
Perl::Critic::ProfilePrototype Generate an initial Perl::Critic profile.     1.121
Perl::Critic::Statistics Compile stats on Perl::Critic violations.     1.121
Perl::Critic::TestUtils Utility functions for testing new Policies.     1.121
Perl::Critic::Theme Construct thematic sets of policies.     1.121
Perl::Critic::ThemeListing List the themes of the installed Policies.     1.121
Perl::Critic::UserProfile The contents of the user's profile, often .perlcriticrc.     1.121
Perl::Critic::Utils General utility subroutines and constants for Perl::Critic and derivative distributions.     1.121
Perl::Critic::Utils::Constants Global constants.     1.121
Perl::Critic::Utils::DataConversion Utilities for converting from one type of data to another.     1.121
Perl::Critic::Utils::McCabe Functions that calculate the McCabe score of source code.     1.121
Perl::Critic::Utils::POD Utility functions for dealing with POD.     1.121
Perl::Critic::Utils::POD::ParseInteriorSequence Pod::Parser subclass to find all interior sequences.     1.121
Perl::Critic::Utils::PPI Utility functions for dealing with PPI objects.     1.121
Perl::Critic::Utils::Perl Utility functions for dealing with Perl language issues.     1.121
Perl::Critic::Violation A violation of a Policy found in some source code.     1.121
Test::Perl::Critic::Policy A framework for testing your custom Policies     1.121

Documentation

Perl::Critic::CORE_DEVELOPER Hints for working on the Perl::Critic core.  
Perl::Critic::DEVELOPER How to make new Perl::Critic::Policy modules.  
Perl::Critic::PolicySummary Descriptions of the Policy modules included with Perl::Critic itself.  
perlcritic Command-line interface to critique Perl source.