> Is this overloading of my own namespace the right way to go,
> or should I be
> using some more rigorous method? I imagine that the entire
> distribution
> could eventually be rather complicated, so I'd like to start
> down the path to
> robustness with this next revamp.
I see no problem the approach you have described.
Its not particularly common, but nor is it unusual. Carp for instance uses it, as do a few other commonly used modules.
It sounds to me like you could also inheritance for this (forget about everything you've ever heard about doing 'OO' the right way. In perl there aint no such thing.).
In this model each package essentially becomes a provider of services. Using multiple inheritance at a higher level you can mix and match which services you need at which level.
A core aspect however is that they all probably need to descend from a base class which handles object construction. This way they function as stand alone methods or also as mix-ins. So long as the new constructor resolves to the same method irrespective of the inheritance heirarchy I dont see any reason not to do this.
And again its not a particularly uncommon setup. For instance services provided by Exporter and Dynaloader are provided this way.
Frankly the one route I would not go (already covered nicely in the list) is to use exporter . Ive gone that road before and its a PITA.
:-)
Yves
