File Coverage

lib/App/SimulateReads/Role/ParseArgv.pm
Criterion Covered Total %
statement 6 13 46.1
branch 0 2 0.0
condition n/a
subroutine 2 3 66.6
pod 0 1 0.0
total 8 19 42.1


line stmt bran cond sub pod time code
1             package App::SimulateReads::Role::ParseArgv;
2             # ABSTRACT: Getopt::Long wrapper.
3              
4 1     1   609 use App::SimulateReads::Base 'role';
  1         2  
  1         9  
5 1     1   628 use Getopt::Long 'GetOptionsFromArray';
  1         8158  
  1         5  
6              
7             our $VERSION = '0.05'; # VERSION
8              
9             sub parser {
10 0     0 0   my ($self, $argv, @opt_spec) = @_;
11 0           my @argv = @{ $argv };
  0            
12 0           my %opts;
13              
14 0           Getopt::Long::Configure('gnu_getopt');
15              
16 0 0         GetOptionsFromArray(
17             \@argv,
18             \%opts,
19             @opt_spec
20             ) or die "Error parsing command-line arguments\n";
21            
22 0           return (\%opts, \@argv);
23             }
24              
25             __END__
26              
27             =pod
28              
29             =encoding UTF-8
30              
31             =head1 NAME
32              
33             App::SimulateReads::Role::ParseArgv - Getopt::Long wrapper.
34              
35             =head1 VERSION
36              
37             version 0.05
38              
39             =head1 AUTHOR
40              
41             Thiago L. A. Miller <tmiller@mochsl.org.br>
42              
43             =head1 COPYRIGHT AND LICENSE
44              
45             This software is Copyright (c) 2017 by Teaching and Research Institute from Sírio-Libanês Hospital.
46              
47             This is free software, licensed under:
48              
49             The GNU General Public License, Version 3, June 2007
50              
51             =cut