Branch Coverage

blib/lib/File/Tabular.pm
Criterion Covered Total %
branch 130 206 63.1


line true false branch
304 0 0 $y > 50 ? :
0 0 if defined $y and $y < 100
325 3 0 ref $_[-1] eq 'HASH' ? :
339 0 3 if $self->{'fieldSep'} =~ /%/l
347 0 3 unless $self->_open($self->{'FH'}, @_)
350 0 3 if $flockAttempts > 0
352 0 0 if flock $self->{'FH'}, $flockMode
353 0 0 $n > 1 ? :
357 1 2 if (exists $args->{'journal'})
361 0 1 ref $args->{'journal'} eq 'ARRAY' ? :
0 1 unless $self->_open($j->{'FH'}, ref $args->{'journal'} eq "ARRAY" ? @{$$args{"journal"};} : ">>$args->{'journal'}")
370 0 3 exists $args->{'printHeaders'} ? :
371 2 1 if $must_print_headers
393 2 3 @_ > 2 ? :
0 5 @_ > 3 ? :
0 5 ref $_[1] eq 'GLOB' ? :
397 5 0 if $result and $self->{'crlf'}
406 755 13 if (defined $line)
419 216 119 if ($self->{'autoNumField'})
421 8 208 if ($vals[$ix] =~ s/$self->{'autoNumChar'}/$self->{'autoNum'}/l) { }
206 2 elsif ($vals[$ix] =~ /(\d+)/l) { }
426 24 182 if $next_autonum > $self->{'autoNum'}
465 0 385 ref $_[0] eq 'HASH' ? :
466 361 24 if (@args)
467 4 357 if $args[0] =~ /^where$/il
468 0 361 if @args != 1
470 4 357 if $filter and not ref $filter eq "CODE"
478 382 372 if $filter and not &$filter($r)
482 186 186 if ($self->{'autoNumField'})
484 0 186 if $n and $n + 1 > $self->{'autoNum'}
549 0 9 ref $_[0] eq 'HASH' ? :
552 0 2 if wantarray and $args{'orderBy'} || $args{'key'}
555 0 0 if $args{'orderBy'} and $args{'key'}
557 0 2 ref $args{'key'} ? :
7 2 !$args{'key'} ? :
560 4 5 if $filter and not ref $filter eq "CODE"
562 2 7 if (@k) { }
563 0 2 if $args{'orderBy'}
564 0 2 if wantarray
575 99 228 if wantarray
578 0 7 if ($args{'orderBy'})
579 0 0 if wantarray
583 0 0 $tmp eq 'CODE' ? :
0 0 $tmp eq 'ARRAY' ? :
586 2 5 wantarray ? :
723 4 6 ref $_[0] eq 'ARRAY' ? :
725 0 10 if $nArgs % 3
735 10 6 if ($pos == -1) { }
2 8 elsif (not $TMP and $self->stat->{'size'} > $self->{'dataStart'}) { }
738 2 8 $TMP ? :
743 0 2 unless $TMP = "File::Temp"->new
744 2 0 if $self->{'crlf'}
752 0 16 if $. > $pos
758 0 10 unless defined $line
765 0 6 unless defined $line
768 0 16 if ref $lines eq "HASH"
771 2 8 if $TMP
791 3 1 ref $_[0] eq 'ARRAY' ? :
837 0 2 unless @_
843 0 2 unless $clone->{'FH'} = "File::Temp"->new
844 2 0 if $self->{'crlf'}
856 6 14 exists $modifs{$k} ? :
857 18 2 if $data
873 19 19 unless $self->{'journal'}
883 7 12 if (/ARRAY/l)
884 2 17 if (/HASH/l)
909 0 1 if $self->{'journal'}
911 0 1 unless $self->_open($J, @_)
927 2 117 if (/^CLEAR/l)
928 100 17 if (/^ROW/l)
929 8 9 if (/^SPLICE/l)
930 0 8 if ($nRows || 0) != @rows
931 7 1 $nRows ? :
934 5 4 if (/^ENDSPLICES/l)
937 3 1 if (/^KEY/l)
938 0 3 if ($nRows || 0) > 1
939 2 1 $nRows ? :
942 1 0 if (/^ENDKEYS/l)
1056 0 9 if ref $query eq "Regexp"
1058 9 0 unless (ref $query eq "HASH")
1063 0 9 unless eval 'sub {no warnings "numeric"; (' . $code . ') ? $_[0] : undef;}'
1083 0 10 unless $mandatory or $optional
1085 2 8 if $exclude
1098 1 12 if (/^\(\)$/l)
1109 7 5 if ($subQ->{'field'})
1110 2 5 if ($subQ->{'field'} eq 'K_E_Y') { }
1116 0 5 unless my $fieldNum = $self->ht->{$subQ->{'field'}}
1122 7 5 if (/^:$/l)
1143 6 1 $s =~ /^\w/l ? :
1144 6 1 $s =~ /\w$/l ? :
1146 3 4 if $self->{'avoidMatchKey'} and not $subQ->{'field'}
1149 7 0 $noHighlights ? :
1156 0 5 if (/^#$/l)
1158 0 0 $has_state ? :
1180 5 0 if /^(!)~$/l or /^()=?~$/l
1184 0 0 $subQ->{'value'} =~ /$self->{'rxNum'}/l ? :
0 0 $subQ->{'value'} =~ /$self->{'rxDate'}/l ? :
1187 0 0 if /^=?=$/l
1188 0 0 if /^(?:!=|<>)$/l
1189 0 0 if /^>$/l
1190 0 0 if /^>=$/l
1191 0 0 if /^<$/l
1192 0 0 if /^<=$/l