Test-More / TB2

Test::Builder version 2, the next generation of building testing modules in Perl
Other
1 stars 0 forks source link

Add a safe eval BLOCK #118

Closed schwernbot closed 10 years ago

schwernbot commented 10 years ago

From: @notbenh Date: Friday Sep 24, 2010 at 05:03 GMT Orig: https://github.com/Test-More/test-more/issues/82

Test::Builder has _try() to avoid blowing over $@ and $! when it eval BLOCKs. Put that into a role so TB2 can use it and then use it.

Replace History's _try hack with that.

All evals should be replaced with _try if possible.

schwernbot commented 10 years ago

From: @schwern Date: Sunday Jan 09, 2011 at 11:31 GMT Orig: https://github.com/Test-More/test-more/issues/82#issuecomment-664120

TB2::CanTry provides try() as a role. History is using it.