in reply to Re^4: Test::Exception extension with (evil?) overloading
in thread Test::Exception extension with (evil?) overloading
None syntactically, but the amount of required magic feels like a kludge.
But I just thought of something - how about:
sub lives_and (&$) { my ( $test, $name ) = @_; local $@; eval { $test->() } and return 1; fail $name; diag "Died: $@"; return; } lives_and { is $o->answer(), 42, shift } 'answer is 42';
Makeshifts last the longest.
In Section
Seekers of Perl Wisdom