Branch Coverage

blib/lib/BibTeX/Parser.pm
Criterion Covered Total %
branch 54 64 84.3


line true false branch
47 5 41 if $self->{'fh'}->eof
52 4 107 unless defined $line
57 36 1 if (/@($re_name)/cog) { }
69 0 156 unless defined $line
78 9 27 if ($start_pos == 0)
94 2 34 if ($type eq 'STRING') { }
2 32 elsif ($type eq 'COMMENT' or $type eq 'PREAMBLE') { }
95 2 0 if (/\G\{\s*($re_name)\s*=\s*/cog) { }
98 0 2 if (defined $self->{'strings'}{$key})
114 31 1 if (/\G\s*\{(?:\s*($re_name)\s*,[\s\n]*|\s+\r?\s*)/cog) { }
122 116 19 if $idx > 0
157 0 3 if (/\G[^\}]*\{/cg)
159 2 1 if (/\G[^\{]*\}/cg)
160 0 2 if ($bracelevel > 0) { }
179 12 139 if (/\G(\d+)/cg) { }
10 129 elsif (/\G($re_name)/cog) { }
81 48 elsif (/\G"(([^"\\]*(\\.)*[^\\"]*)*)"/cgs) { }
182 0 10 unless defined $strings_ref->{$1}
192 7 144 if (/\G\s*#\s*/cg)
209 2 173 if /\G\\./cg
210 55 118 if /\G\{/cg
211 7 48 --$depth > 0 ? :
55 63 if /\G\}/cg
212 63 0 if /\G([^\\\{\}]+)/cg
228 1 238 if $string eq ''
231 186 220 if ($string =~ /\G(.*?)(\{|$pattern)/cig) { }
233 157 29 if ($2 =~ /$pattern/i) { }
29 0 elsif ($2 =~ /\{/) { }
243 0 345 if ($symbol eq '{') { }
27 318 elsif ($symbol eq '}') { }
250 2 27 if ($numbraces != 0)
261 236 0 if $buffer