I'll just start out by saying I am not at all experienced with creating Perl modules so I'm sorry if I'm way off here.
Let's say I am creating a few modules:
foo::bar
foo::bar::a
foo::bar::b
Since I don't know what they are called, I am calling the a.pm and b.pm modules "sub modules" since they are related to the bar.pm module, but could still be somewhat independent.
So one of my Perl scripts could use foo::bar::a, another script could use foo::bar::b, and maybe I have another script that needs to use functions from both "a" and "b". Instead of saying this:
use foo::bar;
use foo::bar::a qw(one two);
use foo::bar::b;
I want to do something like this:
use foo::bar qw(:a :b);
In my mind, that would give my script access to everything in bar.pm, a.pm, and b.pm.
I tested something like this, and I was obviously wrong.
Is something like this possible? I suppose I could have bar.pm use a.pm and b.pm, and then have "wrapper" functions that pass the call onto the "sub modules" but it seems like there would be an easier way.
Thanks in advance!
Brian