Provided by: libperl-critic-freenode-perl_0.028-1_all
Perl::Critic::Policy::Freenode::PackageMatchesFilename - Module files should declare a package matching the filename
Perl modules are normally loaded by "require" (possibly via "use" or "no"). When given a module name, "require" will translate this into a filename and then load whatever that file contains. The file doesn't need to actually contain a package matching the module name initially given to "require", but this can be confusing if later operations (including "import" as called by "use") expect the package to exist. Furthermore, the absence of such a package is usually an indicator of a typo in the package name. ## in file My/Module.pm package My::Module; This policy is similar to the core policy Perl::Critic::Policy::Modules::RequireFilenameMatchesPackage, but only requires that one package name within a module file matches the filename.
This policy is part of Perl::Critic::Freenode.
This policy is not configurable except for the standard options.
Dan Book, "firstname.lastname@example.org"
COPYRIGHT AND LICENSE
Copyright 2015, Dan Book. This library is free software; you may redistribute it and/or modify it under the terms of the Artistic License version 2.0.
Perl::Critic perl v5.28.1 Perl::Critic::Policy::Freenode::PackageMatchesFilename(3pm)