1 # For testing Test::Simple;
2 # $Id: /mirror/googlecode/test-more-trunk/t/lib/Test/Simple/Catch.pm 67132 2008-10-01T01:11:04.501643Z schwern $
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 ) }