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

NAME

Bio::Grid::Run::SGE::Job - the container for settings and important functions

SYNOPSIS

    use Bio::Grid::Run::SGE::Job;

    my $j = Bio::Grid::Run::SGE::Job->new;
    $j->run(
      pre_task  => sub {...},
      task      => sub {...},
      post_task => sub {...},
      usage     => sub {...}
    );

DESCRIPTION

This class is never created directly, it is always created via L <Bio::Grid::Run::SGE> and exported as C <job()> function:

    use Bio::Grid::Run::SGE;
    
    my $j = job();
    $j->run(...);

ATTRIBUTES

my $log = $j->log()

Returns a Bio::Gonzales::Util::Log logging instance. Useful functions are

  • $log-debug("text")>

  • $log-info("text")>

  • $log-warn("text")>

  • $log-error("text")>

  • $log-fatal("text")>

  • $log-fatal_confess("text")>

METHODS

my $job_config = $j->conf or my $job_config = $j->config

Get (or change) the job configuration.

my $job_environment = $j->env

Get the job environment.

You can also change stuff, but be careful; you have been warned!

my $job_id = $j->job_id

The same as $j-env('job_id')>.

my $task_id = $j->task_id

The same as $j-env('task_id')>.

$j->sys(@command)

Runs command eiter as array or as simple string (see also system) and gives a warning message if something goes wrong.

It returns undef is something went wrong and 1 if the exit code of the program was ok.

$j->sys_fatal(@command)

Runs command eiter as array or as simple string (see also system) and dies if something goes wrong.

$j->sys_pipe(@command)
$j->sys_pipe_fatal(@command)

LIMITATIONS

SEE ALSO

Bio::Grid::Run::SGE

AUTHOR

jw bargsten, <jwb at cpan dot org>