Subject: | eo option doesn't work with JobManager |
Date: | Tue, 18 Aug 2015 16:20:50 +0000 |
To: | "bug-LSF [...] rt.cpan.org" <bug-LSF [...] rt.cpan.org> |
From: | Richard Gunning <rg12 [...] sanger.ac.uk> |
the -eo paramater (error overwrite) doesn’t work when submitting jobs through LSF::JobManager (fine through LSF::Job)
The problem is in parse_flags. When validating flags, LSF::JobManager will only accept single character jobs
sub parse_flags{
my @defaults = @_;
my %hash;
while(local $_ = shift @defaults){
if(/^(-\w)(.*)/){
my($flag,$value) = ($1,$2);
if($value ne ''){
$hash{$flag} = $value;
}elsif($defaults[0] !~ /^-\w/){
$hash{$flag} = shift @defaults;
}else{
$hash{$flag} = undef;
}
}
}
return ( %hash );
}
I believe changing the sub to the following will fix the problem.
sub parse_flags{
my @defaults = @_;
my %hash;
while(local $_ = shift @defaults){
if(/^(-\w+)(.*)/){
my($flag,$value) = ($1,$2);
if($value ne ''){
$hash{$flag} = $value;
}elsif($defaults[0] !~ /^-\w/){
$hash{$flag} = shift @defaults;
}else{
$hash{$flag} = undef;
}
}
}
return ( %hash );
}
Richard
Message body not shown because it is not plain text.