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

NAME

Module::Checkstyle::Check::Variable - Checks variable declarations

LIMITATIONS

The checks provided by this module currently only works for variables declared using my, our or local. It may in the future also support use vars qw(...); style declarations.

The checks arrays-in-plural and hashes-in-singular works best with the english language and may not always be correct. Internally it uses Lingua::EN::Inflect::Number that relies on Lingua::EN::Inflect do determine plural/singular forms.

CONFIGURATION DIRECTIVES

Variable name

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

matches-name = qr/\w+/

Name arrays in plural

Checks that an array has a plural name as in @values but not @value. Set arrays-in-plural to a true value to enable.

arrays-in-plural = true

Name hashes in singular

Checks that a hash has a singular name as in %key but not %keys. Set hashes-in-singular to a true value to enable.

hashes-in-singular = true

SEE ALSO

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

Module::Checkstyle

Lingua::EN::Inflect::Number

Lingua::EN::Inflect