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