in reply to Redirecting STDOUT
Test::More->diag() and other test methods are not printing to STDOUT, but to three Test::Builder file handles that default to (dupes of) STDOUT/STDERR/STDOUT respectively.
If you want them all to print to your local STDOUT, I guess this would do it:
my $Test = Test::Builder->new; my @handle_names = qw/ output failure_output todo_output /; my %old; $old{$_} = $Test->$_ for @handle_names; $Test->$_(\*STDOUT) for @handle_names; eval { run_your_tests }; # and restore: $Test->$_($old{$_}) for @handle_names;
For more detail, see Test::Builder.
Update: I couldn't stand to see the cut-and-pasted list of handle names, so I added a variable for it. How's that for obsessive? :-P
print "Just another Perl ${\(trickster and hacker)},"
The Sidhekin proves Sidhe did it!
|
---|
In Section
Seekers of Perl Wisdom