Branch Coverage

blib/lib/Tag/Reader/Perl.pm
Criterion Covered Total %
branch 75 90 83.3


line true false branch
53 32 138 if (exists $self->{'text'}) { }
138 0 elsif (exists $self->{'filename'}) { }
73 0 170 if ($data eq $EMPTY_STR)
77 170 0 wantarray ? :
83 0 52 unless ($file and -r $file)
86 0 52 if (not $force and defined $self->{'text'} || defined $self->{'filename'})
92 0 52 unless (open $inf, '<', $file)
106 0 3 unless ($text)
109 0 0 if (not $force and defined $self->{'text'} || defined $self->{'filename'})
144 1092 3377 if ($self->{'spec_stay'} == 0) { }
147 166 926 if ($self->{'stay'} == 0 and $self->{'char'} eq '<') { }
190 736 elsif ($self->{'stay'} == 0) { }
736 0 elsif ($self->{'stay'} == 1) { }
150 111 55 if ($#{$$self{'data'};} == -1) { }
165 59 131 if ($self->{'tagcharpos'} == 0)
174 47 689 if ($self->{'char'} eq '>') { }
111 578 elsif ($self->{'tag_length'} == 1 and _is_first_char_of_tag($self->{'char'})) { }
247 331 elsif ($self->{'tag_length'} > 1 and _is_in_tag_name($self->{'char'})) { }
184 64 47 if ($self->{'char'} eq '!')
199 0 331 if ($self->{'tag_length'} == 1 or $self->{'char'} eq '<')
213 90 3287 if ($self->{'char'} eq '>') { }
56 3231 elsif ($self->{'spec_stay'} == 3) { }
812 2419 elsif ($self->{'spec_stay'} == 4) { }
13 2406 elsif ($self->{'char'} eq ']') { }
409 1997 elsif ($self->{'tag_length'} > 1 and _is_in_tag_name($self->{'char'})) { }
214 4 26 if ($self->{'brace'} == 0 and $self->{'bracket'} == 0 and $self->{'spec_stay'} < 3 or $self->{'spec_stay'} == 3 and join($EMPTY_STR, @{$$self{'data'};}[-2, -1]) eq '--' or $self->{'tag_type'} =~ /^!\[cdata\[/ms and join($EMPTY_STR, @{$$self{'data'};}[-2, -1]) eq ']]')
234 89 1 if ($self->{'spec_stay'} != 4)
243 0 56 if ($self->{'tag_length'} == 0 and join($EMPTY_STR, @{$$self{'data'};}[-2, -1]) eq '--')
254 34 778 if ($self->{'char'} eq $self->{'quote'})
269 6 403 if ($self->{'tag_length'} == 2 || $self->{'tag_length'} == 3 and $self->{'char'} eq '-')
275 7 402 if ($self->{'char'} eq '[')
283 30 1967 if ($self->{'quote'} eq $EMPTY_STR and $self->{'char'} eq '"')
290 4 1993 if ($self->{'quote'} eq $EMPTY_STR and $self->{'char'} eq q['])
297 22 1975 if ($self->{'char'} eq '<')
300 5 1992 if ($self->{'char'} eq '[')
309 4414 55 if ($self->{'stay'} != 99) { }
310 689 3725 if (exists $self->{'text'})
311 689 0 if (length $self->{'text'} > 1) { }
318 55 0 if (exists $self->{'filename'} and defined $self->{'char'})
324 166 4303 if ($self->{'stay'} == 98 or $self->{'stay'} == 99)
325 55 111 if ($self->{'stay'} == 99)
331 89 4380 if ($self->{'char'} eq "\n")
342 29 0 if ($char eq '!' or $char eq '/' or $char eq '?' or $char =~ /^[\d\w]+$/ms)
353 639 76 if ($char eq ':' or $char eq '[' or $char eq '-' or $char eq '%' or $char =~ /^[\d\w]+$/ms)
364 111 2320 if ($self->{'tag_length'} > 0)