http://www.perlmonks.org?node_id=1098869


in reply to Sending module output to STDOUT in test

If you're willing to use STDERR, you'd just need to prove --merge ...

If you really want to send to STDOUT instead of STDERR, you could use something like Test::Trap to capture STDOUT to send to diag().

use Test::More; use Test::Trap; my @r = trap { some_code(@some_parameters) }; diag($trap->stdout);