schwern/test-more — Issue #256: Use Carp
Author: schwern
Created: 2012-02-23 20:55:28+00:00
State: open
Labels: Easy, Gardening, Test-Builder2

Previously, we avoided using Carp because if Test::More loads too many modules it might interfere with testing if a module will load on its own. For example, if a module forgets to load Carp it will work in the tests but not in production.

I don't believe this position is tenable any longer. Our Carp work around (see _carp() in Test::More) only works one level down. TB2 has far deeper nesting of errors and needs the ability to look up through packages. Rather than reimplement this, I think it's better to just use Carp. The bump to 5.8 means we can use more core modules, which will load Carp (and other modules).

* Replace _carp() with real calls to Carp
* Remove the Carp exception from .perlcriticrc