יובל קוג'מן (Yuval Kogman) > Verby-0.05 > Verby::Dispatcher

Download:
Verby-0.05.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.05   Source  

NAME ^

Verby::Dispatcher - Takes steps and executes them. Sort of like what make(1) is to a Makefile.

SYNOPSIS ^

        use Verby::Dispatcher;
        use Verby::Config::Data; # or something equiv

        my $c = Verby::Config::Data->new(); # ... needs the "logger" field set

        my $d = Verby::Dispatcher->new;
        $d->config_hub($c);

        $d->add_steps(@steps);

        $d->do_all;

DESCRIPTION ^

ATTRIBUTES ^

resource_pool

If provided with a POE::Component::ResourcePool instance, that resource pool will be used to handle resource allocation.

The "resources" in Verby::Step method is used to declare the required resources for each step.

step_set

Returns the Set::Object that is used for internal bookkeeping of the steps involved.

satisfied_set

Returns the Set::Object that is used to track which steps are satisfied.

config_hub

The configuration hub that all contexts inherit from.

Defaults to an empty parameter set.

global_context

The global context objects.

Defaults to a derivation of config_hub.

METHODS ^

new

Returns a new Verby::Dispatcher. Duh!

add_steps *@steps
add_step *@steps

Add a number of steps into the dispatcher pool.

Anything returned from "depends" in Verby::Step is aggregated recursively here, and added into the batch too.

do_all

Calculate all the dependencies, and then dispatch in order.

syntax highlighting: