Branch Coverage

blib/lib/Positron/Template.pm
Criterion Covered Total %
branch 113 130 86.9


line true false branch
49 0 0 if (@_ == 1) { }
66 0 141 if (ref $dom eq 'HASH' or blessed $dom and $dom->isa('Positron::Environment'))
70 0 141 unless ($data)
73 141 0 if (ref $data eq 'HASH')
77 23 118 unless (ref $dom)
90 109 5 wantarray ? :
106 3 78 if ($quant eq '-') { }
3 75 elsif ($quant eq '*') { }
112 1 2 if ($replacement eq '')
128 1 11 if ($quant eq '-') { }
2 9 elsif ($quant eq '*') { }
147 1 9 if ($quant eq '-') { }
1 8 elsif ($quant eq '*') { }
153 1 0 if ("$ws_before$ws_after" =~ /\A \s+ \z/msx)
161 21 125 $with_quants ? :
168 102 423 unless (ref $node)
181 31 392 if ($sigil eq '@') { }
23 369 elsif ($sigil ~~ ['?', '!']) { }
75 294 elsif ($sigil eq '|') { }
4 290 elsif ($sigil eq '/') { }
12 278 elsif ($sigil ~~ ['.', ',']) { }
50 228 elsif ($sigil ~~ [':', ';']) { }
9 219 elsif ($sigil eq '^') { }
212 8 23 unless (@$loop)
214 3 5 $quant eq '+' ? :
221 2 44 $quant eq '*' ? :
223 21 2 if ($quant ne '-' and $quant ne '*')
233 9 14 if ($sigil eq '!')
236 12 11 if ($truth or $quant eq '*')
239 11 12 $keep ? :
246 15 60 if ($tail =~ / \A : \s+ (.*) /msx) { }
255 52 8 if (defined $goal) { }
261 15 37 if ($truth)
273 30 45 if ($truth or $quant eq '*')
276 30 45 $keep ? :
285 1 3 if ($quant eq '+') { }
1 2 elsif ($quant eq '*') { }
302 6 6 if ($sigil eq '.') { }
307 5 7 if (-r $include_path . $filename)
311 1 5 unless (defined $filepath)
322 6 0 if ($env_contents) { }
323 6 0 if (ref $env_contents eq 'ARRAY') { }
325 4 2 if ($handler->isa('Positron::Handler::ArrayRef') and not ref $$env_contents[0]) { }
340 5 5 $keep ? :
351 26 24 if ($tail =~ / \S /msx) { }
354 14 12 if ($sigil eq ':') { }
359 13 15 if (-r $include_path . $filename)
363 1 13 unless (defined $filepath)
371 12 0 if ($env_contents) { }
372 12 0 if (ref $env_contents eq 'ARRAY') { }
374 12 0 if ($handler->isa('Positron::Handler::ArrayRef') and not ref $$env_contents[0]) { }
392 16 8 $quant ? :
409 20 28 $keep ? :
425 3 6 if ($pass_self)
431 3 6 $keep ? :
438 1 1185 unless $sigils
459 11 9 unless ref $dom
460 9 0 if (ref $dom eq 'ARRAY') { }
0 0 elsif (my $package = blessed $dom) { }
464 0 0 unless eval "require Positron::Handler::$package; 1;"
474 204 21 if ($value =~ / $structure_finder /msx)
489 108 21 if ($did_change)
491 108 0 if ($value eq '')
514 15 6 if ($did_change)
515 4 11 if ($value eq '' and not $last_changing_quant eq '+')