Output
NAME
Test::Builder::Output - handles output operations for Test::Builder objects
DESCRIPTION
The purpose of the Test::Builder::Output
class is to manage all output
operations for Test::Builder
objects. It is generally used for reporting
test results and displaying diagnostics for test failures.
NOTE: The Test::Builder::Output
class should not be used directly.
It is only meant to be used internally.
USE
Public Attributes
$.stdout
Specifies the filehandle that should be used for normal output such as reporting individual test results and the final pass/fail status.
Defaults to $*OUT
.
$.stderr
Specifies the filehandle that should be used for diagnostic messages such as test failures and other fatal errors.
Defaults to $*ERR
.
Object Initialization
new()
Returns a new Test::Builder::Output
instance.
Public Methods
write(Str $msg)
Writes the string given in $msg
to the filehandle specified by $.stdout
.
The write()
method is generally used for normal output such as reporting
test results.
diag(Str $msg)
Writes the string given in $msg
to the filehandle specified by $.stderr
.
The diagnostic messages displayed by diag()
are distinct from other output
in that they are always prefixed with an octothorpe (#
).