Branch Coverage

blib/lib/File/Sort.pm
Criterion Covered Total %
branch 103 218 47.2


line true false branch
17 7 0 if (ref $args[0]) { }
20 0 7 if (exists $args[0]{'pos'})
24 0 0 unless (ref $pos)
28 0 0 if (not exists $args[0]{'k'}) { }
0 0 elsif (not ref $args[0]{'k'}) { }
36 0 0 if (/^\+(\d+)(?:\.(\d+))?([bdfinr]+)? (?:\s+\-(\d+)(?:\.(\d+))?([bdfinr]+)?)?$/lx)
39 0 0 if defined $2
40 0 0 if $3
42 0 0 if (defined $4)
43 0 0 defined $5 ? :
44 0 0 if $6
62 0 7 $$opts{'R'} ? :
65 6 1 unless ref $$opts{'I'}
67 0 7 unless @{$$opts{'I'};}
70 2 5 $$opts{'k'} ? :
71 2 5 $$opts{'k'} ? :
7 0 unless ref $$opts{'k'}
74 0 7 !$$opts{'o'} ? :
83 0 7 if ($$opts{'c'}) { }
0 7 elsif ($$opts{'m'}) { }
87 0 0 if ($$opts{'I'}[0] eq '-') { }
88 0 0 unless open F, $$opts{'I'}[0]
91 0 0 unless sysopen F, $$opts{'I'}[0], 0
97 0 0 if ($$opts{'u'} and $last)
98 0 0 unless _are_uniq($$opts{'K'}, $last, $rec)
102 0 0 if ($last)
104 0 0 if ($$opts{'K'}) { }
112 0 0 if $foo[0] ne $last or $foo[1] ne $rec
130 0 0 unless sysopen $sym, $filein, 0
144 0 8 if $$opts{'D'}
146 0 8 if ($filein eq '-') { }
147 0 0 unless open F, $filein
150 0 8 unless sysopen F, $filein, 0
158 100 4624 if ($count >= $$opts{'y'})
160 0 100 if $$opts{'D'}
170 2 98 if (@fh >= $$opts{'F'})
175 0 2 if $$opts{'D'}
184 5 2 if (@recs)
185 0 5 if $$opts{'D'}
187 3 2 if ($$opts{'K'}) { }
199 7 0 unless fileno $close == fileno STDOUT
201 0 7 if $$opts{'D'}
222 5 4 if @$recs
224 0 9 if $$opts{'D'}
227 0 9 if ($file eq '') { }
7 2 elsif (not ref $file) { }
234 0 7 unless sysopen $tfh, $file, 577
244 9 307 if (not $$opts{'u'} and keys %File::Sort::fh == 1)
247 5 4 $first eq 'X' ? :
255 307 0 if ($$opts{'K'}) { }
266 0 307 if ($$opts{'u'}) { }
267 0 0 if not $uniq or _are_uniq($$opts{'K'}, $uniq, $File::Sort::fh{$first})
278 0 307 $first eq 'X' ? :
280 209 98 if (defined $rec) { }
295 4 101 if not ${$_[0];}[-1] =~ m[$/$]l
300 0 100 unless my $temp = _get_temp()
304 0 100 if $$opts{'D'}
306 100 0 if ($$opts{'K'}) { }
326 0 2 defined $4 ? :
338 2 4 if $opts{$_}
342 2 0 if (not $opts{'kst'} || $opts{'kft'}) { }
344 3 9 if $$topts{$_}
345 3 9 if $$topts{$_}
351 0 0 if $opts{'kst'} =~ /$_/l or $opts{'kft'} =~ /$_/l
352 0 0 if $opts{'kst'} =~ /$_/l or $opts{'kft'} =~ /$_/l
363 5 2 if ($$topts{'K'})
366 4 26 if $$topts{$_}
370 0 5 if ($$topts{'kst'} =~ /[bdfi]/l)
377 5 2 if ($$topts{'K'}) { }
378 0 5 if $$topts{'D'}
384 2 3 if $$topts{'r'}
387 2 3 if $$topts{'n'}
393 0 5 if $$topts{'D'}
398 0 5 if $@
400 0 5 if $@
406 2 0 defined $$topts{'t'} ? :
0 2 defined $$topts{'X'} ? :
410 0 2 if defined $$topts{'X'}
419 0 2 $k eq 'K' ? :
421 2 0 if ($k ne 'K') { }
422 0 2 $$opts{'kff'} ? :
426 0 2 if ($$opts{'kst'} =~ /b/l)
430 0 2 if ($$opts{'kft'} =~ /b/l)
435 2 0 if (not defined $$opts{'kff'} or $$opts{'ksf'} == $$opts{'kff'}) { }
438 2 0 if ($$opts{'ksc'} == 0 and !$$opts{'kfc'} || $$opts{'kfc'} == 0) { }
0 0 elsif (not $$opts{'kfc'}) { }
457 0 0 if ($$opts{'kfc'} == 0 and $$opts{'ksc'} == 0 and not $$opts{'kst'} =~ /b/l and not $$opts{'kft'} =~ /b/l) { }
0 0 elsif ($$opts{'kff'} - $$opts{'ksf'} == 1) { }
476 0 0 $$opts{'kst'} =~ /b/l ? :
481 0 2 if ($$opts{'kst'} =~ /f/l)
486 0 2 if ($$opts{'kst'} =~ /d/l) { }
0 2 elsif ($$opts{'kst'} =~ /i/l) { }
497 0 2 if $$opts{'kst'} =~ /d/l
501 1 1 if $$opts{'kst'} =~ /r/l
504 2 0 if $$opts{'kst'} =~ /n/l
511 0 2 if (@fil > 1) { }
521 2 0 unless ($$topts{'u'})
523 1 1 $$topts{'r'} ? :
533 0 4 $$topts{'k'}[0] eq 'K' ? :
536 0 4 if $$topts{'DD'}
538 4 0 if @mapsub
542 0 2 if $$topts{'D'}
546 0 197 unless $$b[2] <=> $$a[2]
547 0 2 if $@
549 0 2 if $@
551 0 2 if $@
566 0 0 if ($nok) { }
585 0 0 if /^=head1 SYNOPSIS$/l
589 0 0 if /^=/l