Branch Coverage

blib/lib/DiaColloDB/Corpus/Compiled.pm
Criterion Covered Total %
branch 1 116 0.8


line true false branch
12 1 0 $DiaColloDB::threads::shared::MODULE ? :
66 0 0 unless exists $corpus->{'filters'}
67 0 0 if defined $corpus->{'dbdir'}
73 0 0 if $obj->{'temp'}
74 0 0 if $obj->opened
91 0 0 if $obj->{'dbdir'}
104 0 0 if not exists $opts{'close'} or $opts{'close'}
105 0 0 -e $dbdir ? :
116 0 0 if $dir
124 0 0 unless $corpus->unlink('close', 0)
132 0 0 if UNIVERSAL::isa($_[0]{'filters'}, 'DiaColloDB::Corpus::Filters')
133 0 0 unless defined $_[0]{'filters'}
151 0 0 unless ref $corpus
152 0 0 if $corpus->opened
157 0 0 if (UNIVERSAL::isa($argv, 'ARRAY')) { }
0 0 elsif (defined $argv) { }
158 0 0 if (@$argv == 1) { }
166 0 0 unless $corpus->{'dbdir'} = $corpus->dbdir($dbdir)
169 0 0 $corpus->{'append'} ? :
173 0 0 if (fcwrite($flags) and fctrunc($flags))
175 0 0 unless $corpus->truncate
178 0 0 if (fcwrite($flags) and fccreat($flags))
181 0 0 unless -d $datadir or make_path($datadir)
185 0 0 if (fcread($flags) and not fctrunc($flags))
187 0 0 unless $corpus->loadHeaderFile
202 0 0 if $corpus->opened
203 0 0 $corpus->opened && fcwrite($corpus->{'flags'}) ? :
205 0 0 if ($rc)
226 0 0 unless $corpus->opened and fcwrite($corpus->{'flags'})
227 0 0 unless $corpus->saveHeader
236 0 0 unless $corpus->opened
260 0 0 if $pos >= $_[0]{'size'}
270 0 0 if $pos >= $corpus->size
283 0 0 ref $that ? :
289 0 0 unless my $odir = $ocorpus->dbdir($opts{'dbdir'})
295 0 0 if (not $ocorpus->opened or $ocorpus->{'dbdir'} ne $odir)
296 0 0 unless $ocorpus->open([$odir], %opts, 'flags', $flags)
304 0 0 if ($dofilter) { }
335 0 0 $dofilter ? :
0 0 unless my $cfilters = $dofilter ? $filters->compile : {}
350 0 0 if $filei >= $nfiles
357 0 0 if $logFileN and $filei % $logFileN == 0
361 0 0 if ($dofilter)
364 0 0 if (ref $tok)
372 0 0 if defined $pgood and not $p =~ /$pgood/ or $pgoodh and not exists $pgoodh->{$p} or defined $pbad and $p =~ /$pbad/ or $pbadh and exists $pbadh->{$p} or defined $wgood and not $w =~ /$wgood/ or $wgoodh and not exists $wgoodh->{$w} or defined $wbad and $w =~ /$wbad/ or $wbadh and exists $wbadh->{$w} or defined $lgood and not $l =~ /$lgood/ or $lgoodh and not exists $lgoodh->{$l} or defined $lbad and $l =~ /$lbad/ or $lbadh and exists $lbadh->{$l}
375 0 0 if defined $tok or @$ftokens and defined $$ftokens[$#$ftokens]
385 0 0 unless DiaColloDB::Utils::saveJsonFile($odoc, $outfile, 'pretty', 0, 'canonical', 0)
396 0 0 if ($njobs == 0 or not $HAVE_THREADS) { }
405 0 0 if (defined(my $err = $worker->error))
432 0 0 ref $that ? :
438 0 0 unless my $odir = $ocorpus->dbdir($opts{'dbdir'})
443 0 0 if (not $ocorpus->opened or $ocorpus->{'dbdir'} ne $odir)
444 0 0 unless $ocorpus->open([$odir], %opts, 'flags', $flags)
450 0 0 UNIVERSAL::isa($sources, 'ARRAY') ? :
451 0 0 ref $src ? :
454 0 0 ref $src ? :
0 0 unless my $icorpus = ref $src ? $src : 'DiaColloDB::Corpus::Compiled'->new('dbdir', $src, 'logOpen', undef)
466 0 0 unless link $infile, $outfile or symlink $infile, $outfile