Module::Checkstyle::Check::Variable - Checks variable declarations
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.
- 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
@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
%keys. Set hashes-in-singular to a true value to enable.
hashes-in-singular = true
Writing configuration files. "Format" in Module::Checkstyle::Config