blib/lib/TAP/Parser/Iterator/Worker/LSF.pm untested

filter: Statementstmt 0.0% 0 / 25 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 39 CC 2 SCAR 12.0
CC
2
Cov
0%
_initialize
6.0
initialize_worker_command
2.0
BEGIN
2.0
CRAP 3.3
1 package TAP::Parser::Iterator::Worker::LSF;
2 use strict;
3  
4 use TAP::Parser::Iterator::Worker ();
5  
6 use vars qw($VERSION @ISA);
7 @ISA = 'TAP::Parser::Iterator::Worker';
8  
9 # new() implementation supplied by TAP::Object
10  
11 sub _initialize {
12 my ( $self, $args ) = @_;
13 $self->SUPER::_initialize($args);
14 my $out = $self->{out};
15 my $lsf_job_info = <$out>;
16 if ( $lsf_job_info && $lsf_job_info =~ /Job <(\d+)>/ ) {
17 $self->{lsf_job_id} = $1;
18 }
19 else {
20 print STDERR "failed to start an LSF job.\n";
21 return;
22 }
23 return $self;
24 }
25  
26 =head1 NAME
27  
28 TAP::Parser::Iterator::Worker::LSF - Iterator for LSF worker TAP sources
29  
30 =head1 VERSION
31  
32 Version 0.01
33  
34 =cut
35  
36 $VERSION = '0.01';
37  
38 =head3 C<initialize_worker_command>
39  
40 Initialize the command to be used to initialize worker.
41  
42 For your specific command, you can subclass this to put your command in this method.
43  
44 =cut
45  
46 sub initialize_worker_command {
47 my $self = shift;
48 my $commands = $self->SUPER::initialize_worker_command;
49 $commands->[0] = 'bsub ' . $commands->[0];
50 return $commands;
51 }
52  
53 1;
54  
55 __END__