File Coverage

blib/lib/Bio/MUST/Drivers/Utils.pm
Criterion Covered Total %
statement 15 21 71.4
branch n/a
condition 0 5 0.0
subroutine 5 6 83.3
pod 0 1 0.0
total 20 33 60.6


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.210160';
4 8     8   70 use strict;
  8         21  
  8         283  
5 8     8   51 use warnings;
  8         18  
  8         238  
6 8     8   46 use autodie;
  8         18  
  8         61  
7 8     8   45020 use feature qw(say);
  8         23  
  8         780  
8              
9             use Exporter::Easy (
10 8         111 OK => [ qw(stringify_args) ],
11 8     8   76 );
  8         28  
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.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