Depending on what semantics you intend, this simple case seems to be adequately covered by either: is eval { $o->answer }, 42, 'answer returned 42'; ormy $result = lives_ok {$o->answer} 'answer worked'; is $result, 42, 'answer returned 42';
is do { lives_ok {$o->answer} 'answer worked' }, 42, 'answer returned 42';
The former treats the exception and is as a single test, the latter as two separate ones.
I looked at your Test::Exception and don't see any other tests that make sense to combine with a Test::More test.
So I'd say what you should do is document these memes in your POD rather than writing any code.
Makeshifts last the longest.
In reply to Re: Test::Exception extension with (evil?) overloading
by Aristotle
in thread Test::Exception extension with (evil?) overloading
by adrianh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |