On Tue, 04 Oct 2005 20:45:22 -0400, Tom Allison wrote: > Maybe my problem is more pandemic than that. > > I have some 200 scripts that I've written over the years and they kind > of all sit in ~/bin with all the modules in ~/lib > I was hoping to avoid 200 scripts and 200 modules. > > But it sounds like the only way to avoid that, and support testing at > the same time, is to write less scripts in the first place.
Well, same number of scripts but more modules. You could do black box testing. After all, "containing subroutines" won't mean much if each script contains one subroutine definition and a line that calls it. It's still just as likely that testing the subroutine would result in unwanted external side effects as testing the script would. So make tests that just run the scripts and then examine the outputs. If there are unwanted side effects you can't undo from the test then you need to modify the script in some way. This is why writing the tests *before* writing the code makes life so much easier. Still, that's hindsight. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>