Branch Coverage

lib/Template/View.pm
Criterion Covered Total %
branch 93 120 77.5


line true false branch
62 62 3 unless defined $map->{'default'}
73 0 65 defined $config->{'method'} ? :
79 64 1 unless defined $sealed
80 64 1 $sealed ? :
89 1 64 if exists $config->{'base'} and not $self->{'base'}
98 3 61 defined $config->{'include_naked'} ? :
112 6 58 if $self->{'base'}
153 13 0 ref $_[0] eq 'HASH' ? :
158 13 0 unless $config->{'map'}
163 2 11 if defined $config->{'default'}
169 9 121 if defined $config->{$arg}
203 5 38 if (scalar @_ > 1 and ref $_[-1] eq 'HASH')
219 9 29 if (not $type = ref $item) { }
18 11 elsif (not defined($template = $map->{$type})) { }
227 3 15 if ($method and UNIVERSAL::can($item, $method)) { }
0 15 elsif (ref $item eq 'HASH' and defined($newtype = $item->{$method}) and defined($template = $$map{"$method=>$newtype"})) { }
0 15 elsif (defined $newtype and defined($template = $$map{"$method=>*"})) { }
7 8 elsif (not $template = $map->{'default'}) { }
231 0 3 unless defined $present
251 0 35 if $DEBUG
252 35 0 if $template
275 0 54 ref $_[0] eq 'HASH' ? :
276 52 2 if defined $item
297 21 63 unless ref $vars eq 'HASH'
319 0 92 unless $name
328 36 56 if $block = $self->{'_BLOCKS'}{$name}
332 0 56 if $DEBUG
336 6 50 if ($error = $@ and $base)
337 0 6 if $DEBUG
342 5 51 if ($error = $@ and $notfound) { }
1 50 elsif ($error) { }
343 4 1 unless ($template = $self->{'_BLOCKS'}{$notfound})
345 0 4 if $DEBUG
348 0 4 if $@
353 0 1 if $DEBUG
371 62 0 if $template
373 0 62 if $DEBUG
388 2 5 @_ ? :
412 74 119 if $item eq 'DESTROY'
414 0 119 if ($item =~ /^[\._]/) { }
19 100 elsif (exists $self->{$item}) { }
48 52 elsif (exists $self->{'data'}{$item}) { }
6 46 elsif (@_ and not $self->{'SEALED'}) { }
15 31 elsif ($item =~ s/^$self->{'view_prefix'}//) { }
3 28 elsif ($item =~ s/^$self->{'include_prefix'}//) { }
26 2 elsif ($self->{'include_naked'}) { }
1 1 elsif ($self->{'view_naked'}) { }
422 1 2 if @_ and $self->{'SEALED'}
423 0 18 if $DEBUG
424 2 16 @_ ? :
428 3 2 if (@_ and $self->{'SEALED'})
431 1 2 unless $self->{'silent'}
435 0 0 @_ ? :
0 47 if $DEBUG
438 2 45 @_ ? :
442 0 6 if $DEBUG
446 0 15 if $DEBUG
450 0 3 if $DEBUG
454 0 26 if $DEBUG
458 0 1 if $DEBUG