use Test::More; use Test::FailWarnings; use Capture::Tiny qw( capture_merged ); ok( my $dummy = capture_stdout{ my $d = choose( function( { opt1 => val1 } ) } ); ok( my $dummy = capture_stdout{ my $d = choose( function( { opt2 => val2 } ) } ); done_testing;