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