Branch Coverage

blib/lib/Text/Amuse/Preprocessor/Footnotes.pm
Criterion Covered Total %
branch 32 44 72.7


line true false branch
129 48 24 if (exists $options{$k})
135 0 24 if %options
136 0 24 unless defined $self->{'input'}
165 5 0 if $error
177 0 0 unless ($self->{'_tmpdir'})
187 21 3 if ($self->rewrite("primary", \@body))
188 19 2 if ($self->rewrite("secondary", \@body))
189 19 0 if (my $outfile = $self->output) { }
209 24 21 if ($type eq 'primary') { }
21 0 elsif ($type eq 'secondary') { }
227 1144 3119 if $el->{'type'} ne "text"
230 461 2658 if ($r =~ s/$start_re/_check_and_replace_fn($1, \$fn_counter, \@footnotes_found, $open, $close, \$in_footnote);/ex) { }
223 2435 elsif ($primary and $r =~ /$secondary_re/) { }
1042 1393 elsif ($r =~ /\A\s*\z/) { }
12 1381 elsif ($in_footnote and $r =~ /\A(\s{4,})/) { }
256 40 5 if ($body_fn_counter == $fn_counter) { }
279 912 8 if ($number < $$current + 100)
289 0 19 unless $file and $body
290 0 19 unless open my $fh, ">:encoding(UTF-8)", $file
292 0 19 unless close $fh
298 0 24 unless $file
299 0 24 unless open my $fh, "<:encoding(UTF-8)", $file