NAME

Launcher::Cascade::Container - a class to run L::C::Base launchers in cascade

SYNOPSIS

    use Launcher::Cascade::Base::...;
    use Launcher::Cascade::Container;

    my $launcher1 = new Launcher::Cascade::Base:... ...;
    my $launcher2 = new Launcher::Cascade::Base:... ...;
    my $launcher3 = new Launcher::Cascade::Base:... ...;

    my $container = new Launcher::Cascade::Container
	-launchers => [ $launcher1, $launcher2, $launcher3 ];

    $container->run_session();

DESCRIPTION

A L::C::Container object maintains a list of launchers, which are instances of L::C::Base or of its subclasses. The run_session() method let all the launchers run in turn and checks their status until all of them succeed or one of them fails.

Methods

launchers
launchers LIST
launchers ARRAYREF

Returns the list of Launcher::Cascade::Base objects that are to be run in this section.

When called with a LIST of arguments, this methods also sets the list of launchers to LIST. The argument can also be an ARRAYREF, in which case it will automatically be dereferenced.

All elements in LIST or ARRAYREF should be instances of Launcher::Cascade::Base or one of its subclasses.

add_launcher LIST

Pushes a launcher to list of launchers. All elements in LIST should be instances of Launcher::Cascade::Base or one of its subclasses.

is_success

Returns a true status if all the contained launchers are successfull (their is_success() yields true).

is_failure

Returns a true status if at least one contained launcher has failed (its is_failure() yields true).

status

Returns 1 if is_success(), 0 if is_failure() and undef if the status is yet undetermined, i.e. some launchers are still running or haven't run yet.

run
check_status

Invokes run(), respectively check_status() on all the contained launchers.

run_session

Launches run() and check_status() in loop, until either all the contained launchers are successfull or one of them fails.

SEE ALSO

Launcher::Cascade, Launcher::Cascade::Base

AUTHOR

Cédric Bouvier <cbouvi@cpan.org>

COPYRIGHT & LICENSE

Copyright (C) 2006 Cédric Bouvier, All Rights Reserved.

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

1 POD Error

The following errors were encountered while parsing the POD:

Around line 188:

Non-ASCII character seen before =encoding in 'Cédric'. Assuming CP1252