The following has worked well for me:
This stores whatever $app->run sends to STDOUT in $add_io.use IO::String; ... my $add_io = IO::String->new; my $old_handle = select($add_io); ok( $app->run, 'ran app' ); select($old_handle); like( ${$add_io->string_ref}, qr|Location:|, q|got application redirect| ); undef $add_io;
In reply to Re: Perl Test - Capture print statements
by trwww
in thread Perl Test - Capture print statements
by iamdaboss
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |