Branch Coverage

blib/lib/BibTeX/Parser.pm
Criterion Covered Total %
branch 58 78 74.3


line true false branch
45 1 0 unless (exists $self->{'opts'}{'errorlevel'})
49 8 2 if ($entry->parse_ok) { }
52 2 0 if ($self->{'opts'}{'errorlevel'} eq 'warn') { }
0 0 elsif ($self->{'opts'}{'errorlevel'} eq 'error') { }
90 6 51 if $self->{'fh'}->eof
95 4 132 unless defined $line
101 45 2 if (/@($re_name)/cog) { }
113 0 186 unless defined $line
122 10 35 if ($start_pos == 0)
138 2 43 if ($type eq 'STRING') { }
2 41 elsif ($type eq 'COMMENT' or $type eq 'PREAMBLE') { }
139 2 0 if (/\G\{\s*($re_name)\s*=\s*/cog) { }
147 0 2 if ($key ne "j-tugboat" and defined $old_value and $old_value ne $value)
165 39 2 if (/\G\s*\{(?:\s*($re_name)\s*,[\s\n]*|\s+\r?\s*)/cog) { }
174 144 27 if $idx > 0
209 0 4 if (/\G[^\}]*\{/cg)
211 2 2 if (/\G[^\{]*\}/cg)
212 0 2 if ($bracelevel > 0) { }
246 12 175 if (/\G(\d+)/cg) { }
10 165 elsif (/\G($re_name)/cog) { }
117 48 elsif (/\G"(([^"\\]*(\\.)*[^\\"]*)*)"/cgs) { }
250 0 10 unless (defined $$strings_ref{lc $1})
252 0 0 unless $no_warn_ack and $1 =~ /^ack-/
264 7 180 if (/\G\s*#\s*/cg)
281 2 173 if /\G\\./cg
282 55 118 if /\G\{/cg
283 7 48 --$depth > 0 ? :
55 63 if /\G\}/cg
284 63 0 if /\G([^\\\{\}]+)/cg
300 1 247 if $string eq ""
303 193 229 if ($string =~ /\G(.*?)(\{|$pattern)/cig) { }
305 164 29 if ($2 =~ /$pattern/i) { }
29 0 elsif ($2 =~ /\{/) { }
315 0 345 if ($symbol eq '{') { }
27 318 elsif ($symbol eq '}') { }
322 2 27 if ($numbraces != 0)
333 245 0 if $buffer
341 0 0 ref $_[0] && $_[0] =~ /.*HASH.*/ ? :
360 0 0 ref $_[0] && $_[0] =~ /.*ARRAY.*/ ? :