The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
###
### Configure perlcritic display behavior.
###

# Change the default message to show the policy name so we can shut it up if necessary
verbose         = %m [%p] at %f line %l, near '%r'\n

# Force perlcritic to use color, even when run through a pager.
color           = 1

# Use a pager.
pager           = $PAGER


###
### Turn off policies
### either because they're actively harmful
### or not helpful enough to be worth it
###

# Nuthin wrong with grep /foo/ or map @$_
[-BuiltinFunctions::RequireBlockMap]
[-BuiltinFunctions::RequireBlockGrep]

# Requiring q{} instead of "" doesn't help
[-ValuesAndExpressions::ProhibitEmptyQuotes]

# "," isn't hard to read
[-ValuesAndExpressions::ProhibitNoisyQuotes]

# "foo" doesn't hurt anything
[-ValuesAndExpressions::ProhibitInterpolationOfLiterals]

# If you don't know what local does, don't use it.
[-Variables::RequireInitializationForLocalVars]

# foo() if $bar; often makes more sense
[-ControlStructures::ProhibitPostfixControls]

# @$foo easier to read and type than @{$foo}
[-References::ProhibitDoubleSigils]

# The idea that inline POD slows compilation is a myth
[-Documentation::RequirePodAtEnd]

# If your module is procedural, yes you should export the most
# common functions by default.
[-Modules::ProhibitAutomaticExportation]

# I cannot be arsed to add text to every POD link just in case somebody
# uses an old formatter
[-Documentation::RequirePodLinksIncludeText]

# Hobgoblin
[-CodeLayout::RequireTrailingCommas]

# Too nit picky to bother with.  Rarely causes a problem.
[-InputOutput::RequireBracedFileHandleWithPrint]



###
### Configure policies
###

# $! and $@ are very common and English is a pain to use right
[Variables::ProhibitPunctuationVars]
allow = $@ $!

# No point putting a /x on really short regexes.
[RegularExpressions::RequireExtendedFormatting]
minimum_regex_length_to_complain_about = 5

# Extend the ability to play with @_ to 3 line subroutines.
[Subroutines::RequireArgUnpacking]
short_subroutine_statements = 3

# Inform perlcritic that Mouse turns on strictures
[TestingAndDebugging::RequireUseStrict]
equivalent_modules = Mouse Mouse::Role perl5i::0 perl5i::1 perl5i::2 Modern::Perl

[TestingAndDebugging::RequireUseWarnings]
equivalent_modules = Mouse Mouse::Role perl5i::0 perl5i::1 perl5i::2 Modern::Perl

# No tabs ever
[CodeLayout::ProhibitHardTabs]
allow_leading_tabs = 0

# "no warnings 'foo'" is fine
[TestingAndDebugging::ProhibitNoWarnings]
allow_with_category_restriction = 1

# "no strict 'refs'" is necessary.  The rest you don't need.
[TestingAndDebugging::ProhibitNoStrict]
allow = refs

# A sensible, minimal list of POD sections
[Documentation::RequirePodSections]
lib_sections    = NAME | SYNOPSIS | DESCRIPTION
script_sections = NAME | SYNOPSIS | DESCRIPTION

# Check everything... except print and close, that's a bit too much
[InputOutput::RequireCheckedSyscalls]
functions = :builtins
exclude_functions = print close

# Globals, and equivalents, are $Foo
[NamingConventions::Capitalization]
global_variables = :starts_with_upper
file_lexical_variables = :starts_with_upper


###
### Project specific configuration
###

# We can't depend on IO::Interactive
[-InputOutput::ProhibitInteractiveTest]