NAME

Test::Builder2::Formatter::Multi - Use multiple formatters at once

SYNOPSIS

use Test::Builder2::Formatter::Multi;

my $multi = Test::Builder2::Formatter::Multi->new;
$multi->add_formatters($this_formatter, $that_formatter);

# Equivalent to
#   $this_formatter->accept_result($result, $ec);
#   $that_formatter->accept_result($result, $ec);
$multi->accept_result($result, $ec);

DESCRIPTION

This is a formatter which allows you to use multiple formatters at the same time. It does no work on its own but passes it on to its list of formatters. You might want this to store the results as TAP while also writing them out as HTML.

A Multi instance does not have a streamer of its own.

METHODS

This has all the normal methods of a Formatter plus...

formatters

Gets/sets the list of Formatter objects to multiplex to.

add_formaters

$multi->add_formatters(@formatters);

A convenience method to add @formatters to $multi->formatters.