On Sat, Oct 04, 2003 at 02:34:14PM -0400, James E Keenan wrote:
>
> .. that package Drawing is so huge that it's cumbersome to edit and you simply want
> to store some of its publicly callable methods in other packages. If so, then you
> could simply import the methods from the "sub"-modules using Exporter.
>
> package Drawing;
> use Drawing::Manipulate qw(Move Copy);
> use Drawing::Defined;
> ...
>
> package Drawing::Manipulate;
> use Exporter;
> @ISA = ("Exporter");
> @EXPORT = qw(Move Copy);
While this is certainly more explicit, it also means that every time
you create or rename a shared routine, you have to declare and at least
two places. Perhaps being explicit is it's own reward. I know I've found
that maintaining export/import interfaces between highly related modules
to be cumbersome at times.
I can't see I have a better pattern to suggest for this case, rather
it's a question I've run into myself and haven't fully resolved.
Mark
--
http://mark.stosberg.com/