1# For testing Test::Simple; 2package Test::Simple::Catch; 3 4use strict; 5 6use Symbol; 7use TieOut; 8my( $out_fh, $err_fh ) = ( gensym, gensym ); 9my $out = tie *$out_fh, 'TieOut'; 10my $err = tie *$err_fh, 'TieOut'; 11 12use Test::Builder; 13my $t = Test::Builder->new; 14$t->output($out_fh); 15$t->failure_output($err_fh); 16$t->todo_output($err_fh); 17 18sub caught { return( $out, $err ) } 19 201; 21