| Module Info
| Add a review of Test-Warn
Test::Warn provides a way to test the warnings output by your Perl program.
The syntax of the tests seems odd to me, but it was clear enough what to do from the examples provided. Test::Warn seems fairly comprehensive since it also coped with warnings emitted by carp/croak.
The best thing about it is that it is fully integrated with Test::More, so you don't have to do any extra fiddling to get this to work beyond installing it.
Just as a side note, and regarding the review I wrote of Test::Pod::Coverage, this is yet another module which fails to install because of failed pod tests. If you are on Cygwin and this fails to install, remove t/pod.t and all will be well.
I used to not test warnings. And they made my test output ugly. With this package those problems are gone. Now I test warnings and have beautifully clean test output.
It does what it says. In a good way.
The sub names could have been more in line with e.g. Test::Exception, but it works.
The interface is a little awkward, but it works well and allows you to test warnings.
Handy module for unit testing code that may throw warnings.