in reply to Testing for exceptions with Test::More

I tried Test::Trap with perl5i, which has builtin support for Try::Tiny and Modern::Perl;
#!perl use perl5i::2; use Test::More tests => 3; use Test::Trap; my $caught; my @trap = trap { some_code($caught = $_);}; is( $trap->exit, 1, 'Expecting &some_code to exit with 1' ); is( $trap->stdout, '', 'Expecting no stdout' ); like( $trap->stderr, qr/exception keyphrase/, 'tested_sub(): Expecting warnings.' );