Branch Coverage

blib/lib/Pinwheel/View/Data.pm
Criterion Covered Total %
branch 122 122 100.0


line true false branch
44 1 123 if $@
85 1950 34 unless $_[1]->isa('PPI::Token::Symbol')
88 123 24 unless $nodes
92 10 34 if ($n->isa('PPI::Statement::Variable')) { }
32 2 elsif (not $n->isa('PPI::Token::Magic')) { }
94 6 54 if ($_->isa('PPI::Token::Operator') and $_->content eq '=') { }
13 41 elsif ($_->isa('PPI::Token::Symbol')) { }
102 17 15 if $var =~ /^\$/ and not $$declared{$var}
157 123 60 if @_ & 1
158 43 140 if @_
160 2 181 if scalar @stack == 0
161 38 145 if (ref $content)
194 4 5 if ($format =~ /^(xml|atom|rss)$/) { }
2 3 elsif ($format eq 'json') { }
1 2 elsif ($format eq 'yaml') { }
1 1 elsif ($format eq 'html') { }
256 76 9 unless $ignore_tag
258 17 68 if ($attrs)
263 9 8 if (not defined $content) { }
5 3 elsif (not ref $content) { }
271 11 74 if (not defined $content) { }
24 50 elsif (ref $content) { }
21 29 elsif ($content =~ /^-?[0-9]+(?:\.[0-9]+)?$/) { }
274 4 20 $is_list ? :
277 17 23 if ++$i
280 4 20 $is_list ? :
284 3 26 if $content =~ /[\\"\x00-\x1f]/
298 2 4 unless $s =~ /[\x00-\x1f]/
312 12 56 if ($attrs)
317 6 6 if (not defined $content) { }
4 2 elsif (not ref $content) { }
325 58 10 unless ($ignore_tag)
327 39 19 unless ref $content and @$content > 0
330 8 60 if (not defined $content) { }
2 58 elsif (ref $content and @$content == 0) { }
22 36 elsif (ref $content) { }
8 28 elsif ($content =~ /^-?[0-9]+(?:\.[0-9]+)?$/) { }
3 25 elsif ($content =~ /[\x00-\x08\x0a-\x1f"\\\x7f\xe2\xed]/) { }
333 1 1 $is_list ? :
336 4 18 $is_list ? :
339 34 3 if ++$i or not $ignore_tag
361 1 2 unless $s =~ /[\x00-\x08\x0a-\x1f\x7f\xe2\xed]/
378 17 26 $attrs ? :
381 1 16 unless defined $value
382 1 16 if $value =~ /[&<>'"]/
386 15 28 if (not defined $content) { }
7 21 elsif (ref $content) { }
393 1 20 if $content =~ /[&<>'"]/
422 66 9 unless $ignore_tag
424 16 59 if ($attrs)
430 9 7 if (not defined $content) { }
4 3 elsif (not ref $content) { }
438 11 64 if (not defined $content) { }
23 41 elsif (ref $content) { }
442 4 19 $is_list ? :
445 16 22 unless ++$i == @$content
448 4 19 $is_list ? :
450 26 15 unless ($content =~ /^-?[0-9]+(?:\.[0-9]+)?$/)
451 3 23 if $content =~ /[\\"\x00-\x1f]/
463 15 26 unless $s =~ /[&<>'"\x80-\xff]/
476 2 1 ord $i < 224 ? :