Test::Exception is very useful, but can be quite a bit more complicated than is clear. It uses Sub::Uplevel to hide its own place in the call stack, which is almost never necessary for testing, and can have bizarre side effects and interactions with "caller."
I suggest considering Test::Fatal, which has a much simpler API and implementation.
A "Must" module if you use die or carp in your code. This test module will be of great help, no more playing with eval.
I only wished 4 of the 6 provided functions would be removed from the API. lives_ok, IMHO, makes little sense and dies_ok is plain wrong. it's
easy to make a mistake and have a test pass a dies_ok while the real error is not the one documented in the message. I'd recommend to _not_ use dies_ok but to only use the superior throws_ok.
Well-documented testing extension which provides a means of testing code/methods that intentionally die, without resorting to 'eval'.
My previous complaints aboout the interface have been addressed by a documentation change in the last release. Author is very responsive and helpful.
Just a quick comment that you can use Test::Exception without prototypes if you so wish, and since 0.21 this is documented in the POD.
This module is just about a "must have" addition for testing if your code ever intentionally dies/croaks/throws on errors. It ought to be part of the core testing suite distributed with perl.
Very nice, very strightforward way of testing your exceptions. I highly recommend it.
A wonderful addition to the Test::* collection. It can be tough to test failure, and without a module like Test::Exception, I might be tempted to not bother testing those failures. Test::Exception makes a breeze.
1 hidden unhelpful review