| line |
true |
false |
branch |
|
62
|
0 |
52 |
if ($opt =~ /--rc=([^\s]+)/) |
|
65
|
1 |
51 |
if $rc == 1 |
|
66
|
1 |
50 |
if $opt eq '--rc' |
|
77
|
26 |
78 |
unless $dir |
|
79
|
77 |
1 |
unless -e $file |
|
92
|
0 |
2 |
if /\A\s*\Z/ms |
|
93
|
2 |
0 |
if (/\A(\w+):\s*(.+)\Z/ms) |
|
95
|
1 |
1 |
if ($key eq 'file') { } |
|
132
|
2 |
24 |
unless GetOptionsFromArray $argv, 'file=s@', \$$config{'file'}, 'd|delimiter=s', \$$config{'delimiter'}, 'f|fields=s', \$$config{'fields'}, 't|through', \$$config{'through'}, 'di|digit=i', \$$config{'digit'}, 's|strict', \$$config{'strict'}, 'no-comma', \$$config{'no_comma'}, 'tsv', \$$config{'tsv'}, 'csv', \$$config{'csv'}, 'more', \$$config{'more'}, 'cr', \$$config{'cr'}, 'crlf', \$$config{'crlf'}, 'rc=s', \$$config{'rc'}, 'h|help', sub {
$self->_show_usage(1);
}
, 'v|version', sub {
print "stats v$VERSION\n";
exit 1;
} |
|
149
|
23 |
1 |
unless ($$config{'digit'} and $$config{'digit'} =~ /^\d+$/) |
|
153
|
21 |
3 |
unless defined $$config{'delimiter'} |
|
155
|
9 |
15 |
if ($$config{'fields'}) { } |
|
171
|
0 |
24 |
if (not IO::Interactive::Tiny::is_interactive(*STDIN)) { } |
|
|
22 |
2 |
elsif (scalar @{$self->config->{'file'};}) { } |
|
181
|
1 |
21 |
unless open my $fh, '<', $file |
|
201
|
20 |
137 |
if $self->config->{'through'} |
|
203
|
3 |
154 |
unless $line |
|
214
|
10 |
188 |
unless $self->config->{'field'}{$i} |
|
215
|
188 |
0 |
if (not $strict and $element =~ /\d/ or $strict and $element =~ /^(\d+\.?(:?\d+)?)$/) |
|
221
|
188 |
0 |
if not defined $$r{$i}{'max'} or $num > $$r{$i}{'max'} |
|
223
|
29 |
159 |
if not defined $$r{$i}{'min'} or $num < $$r{$i}{'min'} |
|
225
|
26 |
162 |
if $self->config->{'more'} |
|
234
|
0 |
29 |
unless $$r{$i}{'count'} |
|
238
|
4 |
25 |
if ($self->config->{'more'}) |
|
252
|
0 |
14 |
unless ref $list eq 'ARRAY' |
|
253
|
2 |
12 |
unless @{$list;} > 1 |
|
256
|
6 |
6 |
if $element_count & 1 |
|
266
|
0 |
12 |
unless ref $list eq 'ARRAY' |
|
267
|
2 |
10 |
unless @{$list;} > 1 |
|
272
|
4 |
37 |
unless $hash{$key} == $max_val |
|
282
|
2 |
16 |
unless @{$list;} > 1 |
|
290
|
2 |
10 |
unless @{$$r{$i}{'list'};} > 1 |
|
291
|
4 |
6 |
defined $$r{$i}{'variance'} ? : |
|
318
|
2 |
21 |
unless $self->result->{'show_result'} |
|
321
|
2 |
19 |
if ($self->config->{'tsv'}) { } |
|
|
2 |
17 |
elsif ($self->config->{'csv'}) { } |
|
331
|
1 |
19 |
$self->config->{'crlf'} ? : |
|
|
1 |
20 |
$self->config->{'cr'} ? : |
|
346
|
16 |
32 |
if not $self->config->{'more'} and $MORE_RESULT{$col} |
|
347
|
8 |
24 |
if $col eq '_line_' |
|
366
|
56 |
148 |
if not $self->config->{'more'} and $MORE_RESULT{$col} |
|
367
|
34 |
114 |
if ($col eq '_line_') |
|
383
|
33 |
33 |
unless $self->config->{'csv'} |
|
391
|
12 |
190 |
unless defined $value |
|
393
|
25 |
165 |
if ($value =~ /\./) |
|
397
|
158 |
32 |
unless ($self->config->{'no_comma'}) |
|
400
|
20 |
138 |
$d ? : |