Test::Builder2::Formatter - Base class for formating test results
package Test::Builder2::Formatter::SomeFormat; use Test::Builder2::Mouse; extends "Test::Builder2::Formatter;
Test::Builder2 delegates the actual formating of test results to a Test::Builder2::Formatter object. This can then decide if it's going to formatter TAP or XML or send email or whatever.
Contains the class to use to make a Streamer.
Defaults to $formatter->default_streamer_class
$formatter->default_streamer_class
Contains the Streamer object to write to. One will be created for you using $formatter->streamer_class.
$formatter->streamer_class
my $formatter = Test::Builder2::Formatter->new(%args);
Creates a new formatter object to feed results to.
You want to call this on a subclass.
$formatter->accept_event($event, $event_coordinator);
Accept Events as they happen.
See Test::Builder2::EventWatcher for details.
$formatter->accept_result($result, $event_coordinator);
Formats a $result (an instance of Test::Builder2::Result).
$output->write($destination, @text);
Outputs @text to the named $destination.
@text
@text is treated like print, so it is simply concatenated.
print
In reality, this is a hand off to $formatter->streamer->write.
$formatter->streamer->write
To install Test::Simple, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Simple
CPAN shell
perl -MCPAN -e shell install Test::Simple
For more information on module installation, please visit the detailed CPAN module installation guide.