use Try::Tiny ':capture'; #use Capture::Tiny;
try {
....
}
catch {
...
log( 'Died. Its output is:' . $stdout );
}
capture $stdout, $stderr;
I can not figure out easy and not ugly structure to capture output with Capture::Tiny
It will be not hard if this will be implemented:
dagolden/Capture-Tiny#34