Branch Coverage

blib/lib/File/Tabular.pm
Criterion Covered Total %
branch 131 204 64.2


line true false branch
302 0 0 $y > 50 ? :
0 0 if defined $y and $y < 100
324 3 0 ref $_[-1] eq 'HASH' ? :
340 0 3 if $$self{'fieldSep'} =~ /%/l
350 0 3 unless _open($$self{'FH'}, @_)
352 2 1 $$args{'flockMode'} || $_[0] =~ />|\+
354 0 3 if $flockAttempts > 0
356 0 0 if flock $$self{'FH'}, $flockMode
357 0 0 $n > 1 ? :
361 1 2 if (exists $$args{'journal'})
365 0 1 ref $$args{'journal'} eq 'ARRAY' ? :
0 1 unless _open($$j{'FH'}, ref $$args{'journal'} eq 'ARRAY' ? @{$$args{'journal'};} : ">>$$args{'journal'}")
374 0 3 exists $$args{'printHeaders'} ? :
2 1 if exists $$args{'printHeaders'} ? $$args{'printHeaders'} : $_[0] =~ />/l
397 2 3 @_ > 2 ? :
0 5 @_ > 3 ? :
0 5 ref $_[1] eq 'GLOB' ? :
401 5 0 if $result
412 688 12 if (defined $line)
424 216 119 if ($$self{'autoNumField'})
426 8 208 if ($vals[$ix] =~ s/$$self{'autoNumChar'}/$$self{'autoNum'}/l) { }
206 2 elsif ($vals[$ix] =~ /(\d+)/l) { }
430 24 182 if $1 + 1 > $$self{'autoNum'}
468 0 317 ref $_[0] eq 'HASH' ? :
469 293 24 if (@args)
470 4 289 if $args[0] =~ /^where$/il
471 0 293 if @args != 1
473 4 289 if $filter and not ref $filter eq 'CODE'
481 382 305 if $filter and not &$filter($r)
485 186 119 if ($$self{'autoNumField'})
487 0 186 if $n and $n + 1 > $$self{'autoNum'}
552 0 8 ref $_[0] eq 'HASH' ? :
554 0 2 if wantarray and $args{'orderBy'} || $args{'key'}
557 0 8 if $args{'orderBy'} and $args{'key'}
560 0 2 ref $args{'key'} ? :
6 2 !$args{'key'} ? :
563 3 5 if $filter and not ref $filter eq 'CODE'
565 2 6 if (@k) { }
566 0 2 if $args{'orderBy'}
567 0 2 if wantarray
578 99 161 if wantarray
581 0 6 if ($args{'orderBy'})
582 0 0 if wantarray
584 0 0 $tmp eq 'CODE' ? :
0 0 $tmp eq 'ARRAY' ? :
589 2 4 wantarray ? :
726 4 6 ref $_[0] eq 'ARRAY' ? :
728 0 10 if $nArgs % 3
738 10 6 if ($pos == -1) { }
2 8 elsif (not $TMP and $self->stat->{'size'} > $$self{'dataStart'}) { }
739 2 8 $TMP ? :
746 0 2 unless $TMP = 'File::Temp'->new
755 0 16 if $. > $pos
761 0 10 unless defined $line
768 0 6 unless defined $line
771 0 16 if ref $lines eq 'HASH'
774 2 8 if $TMP
794 3 1 ref $_[0] eq 'ARRAY' ? :
840 0 2 unless @_
846 0 2 unless $$clone{'FH'} = 'File::Temp'->new
859 6 14 exists $modifs{$k} ? :
860 18 2 if $data
876 19 19 unless $$self{'journal'}
886 7 12 if (/ARRAY/l)
887 2 17 if (/HASH/l)
912 0 1 if $$self{'journal'}
914 0 1 unless _open($J, @_)
930 2 117 if (/^CLEAR/l)
931 100 17 if (/^ROW/l)
932 8 9 if (/^SPLICE/l)
933 0 8 if ($nRows || 0) != @rows
935 7 1 $nRows ? :
938 5 4 if (/^ENDSPLICES/l)
941 3 1 if (/^KEY/l)
942 0 3 if ($nRows || 0) > 1
944 2 1 $nRows ? :
947 1 0 if (/^ENDKEYS/l)
1061 0 8 if ref $query eq 'Regexp'
1063 8 0 unless (ref $query eq 'HASH')
1068 0 8 unless eval 'sub {no warnings "numeric"; (' . $code . ') ? $_[0] : undef;}'
1088 0 9 unless $mandatory or $optional
1090 2 7 if $exclude
1103 1 11 if (/^\(\)$/l)
1114 6 5 if ($$subQ{'field'})
1115 2 4 if ($$subQ{'field'} eq 'K_E_Y') { }
1120 0 4 unless my $fieldNum = $self->ht->{$$subQ{'field'}}
1127 7 4 if (/^:$/l)
1148 6 1 $s =~ /^\w/l ? :
1149 6 1 $s =~ /\w$/l ? :
1151 3 4 if $$self{'avoidMatchKey'} and not $$subQ{'field'}
1154 7 0 $noHighlights ? :
1161 0 4 if (/^#$/l)
1163 0 0 $has_state ? :
1185 4 0 if /^(!)~$/l or /^()=?~$/l
1188 0 0 $$subQ{'value'} =~ /$$self{'rxNum'}/l ? :
0 0 $$subQ{'value'} =~ /$$self{'rxDate'}/l ? :
1196 0 0 if /^=?=$/l
1197 0 0 if /^(?:!=|<>)$/l
1198 0 0 if /^>$/l
1199 0 0 if /^>=$/l
1200 0 0 if /^<$/l
1201 0 0 if /^<=$/l