line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Bio::MUST::Drivers::Utils; |
2
|
|
|
|
|
|
|
# ABSTRACT: Utility functions for drivers |
3
|
|
|
|
|
|
|
$Bio::MUST::Drivers::Utils::VERSION = '0.191910'; |
4
|
8
|
|
|
8
|
|
111
|
use strict; |
|
8
|
|
|
|
|
20
|
|
|
8
|
|
|
|
|
296
|
|
5
|
8
|
|
|
8
|
|
45
|
use warnings; |
|
8
|
|
|
|
|
20
|
|
|
8
|
|
|
|
|
238
|
|
6
|
8
|
|
|
8
|
|
42
|
use autodie; |
|
8
|
|
|
|
|
21
|
|
|
8
|
|
|
|
|
63
|
|
7
|
8
|
|
|
8
|
|
45287
|
use feature qw(say); |
|
8
|
|
|
|
|
22
|
|
|
8
|
|
|
|
|
787
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
use Exporter::Easy ( |
10
|
8
|
|
|
|
|
129
|
OK => [ qw(stringify_args) ], |
11
|
8
|
|
|
8
|
|
64
|
); |
|
8
|
|
|
|
|
19
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# TODO: add function for redirecting to /dev/null |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub stringify_args { |
17
|
0
|
|
0
|
0
|
0
|
|
my $args = shift // {}; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
my @cli_args = map { # concat opts with args and |
20
|
0
|
|
0
|
|
|
|
join q{ }, $_, ( $args->{$_} // () ) # append boolean flags without |
21
|
0
|
|
|
|
|
|
} keys %{$args}; # adding extra whitespace |
|
0
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
my $args_str = join q{ }, @cli_args; |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
return $args_str; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
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.191910 |
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 |