use Test::More tests => 1; # Just for example... use Try::Tiny; my $caught; try { # Call to subroutine being tested. } catch { $caught = $_ }; ok( defined( $caught ), "tested_sub(): Threw an exception given XYZ params" ); like( $caught, qr/exception keyphrase/, "tested_sub(): Proper exception reported for xyz." );