Branch Coverage

blib/lib/Template/Magic.pm
Criterion Covered Total %
branch 85 112 75.8


line true false branch
22 0 34 if ($pragma and $pragma eq '-compile') { }
25 0 0 if warnings::enabled()
41 37 0 unless ref $s eq 'HASH'
44 0 20 if s/^-//
48 15 5 unless ref $_ eq 'ARRAY'
62 0 37 $1 ? :
79 286 18 if (ref $_ eq 'CODE') { }
18 0 elsif (not ref $_) { }
92 1 17 if (ref $ref eq 'ARRAY') { }
17 0 elsif (ref $ref eq 'CODE') { }
105 36 20 unless ($$s{'_re'})
106 4 32 unless (@{$$s{'markers'};} == 3)
129 0 56 wantarray ? :
153 0 9 'File::Spec'->file_name_is_absolute($t) ? :
163 6 40 if @_
171 0 0 if @_
177 1 0 unless ref $args{'lookups'} eq 'ARRAY'
184 0 0 unless ref $args{'lookups'} eq 'ARRAY'
191 7 40 if exists $$args{'lookups'}
193 4 43 if ($t = $$args{'container_template'} || ${$$s{'container_template'};}[0]) { }
211 9 46 unless (ref $t)
212 0 9 unless $t = $s->find_file($t)
214 9 0 if ($$s{'options'}{'cache'})
216 0 9 if $main_zone
219 45 10 ref $t eq 'SCALAR' ? :
221 9 46 if $$s{'options'}{'cache'} and not ref $t
237 349 7 unless /$$re{'end_label'}/ and $1 or /$$re{'include_label'}/ and do { (my $t = $1) =~ s/^\s+//; $t ? $s->load($t) : 'CONTAINER_INCLUDE' }
238 3 4 $t ? :
255 352 61 if ref $id or not $id
265 142 118 unless ref $the_start eq 'HASH'
266 61 57 unless $$the_start{'id'} eq $id
311 368 0 if defined $_[1]
354 109 75 if (not ref $v)
366 0 75 if (ref($v) =~ /^(SCALAR|REF)$/)
377 9 48 if (ref $z->value eq 'ARRAY')
379 3 6 if ($attr = $z->attributes)
385 8 4 $ix_key ? :
12 14 $named ? :
401 43 5 if (ref $z->value eq 'HASH')
413 16 58 if (ref $v eq 'CODE')
416 5 11 Class::Util::blessed($l) ? :
417 0 5 ${ref($l) . '::no_template_magic_zone';} ? :
424 16 0 if ($v ne ($nv || ''))
436 2 0 if (Class::Util::blessed($z->value))
458 2 4 if ($z->_e and $cont =~ /$$re{'label'}/)
480 1 1 if ($z->id eq '_EVAL_')
492 1 1 if ($z->attributes)
507 2 3 if (not defined $z->output) { }
1 2 elsif (not $z->output) { }
508 1 1 unless ref $z->value eq 'HASH'
521 1 1 if ($z->id eq 'INCLUDE_TEXT')
523 0 1 unless open my $itxt, $file
540 0 4 if ($@) { }
548 2 4 if (ref $v eq 'ARRAY' and HTML::TableTiler::is_matrix($v))
572 0 4 if ($@) { }
580 2 0 if (ref $v and defined UNIVERSAL::can($v, 'param'))