doy / try-tiny

minimal try/catch with proper preservation of $@
http://metacpan.org/release/Try-Tiny
10 stars 15 forks source link

FR (Feature Request): allow STDOUT, STDERR capturing #24

Open KES777 opened 9 years ago

KES777 commented 9 years ago

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: https://github.com/dagolden/Capture-Tiny/issues/34