in reply to A test harness for scripts

Shell scripts could also be tested by using a DEBUG var to suppress their normal output and run a "test mode" that does all the normal Test::Harness output. This solution would probably get complex fast. IPC::Open3 will likely be better.

Basic CGIs can be run on the command line by faking the HTTP request to the program's STDIN. You might be able to do the same with mod_perl code if it's not too fancy. I don't think there is a good way to test ApacheHandlers without an actual Apache server.

If you use HTML::Template, and if you don't mind a blatent plug for my own module, you can use HTML::Template::Dumper to remove all the "design fluff" in the CGI output. It allows you to directly inspect the datastructure sent to the template. Using it in a test situation is exactly what it's designed for.

----
: () { :|:& };:

Note: All code is untested, unless otherwise stated