in reply to Re: Thorny design problem
in thread Thorny design problem

How about just having a separate perl script for each company? It seems like the modularized approach isn't really doing all that much except managing a namespace and it adds a lot of complexity for little value that I can see.

I'm glad you brought this up. My main reason for using the module approach was so I could test the various internal functions that support the do_it API function. I find that there's a lot more support available for testing functions if they belong to a loadable module, though, admittedly, this rationale has a tail-wagging-the-dog ring to it.

the lowliest monk

Replies are listed 'Best First'.
Re^3: Thorny design problem
by xdg (Monsignor) on Sep 07, 2005 at 22:45 UTC

    You can have it both ways. See brian d foy's article 'How a script becomes a module'. Make it a module for testing purposes and a script otherwise.

    -xdg

    Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.