in reply to Loading modules through one main module?

That's no problem assuming your submodule is named "My_Module::My_other_module". Just have My_Module.pm say use My_Module::My_other_module.

(I'm not trying to say they have to be nested like that, just that there is no automatic nesting done for you.)

Example:

$ cat script.pl use strict; use warnings; use Foo; print "calling Foo::mysub\n"; Foo::mysub(); print "calling Bar::mysub\n"; Bar::mysub(); $ cat Foo.pm package Foo; use strict; use warnings; use Bar; sub mysub { print "I'm a sub in ", __PACKAGE__, "\n" } 1; $ cat Bar.pm package Bar; use strict; use warnings; sub mysub { print "I'm a sub in ", __PACKAGE__, "\n" } 1; $ perl script.pl calling Foo::mysub I'm a sub in Foo calling Bar::mysub I'm a sub in Bar
All this applies if you are not exporting anything. If you want things from Bar to export to script, you can either set up Bar to export them (so they are imported to Foo) and Foo to export them also (so they are imported to script); or use Abigail's suggestion of export_to_level (see Exporter doc) to do it in one fell swoop.