lib/Bio/MUST/Drivers/Utils.pm

filter: Statementstmt 73.9% 17 / 23 Branchbran n/a Conditioncond 0.0% 0 / 5 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 83.3% 5 / 6 Podpod 0.0% 0 / 1 totaltotal 57.8% 22 / 38 CC 3 SCAR 16.3
CC
3
Cov
61%
stringify_args
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 5.1
« lib/Bio/MUST/Drivers/Hmmer/Model/Temporary.pm ↑ Summary lib/Bio/MUST/Drivers/Blast/Database/Temporary.pm »
1 package Bio::MUST::Drivers::Utils;
2 # ABSTRACT: Utility functions for drivers
3 8 $Bio::MUST::Drivers::Utils::VERSION = '0.252830';
4 8 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 8 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 8 ▶use autodie;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 8 ▶use feature qw(say);
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 8 ▶use Exporter::Easy (
Subroutine BEGIN: called CC=1 SCAR=0.0
10 8 OK => [ qw(stringify_args) ],
11 8 );
12  
13  
14 # TODO: add function for redirecting to /dev/null
15  
16 0 ▶sub stringify_args {
Subroutine stringify_args: not called CC=3 SCAR=24.8
Pod undocumented
17 0 ▶ my $args = shift // {};
Condition0%0/2
shift() // {}
l!l
00
MC/DC0%0/1
shift() // {}
shift()
Truth table0%0/2
A
A= shift()
Aresult
11
00
18  
19 my @cli_args = map { # concat opts with args and
20 0 ▶ join q{ }, $_, ( $args->{$_} // () ) # append boolean flags without
Condition0%0/3
$args->{$_} // ()
l!l&&r!l&&!r
000
MC/DC0%0/2
$args->{$_} // ()
$args->{$_} ()
Truth table0%0/3
A // B
A= $args->{$_}B= ()
ABresult
1X1
011
000
21 0 } keys %{$args}; # adding extra whitespace
22 0 my $args_str = join q{ }, @cli_args;
23  
24 0 return $args_str;
25 }
26  
27 8 1;
28  
29 __END__
« lib/Bio/MUST/Drivers/Hmmer/Model/Temporary.pm ↑ Summary lib/Bio/MUST/Drivers/Blast/Database/Temporary.pm »