On Oct 24, 2010, at 1:23 PM, Ricardo Signes wrote:


Test::Exception (and its terrifying prereq, Sub::Uplevel) have caused us a few
breaks-in-blead situations.

This week, I released Test::Fatal, which provides a much simpler way to test for code that throws exceptions. It uses Try::Tiny and does not try to hide
its calling stack frames.

The branch rfc/test-fatal completely removes any dependency on Test::Exception, and thus on Sub::Uplevel. I had originally planned to rewrite all the test files, but this quickly became too boring and overwhelming. Instead, after the
first pile of rewriting, I wrote a thin API compatibility layer with
Test::Exception. It would be nice to continue to remove its use, but I think
it is totally safe.

It is also reasonable to consider not making Test::Fatal a prereq, but to
inline its &exception into t::lib::TestFatal.

I did not touch *any* code in *.pm files and all tests still pass. There seems
to be a measurable but tiny performance increase. :)

--
rjbs


+1

Test::Exception has been the source of some of the "1/2 of CPAN" dependency chains I have encountered while installing Moose on bare machines. I think this is a good direction for sure.

As for making it a prereq or not, I think prereq is fine.

- Stevan

Reply via email to