in reply to Re: Test::Exception extension with (evil?) overloading
in thread Test::Exception extension with (evil?) overloading
Good option. Only downside is that you lose the prototyping of the test functions, and the calling syntax is a little more complex (in my opinion).
You would also need to have it as:
wrapper (\&is, sub {$o->answer}, 42, 'answer returned 42')
(we can only prototype the sub away if the coderef is the first argument)
One other problem would be in figuring out the test name to output when an exception is thrown. Since it's optional for test subs it may, or may not, be the last argument.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Test::Exception extension with (evil?) overloading
by Aristotle (Chancellor) on Jan 18, 2003 at 20:40 UTC | |
by adrianh (Chancellor) on Jan 18, 2003 at 21:50 UTC | |
by Aristotle (Chancellor) on Jan 18, 2003 at 22:11 UTC | |
by adrianh (Chancellor) on Jan 18, 2003 at 23:15 UTC |