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
« Drivers/Hmmer/Model/Temporary.pm ↑ Summary 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.210160';
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 use Exporter::Easy (
10 8 OK => [ qw(stringify_args) ],
11 8 ▶);
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13  
14 # TODO: add function for redirecting to /dev/null
15  
16 sub stringify_args {
17 0 ▶ my $args = shift // {};
Subroutine stringify_args: not called CC=3 SCAR=24.8
Pod undocumented
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__
30  
31 =pod
32  
33 =head1 NAME
34  
35 Bio::MUST::Drivers::Utils - Utility functions for drivers
36  
37 =head1 VERSION
38  
39 version 0.210160
40  
41 =head1 SYNOPSIS
42  
43 # TODO
44  
45 =head1 DESCRIPTION
46  
47 # TODO
48  
49 =head1 AUTHOR
50  
51 Denis BAURAIN <denis.baurain@uliege.be>
52  
53 =head1 COPYRIGHT AND LICENSE
54  
55 This software is copyright (c) 2013 by University of Liege / Unit of Eukaryotic Phylogenomics / Denis BAURAIN.
56  
57 This is free software; you can redistribute it and/or modify it under
58 the same terms as the Perl 5 programming language system itself.
59  
60 =cut
« Drivers/Hmmer/Model/Temporary.pm ↑ Summary Drivers/Blast/Database/Temporary.pm »