Branch Coverage

blib/lib/Template/Alloy/HTE.pm
Criterion Covered Total %
branch 165 242 68.1


line true false branch
39 0 297 unless ($str_ref and defined $$str_ref)
47 283 14 !$self->{'INTERPOLATE'} ? :
54 297 0 unless $self->{'COMPILE_JS'}
77 4 734 if ($capture) { }
78 4 0 $$str_ref =~ / \G \s* (\w+)\b /cgx ? :
80 0 4 if $aliases->{$func}
81 0 4 if ($func ne 'VAR' and not $dirs->{$func})
93 273 461 unless $$str_ref =~ / \G (.*?) $self->{'_start_tag'} /cgsx
96 429 32 unless $dollar
99 190 271 if (length $text)
100 190 0 if (not $post_chomp) { }
0 0 elsif ($post_chomp == 1) { }
0 0 elsif ($post_chomp == 2) { }
0 0 elsif ($post_chomp == 3) { }
104 190 0 if length $text
108 32 429 if ($dollar)
110 0 32 $text =~ / (\\+) $ /x ? :
111 0 32 if ($n and not $self->{'_no_interp'})
113 0 0 if defined $pointer->[-1] and not ref $pointer->[-1]
115 0 32 if ($self->{'_no_interp'} or $n % 2)
123 12 20 if ($$str_ref =~ / \G \{ /cgx) { }
127 0 12 unless $$str_ref =~ / \G \s* $Template::Alloy::Parse::QR_COMMENTS \} /cgox
134 0 32 unless defined $ref
136 8 12 if (not $not and $self->{'SHOW_UNDEFINED_INTERP'})
145 0 429 if $aliases->{$func}
146 0 429 if ($func ne 'VAR' and not $dirs->{$func})
153 2 427 if $pre_chomp
154 2 0 if ($pre_chomp and $pointer->[-1] and not ref $pointer->[-1])
155 2 0 if ($pre_chomp == 1) { }
0 0 elsif ($pre_chomp == 2) { }
0 0 elsif ($pre_chomp == 3) { }
158 2 0 unless length $pointer->[-1]
162 6 423 $comment ? :
168 361 72 unless ($is_close)
170 307 54 if ($func =~ /^(IF|ELSIF|ELSE|UNLESS|LOOP|VAR|INCLUDE)$/) { }
171 179 128 if $func eq 'VAR'
174 26 281 if ($func eq 'ELSE') { }
61 220 elsif ($$str_ref =~ / \G [Ee][Xx][Pp][Rr] \s*=\s* ([\"\']?) \s* /cgx) { }
177 6 55 unless ($allow_expr)
181 47 8 $quote ? :
183 2 53 unless (defined $node->[3])
185 2 0 if $quote and UNIVERSAL::can($err, 'info')
188 45 8 if ($quote)
189 0 45 unless $$str_ref =~ / \G $quote /cgx
192 6 47 if ($func eq 'INCLUDE') { }
4 43 elsif ($func eq 'UNLESS') { }
199 4 49 if ($self->{'AUTO_FILTER'})
200 0 4 unless ref $node->[3]
201 2 2 if @{$node->[3];} < 3 or $node->[3][-3] ne '|'
209 112 362 if ($$str_ref =~ / \G (\w+) \s*=\s* /cgx) { }
142 220 elsif ($$str_ref =~ m[ \G ([\w./+_]+) \s* ]cgx) { }
12 208 elsif ($$str_ref =~ / \G ([\"\']) (.*?) (?
211 81 0 $$str_ref =~ m[ \G ([\w./+_]+) \s* ]cgx ? :
31 81 $$str_ref =~ / \G ([\"\']) (.*?) (?
214 54 58 if ($key eq 'name') { }
217 8 50 if $func ne 'GET'
218 30 20 if ($key eq 'escape') { }
16 4 elsif ($key eq 'default') { }
231 0 208 unless defined $name and length $name
232 20 188 if ($func eq 'INCLUDE') { }
6 182 elsif ($func eq 'UNLESS') { }
241 12 196 if $default
244 2 182 if not $escape and $self->{'DEFAULT_ESCAPE'}
245 26 182 if ($escape) { }
2 180 elsif ($self->{'AUTO_FILTER'}) { }
246 0 26 if $func ne 'GET'
247 20 6 if ($escape eq 'html' or $escape eq '1') { }
2 4 elsif ($escape eq 'url') { }
2 2 elsif ($escape eq 'js') { }
263 4 50 if $self->{'NO_TT'}
265 0 50 if (my $err = $@)
266 0 0 if UNIVERSAL::can($err, 'node') and not $err->node
274 100 309 if ($is_close or $dirs->{$func}[4]) { }
72 237 elsif ($dirs->{$func}[2]) { }
2 235 elsif ($func eq 'META') { }
275 0 100 unless (@state)
281 72 28 if $is_close
284 28 72 if ($dirs->{$func}[4])
288 0 28 unless ($dirs->{$func}[4]{$parent_type})
294 100 0 !@state ? :
297 72 28 if (not $dirs->{$func}[4]) { }
298 6 66 if ($parent_node->[0] eq 'BLOCK') { }
0 66 elsif ($parent_node->[0] eq 'VIEW') { }
0 66 elsif ($$dirs{$parent_node->[0]}[5]) { }
299 0 6 if (defined $parent_node->[3] and @in_view) { }
304 4 2 if ($pointer->[-1] and not $pointer->[-1][6])
326 0 72 if $func eq 'VIEW'
327 0 72 if $$dirs{$node->[0]}[5]
336 405 4 if ($$str_ref =~ / \G \s* $self->{'_end_tag'} /cgsx) { }
4 0 elsif ($node->[6]) { }
338 2 403 if $post_chomp
355 6 267 if @blocks
356 2 271 if @meta
357 0 273 if @state > 0
360 82 191 if (pos $$str_ref != length $$str_ref)
362 80 2 if (not $post_chomp) { }
2 0 elsif ($post_chomp == 1) { }
0 0 elsif ($post_chomp == 2) { }
0 0 elsif ($post_chomp == 3) { }
366 80 2 if length $text
378 248 0 if (@_ == 1) { }
380 0 248 if (ref $key ne 'HASH')
381 0 0 unless $self->{'CASE_SENSITIVE'}
386 0 0 if @_ % 2
391 198 0 unless $self->{'CASE_SENSITIVE'}
399 0 248 ref $_[0] eq 'HASH' ? :
403 0 248 if ($type eq 'filehandle' or $self->{'FILEHANDLE'}) { }
0 248 elsif ($type eq 'arrayref' or $self->{'ARRAYREF'}) { }
0 248 elsif ($type eq 'filename' or $self->{'FILENAME'}) { }
248 0 elsif ($type eq 'scalarref' or $self->{'SCALARREF'}) { }
422 0 248 if (my $ref = $self->{'ASSOCIATE'})
423 0 0 ref $ref eq 'ARRAY' ? :
425 0 0 $self->{'CASE_SENSITIVE'} ? :
432 0 248 $self->{'DOUBLE_FILE_CACHE'} ? :
433 0 248 $self->{'CACHE'} ? :
434 248 0 !$self->{'FILE_CACHE'} ? :
435 248 0 !$self->{'BLIND_CACHE'} ? :
436 0 248 if $self->{'DOUBLE_FILE_CACHE'}
440 0 248 defined $self->{'ADD_LOCAL_PATH'} ? :
451 22 226 unless $self->process_simple($content, $param, \$out)
453 0 226 if ($args->{'print_to'}) { }