Module::Checkstyle::Check::Block - Check bracketing etc.
Sets default values for opening-curly, closing-curly and ignore-on-same-line. The following default styles are available:
Opening and closing curly brackets are placed on lines by themselves.
if(x == y) { something(); } else { somethingelse(); }
Defaults are opening-curly = alone, closing-curly = alone and ignore-on-same-line = true.
opening-curly = alone
closing-curly = alone
ignore-on-same-line = true
Opening and closing curly brackets are placed on lines by themselves
if (x == y) { something (); } else { somethingelse (); }
Opening curly bracket is placed on the same line as the keyword that defined the block.
if (x == y) { something(); } else { somethingelse(); }
Defaults are opening-curly = same, closing-curly = same and ignore-on-same-line = true.
opening-curly = same
closing-curly = same
Defaults are opening-curly = same, closing-curly = alone and ignore-on-same-line = true.
Controls the position of an opening curly bracket. Set opening-curly to either 'alone' or 'same'.
opening-curly = alone | same
Controls the position of a closing curly bracket. Set closing-curly to either 'alone' or same'.
closing-curly = alone | same
Set ignore-on-same-line to a true value to ignore opening-curly and closing-curly when the curlies appear on the same line. This is useful for expressions such as my @x = map { $_ + 1 } @y;.
my @x = map { $_ + 1 } @y;
Writing configuration files. "Format" in Module::Checkstyle::Config
Module::Checkstyle
To install Module::Checkstyle, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Module::Checkstyle
CPAN shell
perl -MCPAN -e shell install Module::Checkstyle
For more information on module installation, please visit the detailed CPAN module installation guide.