- Original Message -
From: chromatic chroma...@wgz.org
To: perl-qa@perl.org
Cc: Michael G Schwern schw...@pobox.com
Sent: Thursday, 27 October 2011, 9:36
Subject: Re: Event handling: One method per event or one method for all?
On Wednesday, October 26, 2011 at 09:58 PM, Michael G
On Wednesday, October 26, 2011 at 09:58 PM, Michael G wrote:
So now the question is one of good event handler design, which I don't have
experience with. How does one design a good event handler? Is the pattern
one method per type of event? Or one method to do the dispatching? Or
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