in reply to Deliberate failure in Test::More

If you wanna test whether an exception was thrown, try to catch one and report whether one was thrown or not.
my $incomplete = eval { Foo->new( first_name => 'Joe', ) }; ok( !$incomplete );

You could be more specific and check whether the right exception was thrown.

You might also like Test::Exception

Replies are listed 'Best First'.
Re^2: Deliberate failure in Test::More
by macrobat (Beadle) on Jun 07, 2010 at 06:53 UTC
    Thanks. I was trying to do that, but somewhere I was spacing out on capturing it. I'll check out Test::Exception.