Don't make things harder than they need to be. Perl will do just fine if you put modules in paths that make sense.
For example, if you put Utils.pm in the perl/ directory, and then push into @INC the path "common\perl", Perl will search there for it. If you had a module named Utils::Foo, you sould put foo.pm in "Common\Perl\Utils\", and with the same "common\perl" entry in @INC, Perl will find it. Add entries to @INC with the use lib pragma, or by pushing within a BEGIN{} block.
But if you put Utils::Foo in "Common\Perl\Bar\", Perl won't find it. The '::' in the module name is an indicator to Perl that it needs to start with the paths listed in @INC, plus the directory that is the same as whatever lies to the left of the :: (in this case Utils), and then look for the file named after whatever comes to the right of :: (in this case Foo.pm).
Any other module placement strategy is just going to create more work.
See perlvar for an explanation of @INC, and then perlmod for discussion of modules. perlmodlib also offers a few suggestions on module naming and placement within the file structure.
Dave
In reply to Re: Need help with includes in subdirectories
by davido
in thread Need help with includes in subdirectories
by Seventh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |