| CPAN Ratings Test-Fatal reviews | |
| Home | Search | About | Bitcard Account | Login |
RSS | Module Info | Add a review of Test-Fatal
Test::Fatal is an excellent replacement for Test::Exception. It provides a clear API that will work with anything you throw at it, whereas Test::Exception occasionally causes problems due to its (almost entirely) unneeded use of Sub::Uplevel.
The module's API is simultaneously simpler and more flexible than T:E, providing one common function, exception { ... }, which you can combine with any testing function provided by Test::More or its confederates.
Shawn M Moore - 2011-03-10T06:01:54
I know this is still young, but its awesomeness is self evident when you use it. Test::Exception was good, but often lacking, to the point I often found myself injecting one-off utility functions in various tests to work around its failings.
Not to mention, to work with T::E you need a perfect memory, or you have to keep checking the POD to work out how it works.
Test::Fatal has none of these issues, because one function is easy to remember, easy enough to use every time, and its simple enough its easy to compose in-line into things.
Although T::E may be shorter in invocation, the psychological debit of using it is too high, and you can do most of what it does with combinations of 'is', and 'exception{ }' , combining the 2 things you know to provide a common goal, instead of needing to learn 3 things.
Additionally, foo { } @args style syntax looks frankly sodding horrible in test code, that missing "," always bites me in the ass.
Kent Fredric - 2010-11-03T07:22:52
|
Perl.org sites
: bugs
| dev
| history
| jobs
| learn
| lists
| use
Site Information and Contacts |
|