Branch Coverage

blib/lib/Tie/FieldVals.pm
Criterion Covered Total %
branch 23 68 33.8


line true false branch
169 0 11 if $DEBUG
173 11 0 if (-r $datafile)
177 0 11 unless my $file_obj = tie(@records, 'Tie::File', "$datafile", 'recsep', "\n=\n", 'mode', 0, 'memory', 0)
187 11 0 if (defined $rec_str)
213 0 0 if $DEBUG
247 0 0 if $DEBUG
251 0 0 if ($self->{'FILE_OBJ'}->flock(@_))
323 0 10 if $DEBUG
338 0 10 if (-e $args{'datafile'} and not -r $args{'datafile'})
343 9 1 if (-e $args{'datafile'}) { }
348 0 9 unless $self->{'FILE_OBJ'} = tie(@records, 'Tie::File', "$args{'datafile'}", 'recsep', "\n=\n", 'mode', $args{'mode'}, 'memory', $args{'memory'})
354 0 1 if (not defined $args{'fields'} or ref $args{'fields'} ne 'ARRAY')
365 0 1 unless $self->{'FILE_OBJ'} = tie(@records, 'Tie::File', "$args{'datafile'}", 'recsep', "\n=\n", 'mode', $args{'mode'}, 'memory', $args{'memory'})
380 1 9 if ($args{'cache_all'})
399 0 915 if $DEBUG
402 301 614 if (defined $self->{'REC_CACHE'}{$ind}) { }
410 106 508 if (@cached >= $self->{'OPTIONS'}{'cache_size'})
419 614 0 if (defined $rec_str) { }
443 0 0 if $DEBUG
447 0 0 if (ref $val eq 'HASH' and $self->{'OPTIONS'}{'mode'} & 2)
450 0 0 if ($ind > $self->FETCHSIZE) { }
475 0 10 if $DEBUG
488 0 0 if $DEBUG
492 0 0 if ($self->{'OPTIONS'}{'mode'} & 2)
505 0 0 if $DEBUG
521 0 0 if $DEBUG
525 0 0 if ($self->{'OPTIONS'}{'mode'} & 2)
527 0 0 if (exists $self->{'REC_CACHE'}{$ind})
544 0 0 if $DEBUG
548 0 0 if ($self->{'OPTIONS'}{'mode'} & 2)
566 0 1 if $DEBUG
570 0 1 if $count
585 0 0 @_ ? :
601 0 1 if $DEBUG