Test::Stream::State - Representation of the state of the testing


This distribution is deprecated in favor of Test2, Test2::Suite, and Test2::Workflow.

See Test::Stream::Manual::ToTest2 for a conversion guide.


$num = $state->count

Get the number of tests that have been run.

$num = $state->failed

Get the number of failures (Not all failures come from a test fail, so this number can be larger than the count).

$bool = $state->ended

True if the state has ended. This MAY return the stack frame of the tool that ended the test, but that is not guarenteed.

$bool = $state->is_passing

Check if the overall state is a failure. Can also be used to set the pass/fail status.


Increase the test count by one, $bool should be true if the new test passed, false if it failed.


Increase the failure count, and set is_passing to false.

$plan = $state->plan

Get or set the plan. The plan must be an integer larger than 0, the string 'no_plan', or the string 'skip_all'.

$state->finish([$package, $file, $line])

This is used to finalize the state, no changes should be made to the state after this is set.


The source code repository for Test::Stream can be found at


Chad Granum <>


Chad Granum <>
Kent Fredric <>


Copyright 2015 Chad Granum <>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.