use Test::Simple 'no_plan'; sub throws_ok(&@) { my ($test, $qr, $msg) = @_; eval { shift->() }; ok($@ =~ /$qr/, $msg); } throws_ok { die "blah" } qr/bla/, 'blah blah';
In reply to Re^7: Modern Perl Programming Highs and Lows
by educated_foo
in thread Modern Perl Programming Highs and Lows
by derby
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |