http://www.perlmonks.org?node_id=1014784


in reply to Module's name and file's name

What exact problems do you have with these modules?

use just makes <ModuleName>.pm file from @INC be evaluated at the beginning of program (BEGIN{} block). <ModuleName>.pm can define any packages it wants to, but it's not a common way of writing modules.

So, if MyModule.pm contains this code:

package NotMyModule; sub function { 1 }
you can use its functions in your program by calling them by package names, not by the name of the file:
use MyModule; NotMyModule::function;

By the way, one file can define more than one package, thus making fatpacking modules in an application possible.

Sorry if my advice was wrong.