Still curious - perhaps you can explain more about why you think this is
useful thing.

it's useful to me because I say it is. personally I don't feel the need to defend something many people would like to see this like we're being forced to here. schwern has a valid point in not wanting to lose diagnostics upon implementing this feature, but outside of that it wastes too many cycles going back and forth like this over what is a pretty minimal feature.

as for the diagnostics bit, it seems like the root cause of this is that the diagnostics functionality is separated from the comparison functionality in T::B in each of the different comparison subroutines. I think if ok() were to accept a diagnostic callback as a final argument things might work as we'd like. that is, instead of

  $self->ok($test, $name);
  $self->_is_diag($got, 'eq', $expect) unless $test;
  return $test;

we'd have

  $self->ok($test, $name, sub { $self->_is_diag($got, 'eq', $expect) });
  return $test;

and then the bailout logic could include diagnostics before quitting. at least for the functionality I'd most like to see - ovid has something similar but different in mind, so that would probably need a different approach.

or somesuch :)

--Geoff


Reply via email to