in reply to Re^6: Modern Perl Programming Highs and Lows
in thread Modern Perl Programming Highs and Lows
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';
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Modern Perl Programming Highs and Lows
by chromatic (Archbishop) on Apr 30, 2009 at 18:12 UTC | |
|
Re^8: Modern Perl Programming Highs and Lows
by diotalevi (Canon) on May 10, 2009 at 16:36 UTC | |
by educated_foo (Vicar) on May 10, 2009 at 22:45 UTC | |
by diotalevi (Canon) on May 11, 2009 at 02:13 UTC |