in reply to Unique testing problem
Unless you've got a reason not to do so, change the exit to a die, then you can use an eval block to capture the exception in your testing code.
Example:
sub fall_over { die "Urgh!"; } eval { fall_over(); } print "We should have died!\n" if $@;
If the information in this post is inaccurate, or just plain wrong, don't just downvote - please post explaining what's wrong.
That way everyone learns.
|
|---|