in reply to Complex module testing

I prefer anything that helps automate the tests, so interactive prompts are a drawback. They can still be handy as a fall back when there isn't any environment variable or config file available, but don't force someone to type in additional info every time the tests are run.

The Test::Cmd module provides a model for reading and writing files for testing. It's based on the testing conventions for the Aegis change management system: all files get created in one or more temporary directories; you don't rely on being in any special directory or having any special config files in place for the tests to run. Test::Cmd provides a portable API for managing this and cleaning up afterwards.

If you don't find Test::Cmd useful for your purposes, you might get some ideas from looking at the tests for the module, which do this same sort of test-file management without using Test::Cmd itself.