1 # For testing Test::Simple;
3 package Test::Simple::Catch;
7 my( $out_fh, $err_fh ) = ( gensym, gensym );
8 my $out = tie *$out_fh, 'TieOut';
9 my $err = tie *$err_fh, 'TieOut';
12 my $t = Test::Builder->new;
14 $t->failure_output($err_fh);
15 $t->todo_output($err_fh);
17 sub caught { return( $out, $err ) }