NAME

AFFILIATION

DESCRIPTION

The package declaration should always match the name of the file that contains it. For example, package Foo::Bar; should be in a file called Bar.pm. This makes it easier for developers to figure out which file a symbol comes from when they see it in your code. For instance, when you see Foo::Bar->new(), you should be able to find the class definition for a Foo::Bar in a file called Bar.pm

Therefore, this Policy requires the last component of the first package name declared in the file to match the physical filename. Or if #line directives are used, then it must match the logical filename defined by the prevailing #line directive at the point of the package declaration. Here are some examples: