You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Test::Builder configures the TAP formatter directly. Things like whether it should use test numbers, whether it should show the TAP version or the header and so on.
This is dicey for several reasons...
The formatter may not be a TAP formatter and it doesn't always check.
Some changes are relevant to multiple types of formatters... some are not.
It's calling non-standard methods.
History and other event watchers do not see these changes which constitute special state changes.
It might make sense to instead have a Config event which contains key/value pairs to be configured.
# Signal not to use test numbers
my $config = Test::Builder2::Event::Config->new( use_test_numbers => 0 );
Each watcher can decide what to do with that information in accept_config. We can build up what various keys and values mean.
In addition, a Config event can contain special instructions for certain types of watchers. For example, this would indicate information only of interest to formatters.
Currently, Test::Builder configures the TAP formatter directly. Things like whether it should use test numbers, whether it should show the TAP version or the header and so on.
This is dicey for several reasons...
It might make sense to instead have a Config event which contains key/value pairs to be configured.
Each watcher can decide what to do with that information in
accept_config
. We can build up what various keys and values mean.In addition, a Config event can contain special instructions for certain types of watchers. For example, this would indicate information only of interest to formatters.
Passing stuff into
new
is equivalent to callingfor_class( "UNIVERSAL" => \%args )
.EventWatchers would ask the Config event for what is of interest to it.
The text was updated successfully, but these errors were encountered: