Event handling: One method per event or one method for all?

2011-10-26 Thread Michael G Schwern
tl;dr version: Is it better for event handlers to have one method per type of event? Or one method to accept all events? Or something else? Currently event handlers (called EventWatchers) in Test::Builder2 implement two methods: accept_event and accept_result. accept_result() is a special cas

Re: Subtest design in Test::Builder 1.5

2011-10-26 Thread Michael G Schwern
On 2011.10.26 12:55 PM, Eric Wilhelm wrote: > To be specific, I picture the interface as one of: > > a) subtest_start() must return the subtest handler object > (might be a new object, or just $self) > > or: > b) subtest_start() must return the $invocant, $method, %args for > construc

Re: Do we need subtests in TAP?

2011-10-26 Thread James E Keenan
On 10/25/11 11:56 PM, Michael G Schwern wrote: I keep looking at subtests and keeping thinking that if there wasn't a test count to manage, would we need subtests? Do we need all that complexity? If it's just about the test count, can it be managed a better way? I haven't followed this discu

Re: Do we need subtests in TAP?

2011-10-26 Thread Michael G Schwern
Adrian forgot to send this to the list. Original Message Subject: Re: Do we need subtests in TAP? Date: Wed, 26 Oct 2011 14:14:31 +0100 From: Adrian Howard To: Michael G Schwern Hey there, On 26 Oct 2011, at 04:56, Michael G Schwern wrote: > I understand wanting "blocks of

Re: Do we need subtests in TAP?

2011-10-26 Thread Randal L. Schwartz
> "David" == David Golden writes: David> I wonder how many people are using subtests with a plan and how many David> are replying on the implied "done_testIng" feature. I'm teaching it now, and I find it very valuable. subtest 'network tests' => sub { $ENV{NETWORK_TESTS} or

Re: Subtest design in Test::Builder 1.5

2011-10-26 Thread Eric Wilhelm
# from Michael G Schwern # on Wednesday 26 October 2011 09:51: >> Note that you should be able to allow e.g. "the new subtest object >> is just a copy of me" and other advanced usage without ceding all of >> the mechanics to the handler object. > >Ooh, good idea.  I think that's the clincher right

Re: Subtest design in Test::Builder 1.5

2011-10-26 Thread Michael G Schwern
On 2011.10.25 10:54 PM, Eric Wilhelm wrote: > I'm only working from intuition and my understanding of what you > described as the problem. If you try to implement a few scenarios of > special handler functionality using each design approach, that might > help clarify the issues. All I really h

Re: Do we need subtests in TAP?

2011-10-26 Thread Pedro Melo
Hi, On Wed, Oct 26, 2011 at 4:56 AM, Michael G Schwern wrote: > I keep looking at subtests and keeping thinking that if there wasn't a test > count to manage, would we need subtests?  Do we need all that complexity?  If > it's just about the test count, can it be managed a better way? > > I under

Re: Do we need subtests in TAP?

2011-10-26 Thread David Golden
On Tue, Oct 25, 2011 at 11:56 PM, Michael G Schwern wrote: > I keep looking at subtests and keeping thinking that if there wasn't a test > count to manage, would we need subtests?  Do we need all that complexity?  If > it's just about the test count, can it be managed a better way? I find several