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
58 36 1 if (/@($re_name)/cog) { }
70 0 156 unless defined $line
79 9 27 if ($start_pos == 0)
95 2 34 if ($type eq 'STRING') { }
2 32 elsif ($type eq 'COMMENT' or $type eq 'PREAMBLE') { }
96 2 0 if (/\G\{\s*($re_name)\s*=\s*/cog) { }
99 0 2 if (defined $self->{'strings'}{$key})
115 31 1 if (/\G\s*\{(?:\s*($re_name)\s*,[\s\n]*|\s+\r?\s*)/cog) { }
123 116 19 if $idx > 0
158 0 3 if (/\G[^\}]*\{/cg)
160 2 1 if (/\G[^\{]*\}/cg)
161 0 2 if ($bracelevel > 0) { }
180 12 139 if (/\G(\d+)/cg) { }
10 129 elsif (/\G($re_name)/cog) { }
81 48 elsif (/\G"(([^"\\]*(\\.)*[^\\"]*)*)"/cgs) { }
183 0 10 unless defined $strings_ref->{$1}
193 7 144 if (/\G\s*#\s*/cg)
210 2 173 if /\G\\./cg
211 55 118 if /\G\{/cg
212 7 48 --$depth > 0 ? :
55 63 if /\G\}/cg
213 63 0 if /\G([^\\\{\}]+)/cg
229 1 238 if $string eq ""
232 186 220 if ($string =~ /\G(.*?)(\{|$pattern)/cig) { }
234 157 29 if ($2 =~ /$pattern/i) { }
29 0 elsif ($2 =~ /\{/) { }
244 0 345 if ($symbol eq '{') { }
27 318 elsif ($symbol eq '}') { }
251 2 27 if ($numbraces != 0)
262 236 0 if $buffer