The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Janus::Sequence

SYNOPSIS

 use Janus::Sequence;

 my $seq = Janus::Sequence->new
 ( 
     name => 'alpha',
     conf => '/conf/file',
     code => '/code/file'
 );

 $seq->run( ctrl => sub { .. }, cache => {}, batch => [ .. ], .. );

CONFIGURATION

code

See Janus::Sequence::Code.

conf

See Janus::Sequence::Conf.

PARAMETERS

Default value in ().

 timeout : ( 0 = no timeout ) seconds allotted for a stage to run.
 retry : ( 0 ) number of retries when error occurs.
 redo : ( 0 ) number of redoes after a stage is released from error.

METHODS

load()

Loads code then conf. Returns invoking object.

load_code()

Loads code file. Returns invoking object.

load_conf()

Loads conf file. Returns invoking object.

check()

run( %param )

Runs sequence. Returns invoking object. In addition to default paramaters, the following may also be defined in %param.

 log : code that deals with logging.
 stuck : code that deals with stuck logic.
 exclude : code that deals with exclusion.
 batch : code required by PLUGIN.
 cache : a HASH reference, for passing context.
 alarm : SIGALRM handler.

PLUGIN

a CODE reference, which can expect the following parameters:

 log : a CODE reference.
 param : if any, loaded from config.
 batch : if defined, loaded from run() parameter.
 cache : a HASH reference, that may be loaded from run() parameter.