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.

Replies are listed 'Best First'.
Re^2: Module's name and file's name
by beurive.denis (Novice) on Jan 22, 2013 at 20:53 UTC

    Hello Aitap,

    I just add a new message that describes the problem.

    But I have not many details to give. I though that the problem came from the naming convention... I did not look further.

    I'll look tomorrow, if I have some time.

    Regards

    Denis