NAME

McFeely::Metatask - Treat a group of McFeely::Task objects as a single task.


SYNOPSIS

  use McFeely::Job;
  use McFeely::Task;
  use McFeely::Metatask;

  $task1 = McFeely::Task->new($host1, $command1, @args1);
  $task2 = McFeely::Task->new($host2, $command2, @args2);
  $task3 = McFeely::Task->new($host3, $command3, @args3);
  $meta = McFeely::Metatask->new($task2, $task3);
  $job = McFeely::Job->new($task1, $meta);
  $job->add_dependencies(
      $meta->requires($task1);
  );
  $job->enqueue or die $job->errstr, "\n";


DESCRIPTION

See above.


METHODS

new( TASK, [TASK, ...] )

Creates a McFeely::Metatask. This acts exactly like (and in fact ISA) a McFeely::Task and supports all the rest of the latter's methods.

add_tasks ( TASK, [TASK, ...] )

This acts exactly like the method of the same name in McFeely::Job. See the documentation in McFeely::Job for more information.

add_dependencies( REQUIREMENT, [REQUIREMENT, ...] )

This acts exactly like the method of the same name in McFeely::Job and supports setting up intra-metatask dependencies. See the documentation in McFeely::Job for more information.


SEE ALSO

McFeely::Job, McFeely::Task


AUTHOR

Matt Liggett, <mml@pobox.com>