From: Michael G Schwern <schw...@pobox.com>
Date: Fri, 13 Mar 2009 19:09:08 -0700
Local: Fri, Mar 13 2009 10:09 pm
Subject: Re: [test-more-users] Re: Test::Builder calling convention
Aristotle Pagaltzis wrote: That's even worse than $ok->flush. It's like having a toilet that you have to > * Michael G Schwern <schw...@pobox.com> [2009-03-13 19:55]: >> I don't like the complexity and magic of determining when the >> result should output and would like to see and good ideas on >> that. > Hmm, `undef $ok` sounds like a perfectly good explicit interface take the lid off the tank and pull the stopper manually [1] and the plumber's fix is to put up a sign that says "to flush open tank, pull stopper". The whole problem is that they have to think about this at all. That its an { $builder->ok( $another_test ) } If object destruction causes output, the second test will be output before the first. To avoid this, the test author has to add an $ok->flush (or undef $ok or whatever) once they're done with the object. No matter how much we document it, this is a bug generator. It also means if a user innocently stores $ok they might not get output until > And variable scope is a nice Reimplementing Perl's control structures is a road I do not want to walk down. > implicit interface. If you want a less manual interface, you can > always add a method or two to do this: > $builder [1] I realize I may have lost the Europeans with this analogy. -- You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||