« lib/Bio/Roary/FilterUnknownsFromFasta.pm
↑ Summary
lib/Bio/Roary/Output/GroupsMultifastasNucleotide.pm »
| 1 | package Bio::Roary::JobRunner::Local; | ||||||||||
| 2 | 13 | $Bio::Roary::JobRunner::Local::VERSION = '3.13.0'; | |||||||||
| 3 | # ABSTRACT: Execute a set of commands locally | ||||||||||
| 4 | |||||||||||
| 5 | |||||||||||
| 6 | 13 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 13 | ▶ | use Log::Log4perl qw(:easy); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 13 | has 'commands_to_run' => ( is => 'ro', isa => 'ArrayRef', required => 1 ); | |||||||||
| 10 | 13 | has 'logger' => ( is => 'ro', lazy => 1, builder => '_build_logger'); | |||||||||
| 11 | 13 | has 'verbose' => ( is => 'rw', isa => 'Bool', default => 0 ); | |||||||||
| 12 | 13 | has 'memory_in_mb' => ( is => 'rw', isa => 'Int', default => '200' ); | |||||||||
| 13 | |||||||||||
| 14 | 37 | ▶ | sub run { | ||||||||
|
Subroutine
run: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 15 | 37 | my ($self) = @_; | |||||||||
| 16 | |||||||||||
| 17 | 37 | for my $command_to_run ( @{ $self->commands_to_run } ) { | |||||||||
| 18 | 34 | $self->logger->info($command_to_run); | |||||||||
| 19 | 34 | system($command_to_run ); | |||||||||
| 20 | } | ||||||||||
| 21 | 37 | 1; | |||||||||
| 22 | } | ||||||||||
| 23 | |||||||||||
| 24 | |||||||||||
| 25 | sub _construct_dependancy_params | ||||||||||
| 26 | 0 | ▶ | { | ||||||||
|
Subroutine
_construct_dependancy_params: not called CC=1 SCAR=6.9
| |||||||||||
| 27 | 0 | my ($self) = @_; | |||||||||
| 28 | 0 | return ''; | |||||||||
| 29 | } | ||||||||||
| 30 | |||||||||||
| 31 | 0 | ▶ | sub submit_dependancy_job { | ||||||||
|
Subroutine
submit_dependancy_job: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 32 | 0 | my ( $self,$command_to_run) = @_; | |||||||||
| 33 | 0 | $self->logger->info($command_to_run); | |||||||||
| 34 | 0 | system($command_to_run ); | |||||||||
| 35 | } | ||||||||||
| 36 | |||||||||||
| 37 | sub _build_logger | ||||||||||
| 38 | 21 | ▶ | { | ||||||||
|
Subroutine
_build_logger: called CC=2 SCAR=7.1
| |||||||||||
| 39 | 21 | my ($self) = @_; | |||||||||
| 40 | 21 | my $level = $ERROR; | |||||||||
| 41 | 21 | ▶ | if($self->verbose) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 42 | { | ||||||||||
| 43 | 0 | $level = $DEBUG; | |||||||||
| 44 | } | ||||||||||
| 45 | 21 | Log::Log4perl->easy_init($level); | |||||||||
| 46 | 21 | my $logger = get_logger(); | |||||||||
| 47 | 21 | return $logger; | |||||||||
| 48 | } | ||||||||||
| 49 | |||||||||||
| 50 | 13 | ▶ | no Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 51 | 13 | __PACKAGE__->meta->make_immutable; | |||||||||
| 52 | |||||||||||
| 53 | 13 | 1; | |||||||||
| 54 | |||||||||||
| 55 | __END__ | ||||||||||