use Test::More; use Test::Fatal; use Capture::Tiny qw( capture_merged ); $SIG{__WARN__} = sub { die @_ }; is( exception { my $dummy = capture_merged{ function( { opt1 => val1 } ) } }, undef, "{ opt1 => val1 } does not warn" ); is( exception { my $dummy = capture_merged{ function( { opt2 => val2 } ) } }, undef, "{ opt2 => val2 } does not warn" ); done_testing;