Module::Checkstyle::Check::Subroutine - Checks length, naming etc. of named subroutines


Subroutine name

Checks that a subroutine is named correctly. Use matches-name to specify a regular expression that must match.

matches-name = qr/\w+/

Subroutine length

Checks that named subroutines doesn't exceed a specified length. Use max-length to specify the maximum number of lines a subroutine may be.

max-length = 40

No declaration of subroutines with a fully qualified name

Checks if a subroutine is declared with a fully qualified name. That if it contains :: or '. Set no-fully-qualified-names to a true value to enable.

no-fully-qualified-names = true

Calling subroutines with ampersand

Checks if a subroutine is called with an ampersand (like Perl4). This check ignores calls with ampersand to functions where there are no arguments to honor shared @_. Set no-calling-with-ampersand to a true value to enable.

no-calling-with-ampersand = true


Writing configuration files. "Format" in Module::Checkstyle::Config