On 2/1/07, Adrian Howard <[EMAIL PROTECTED]> wrote:
On 1 Feb 2007, at 16:28, Joshua ben Jore wrote:
[snip]
> There's is nothing special about what T::E is doing to detect errors -
> it just turns out the popular practice of looking at $@ is flawed.
> That's a problem with the pattern and I expect that what it means is
> that if T::E starts detecting errors that were previously being
> ignored that the user really ought to be fixing up their code because
> that's buggy as well.

I don't like labelling the change in behaviour an error. Sometimes it
might be. Sometimes it might not. I'd like T::E to support both
options. Especially since the errors can be in third party code that
doesn't affect the behaviour of the code under test.

Ok, I'll give you that a user may want to ignore errors that occur
during scope cleanup but from the point of view of T::E, it seems
relatively clear that an error really has occurred. I'd tend to think
that T::E's default behavior would be to be as careful as possible and
only less so if the user asks for it. I think it'd be great if a
user's tests break because T::E changed. That'd mean there's something
they were probably overlooking. They're forced to react to it. That's
good, isn't it? Just because modules use T::E without error *today*
doesn't mean they should pass tomorrow if and when bugs in T::E are
discovered.

I'd be a happy guy if a paranoid T::E caused consternation and people
to post "OMG! My stuff fails now!" to perlmonks or whatever.

Josh

Reply via email to