Verby::Dispatcher - Takes steps and executes them. Sort of like what make(1) is to a Makefile.
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;
Returns a new Verby::Dispatcher. Duh!
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.
Calculate all the dependencies using Algorithm::Dependency::Objects, and then dispatch in order.
The class used to instantiate the dependecy resolver. Defaults to Algorithm::Dependency::Objects::Ordered. Subclass if you don't like it.
A setter getter for the Verby::Config::Data (or compatible) object from which we will derive the global context, and it's sub-contexts.
Returns the global context for the dispatcher.
If necessary derives a context from "config_hub".
Whether or not $step is currently executing.
Whether or not $step does not need to be executed (because it was already executed or because it didn't need to be in the first place).
Returns the context associated with $step. This is where $step will write it's data.
Returns the contexts to derive from, when creating a context for $step.
If $step starts a new context ("provides_cxt" in Step is true) then a new context is created here, derived from get_parent_cxts($step). Otherwise it simply returns get_parent_cxts($step).
Note that when a step 'provides a context' this really means that a new context is created, and this context is derived for the step, and any step that depends on it.
If $step depends on any other steps, take their contexts. Otherwise, returns the global context.
If step supports the async interface, start it and put it in the running step queue. If it's synchroneous, call it's "do" in Step method.
Finish step, and mark it as satisfied. Only makes sense for async steps.
Put $step in the running queue, and mark it in the running step set.
Push $step into the running step queue.
Pop a step from the running queue.
Creates a new object using "dep_engine_class".
Returns the steps to be executed in order.
Give every running step a bit of time to move things forward.
This method is akin to "pump" in IPC::Run.
It also calls "finish_step" on each step that returns false.
Returns a list of steps that the dispatcher cares about.
Returns the Set::Object that is used for internal bookkeeping of the steps involved.
Returns a list of steps currently running.
Returns the Set::Object that is used to track which steps are running.
Returns the Set::Object that is used to track which steps are satisfied.
Wait for all the running steps to finish.
Effectively finish_step(pop_running).
finish_step(pop_running)
Waits for a specific step to finish. Called by pump_running when a step claims that it's ready.
None that we are aware of. Of course, if you find a bug, let us know, and we will be sure to fix it.
We use Devel::Cover to test the code coverage of the tests, please refer to COVERAGE section of the Verby module for more information.
Yuval Kogman, <nothingmuch@woobling.org> stevan little, <stevan@iinteractive.com>
Copyright 2005, 2006 by Infinity Interactive, Inc.
http://www.iinteractive.com
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Verby, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Verby
CPAN shell
perl -MCPAN -e shell install Verby
For more information on module installation, please visit the detailed CPAN module installation guide.