#
# PerlCritic configuration file
# perlcritic -3 --profile _DEVEL/perlcriticrc <files>
#

#------------------------
# Always use these Policies
#------------------------

# Never use "open FILE"
[InputOutput::ProhibitBarewordFileHandles]
severity = 5

# Always check "open my $FILE"
[InputOutput::RequireCheckedOpen]
severity = 5

#------------------------
# Don't use these Policies
#------------------------

[-CodeLayout::ProhibitParensWithBuiltins]

# I want to use postfix 'if'
[-ControlStructures::ProhibitPostfixControls]

# I don't want to Pod at the end
[-Documentation::RequirePodAtEnd]

# I don't want to check "close $FILE"
[-InputOutput::RequireCheckedClose]

# 'exclude_functions' option not available on Debian package :(
[-InputOutput::RequireCheckedSyscalls]

[-Miscellanea::RequireRcsKeywords]

# I don't want a $VERSION in each module
[-Modules::RequireVersionVar]

# I want to mix Case in Subs & Vars
[-NamingConventions::Capitalization]
#[-NamingConventions::ProhibitMixedCaseSubs]
#[-NamingConventions::ProhibitMixedCaseVars]

[-RegularExpressions::RequireDotMatchAnything]
[-RegularExpressions::RequireLineBoundaryMatching]

# I want to write "my $str = '';"
[-ValuesAndExpressions::ProhibitEmptyQuotes]

[-ValuesAndExpressions::ProhibitNoisyQuotes]

[-ValuesAndExpressions::ProhibitMagicNumbers]

# 'minimum_regex_length_to_complain_about' option not available on Debian package :( 
[-RegularExpressions::RequireExtendedFormatting]

# I want to write "my $str = '';"
[-ValuesAndExpressions::ProhibitEmptyQuotes]

[-ValuesAndExpressions::ProhibitNoisyQuotes]



#------------------
# Modified Policies
#------------------

[ControlStructures::ProhibitPostfixControls]
allow = if 

[Documentation::RequirePodSections]
lib_sections    = NAME | AUTHOR
script_sections = NAME | SYNOPSIS | AUTHOR

[InputOutput::ProhibitBacktickOperators]
only_in_void_context = 1

[InputOutput::RequireBriefOpen]
lines = 30 