Debian lenny version packages
[pkg-perl] / deb-src / libtest-simple-perl / libtest-simple-perl-0.80 / t / lib / Test / Simple / Catch.pm
1 # For testing Test::Simple;
2 package Test::Simple::Catch;
3
4 use Symbol;
5 use TieOut;
6 my($out_fh, $err_fh) = (gensym, gensym);
7 my $out = tie *$out_fh, 'TieOut';
8 my $err = tie *$err_fh, 'TieOut';
9
10 use Test::Builder;
11 my $t = Test::Builder->new;
12 $t->output($out_fh);
13 $t->failure_output($err_fh);
14 $t->todo_output($err_fh);
15
16 sub caught { return($out, $err) }
17
18 1;