From Jasper Lievisse Adriaanse <jasper at nedbsd.nl>.
The IO::Capture Module defines an abstract base class that can be used to create any number of useful sub-classes that capture output being sent on a filehandle such as STDOUT or STDERR.