in reply to A brief question about testing/best practices

If you want to have 100% testable code, you have to change your coding habits. It means your main program basically becomes
use ModuleA; use ModuleB; use Runner; Runner::run(@ARGV);

As an intermediate step, you can also test existing programs by calling them via an IPC method and examining the output or exit status.

لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^2: A brief question about testing/best practices
by Amblikai (Scribe) on Jan 20, 2015 at 20:26 UTC

    Thanks, what do you mean by an IPC method?

      He means "Inter-Process Communication". Some other program calls your program, or vice versa.

      So if you have a program that is supposed to check a web service in a couple ways, you get some other second program to call yours with the various inputs needed, and then you have that second one check the output it got from each way you called the service.

      It's called "black-box testing". See my other reply.