Module::Checkstyle::Check::Package - Handles 'package' declarations
Checks that your package is named correctly. Use matches-name to declare a regular expression that must match.
matches-name = /^\w+(\:\:\w+)*$/
Checks that you only declare a specified number of packages in a single source file. Use max-per-file to set the maximum number of package-statements allowed. You usually want this to be set to 1.
package
max-per-file = 1
Checks that the the first significantstatement in a file is a package-declaration. Enable by setting package-comes-first to true. This test is only enabled if the parsed file ends with .pm
.pm
is-first-statement = true
Checks that at least one package in the given file matches the name of the file. That is if the file is named lib/Module/Checkstyle.pm it must declare Module::Checkstyle as a package in the file. Enable by setting has-matching-filename to true.
has-matching-filename = true
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.