Claes Jakobsson > Module-Checkstyle-0.04 > Module::Checkstyle::Check::Package

Download:
Module-Checkstyle-0.04.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  1
View/Report Bugs
Source  

NAME ^

Module::Checkstyle::Check::Package - Handles 'package' declarations

CONFIGURATION DIRECTIVES ^

Package naming

Checks that your package is named correctly. Use matches-name to declare a regular expression that must match.

matches-name = /^\w+(\:\:\w+)*$/

Max packages in single file

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.

max-per-file = 1

Package declaration is first statement

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

is-first-statement = true

Package in file matches filename

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

SEE ALSO ^

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

Module::Checkstyle

syntax highlighting: