NAME

Test2::Workflow::Task - Compiled form of a unit.

*** EXPERIMENTAL ***

This distribution is experimental, anything can change at any time!

DESCRIPTION

This object is a temporary object created by a runner to process Test2::Workflow::Unit objects.

SYNOPSIS

You rarely encounter a task object, they are mainyl used under the hood. When you do get one you usually just want to call iterate() on it. This can be done by treating it as a coderef.

$task->();

Or direcectly:

$task->iterate();

METHODS

$task->run()

Run the task, this should only every be done by a runner.

$task->iterate()

Sometimes tasks are recursive. This method is how they resume running in a recursive structure.

$task->reset()

Reset the task. This is rarely needed.

$ar = $task->args()

Get the args that will be passed to the primary actions.

$bool = $task->finished()

Check if the task has finished running.

$bool = $task->no_final()

True if the task is not required to generate events.

$bool = $task->subtest()

True if the task should produce a subtest.

$int = $task->events()

Number of events produced by the primary actions.

$int = $task->failed()

Number of failures produced inside the primary actions.

$int = $task->pending()

How many pending iterations remain.

$int = $task->stage()

What stage the task is in.

$msg = $task->exception()

If an exception has occured the message will be stored here.

$unit = $task->unit()

Get the unit the task wraps.

$runner = $task->runner()

Get the runner instance and/or class.

SOURCE

The source code repository for Test2-Workflow can be found at http://github.com/Test-More/Test2-Workflow/.

MAINTAINERS

Chad Granum <exodist@cpan.org>

AUTHORS

Chad Granum <exodist@cpan.org>

COPYRIGHT

Copyright 2015 Chad Granum <exodist7@gmail.com>.

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

See http://dev.perl.org/licenses/