Capture::Tiny provides a simple, portable way to capture almost
anything sent to STDOUT or STDERR, regardless of whether it comes
from Perl, from XS code or from an external program.