Branch Coverage

blib/lib/Template/Alloy/Velocity.pm
Criterion Covered Total %
branch 111 160 69.3


line true false branch
22 0 266 unless ($str_ref and defined $$str_ref)
27 0 266 defined $self->{'INTERPOLATE'} ? :
28 0 266 defined $self->{'V1DOLLAR'} ? :
29 0 266 defined $self->{'ANYCASE'} ? :
30 12 254 defined $self->{'AUTO_EVAL'} ? :
31 0 266 defined $self->{'SHOW_UNDEFINED_INTERP'} ? :
34 0 266 !$self->{'INTERPOLATE'} ? :
43 266 0 unless $self->{'COMPILE_JS'}
65 28 756 if ($capture) { }
66 16 12 if ($macro_block) { }
12 0 elsif ($$str_ref =~ / \G \s* (\w+)\b /cgx) { }
73 12 0 $self->{'ANYCASE'} ? :
74 0 12 if $aliases->{$func}
76 0 12 unless $dirs->{$func}
88 260 496 unless $$str_ref =~ / \G (.*?) $self->{'_start_tag'} /cgsx
93 160 336 if (length $text)
94 144 16 if (not $post_chomp) { }
0 16 elsif ($post_chomp == 1) { }
16 0 elsif ($post_chomp == 2) { }
0 0 elsif ($post_chomp == 3) { }
98 160 0 if length $text
102 168 328 if ($dollar)
104 12 156 $text =~ / (\\+) $ /x ? :
105 12 156 if ($n and not $self->{'_no_interp'})
107 12 0 if defined $pointer->[-1] and not ref $pointer->[-1]
109 8 160 if ($self->{'_no_interp'} or $n % 2)
117 8 152 if ($$str_ref =~ / \G \{ /cgx) { }
121 0 8 unless $$str_ref =~ / \G \s* $Template::Alloy::Parse::QR_COMMENTS \} /cgox
128 0 160 unless defined $ref
130 148 0 if (not $not and $self->{'SHOW_UNDEFINED_INTERP'})
139 0 328 $text =~ / (\\+) $ /x ? :
140 0 328 if ($n)
142 0 0 if defined $pointer->[-1] and not ref $pointer->[-1]
143 0 0 if ($n % 2)
148 10 318 if ($$str_ref =~ / \G \# .*\n? /cgx or $$str_ref =~ / \G \* .*? \*\# /cgsx)
153 2 316 unless $$str_ref =~ / \G (\w+) /cgx or $$str_ref =~ / \G \{ (\w+) (\}) /cgx
156 316 0 $self->{'ANYCASE'} ? :
159 26 290 if $aliases->{$func}
160 12 304 unless ($dirs->{$func})
162 0 12 $2 ? :
164 12 0 if ($$str_ref =~ / \G \( /cgx)
167 0 12 unless $$str_ref =~ / \G \s* $Template::Alloy::Parse::QR_COMMENTS \) /cgox
177 198 106 if ($$str_ref =~ / \G \( ([+=~-]?) /cgx) { }
187 26 278 if $pre_chomp
188 14 12 if ($pre_chomp and $pointer->[-1] and not ref $pointer->[-1])
189 2 12 if ($pre_chomp == 1) { }
0 12 elsif ($pre_chomp == 2) { }
12 0 elsif ($pre_chomp == 3) { }
192 14 0 unless length $pointer->[-1]
201 236 80 if ($func ne 'END')
203 2 234 if (my $err = $@)
204 2 0 if UNIVERSAL::can($err, 'node') and not $err->node
211 96 218 if ($func eq 'END' or $dirs->{$func}[4]) { }
64 154 elsif ($dirs->{$func}[2]) { }
0 154 elsif ($func eq 'META') { }
212 0 96 unless (@state)
219 16 80 if ($dirs->{$func}[4])
223 0 16 unless ($dirs->{$func}[4]{$parent_type})
229 90 6 !@state ? :
232 80 16 if (not $dirs->{$func}[4]) { }
233 14 66 if ($parent_node->[0] eq 'BLOCK') { }
0 66 elsif ($parent_node->[0] eq 'VIEW') { }
0 66 elsif ($$dirs{$parent_node->[0]}[5]) { }
234 0 14 if (defined $parent_node->[3] and @in_view) { }
239 4 10 if ($pointer->[-1] and not $pointer->[-1][6])
261 0 64 if $func eq 'VIEW'
262 0 64 if $$dirs{$node->[0]}[5]
271 300 14 if ($$str_ref =~ / \G $self->{'_end_tag'} /cgsx) { }
12 2 elsif ($node->[6]) { }
273 26 274 if $post_chomp
277 16 284 if ($node->[6] and $node->[0] eq 'MACRO')
295 14 246 if @blocks
296 0 260 if @meta
297 0 260 if @state > 0
300 80 180 if (pos $$str_ref != length $$str_ref)
302 78 2 if (not $post_chomp) { }
2 0 elsif ($post_chomp == 1) { }
0 0 elsif ($post_chomp == 2) { }
0 0 elsif ($post_chomp == 3) { }
306 78 2 if length $text