Branch Coverage

blib/lib/Template/Declare/Tags.pm
Criterion Covered Total %
branch 73 82 89.0


line true false branch
45 90 15 unless (@_)
60 7 105 if (ref $_[0] and ref $_[0] eq 'HASH')
70 54 58 unless ($module->can('get_tag_list'))
72 0 54 if ($@)
91 375 16187 if not $override and *$slot{'CODE'}
302 11 149 if (wantarray) { }
366 66 53 if ((caller)->isa('Template::Declare')) { }
468 34 10 if (lc $key eq 'id')
469 11 23 if ($ELEMENT_ID_CACHE{$val}++)
471 1 10 if 'Template::Declare'->strict
477 2 34 wantarray ? :
521 595 15372 if (defined $alternative)
531 203 392 unless ($name =~ /^(?:base|tr|time)$/)
535 0 595 unless $name = $alternative
549 85 337 if (defined wantarray and not wantarray) { }
611 0 5 ref $_ ? :
616 0 5 if not length $content and length $last
790 32 390 if defined $tagset->namespace
816 26 0 if defined $_
826 11 82 wantarray ? :
832 2 355 ref $_ && $_->isa('Template::Declare::Tag') ? :
835 154 268 if not length $content and length $last
836 68 354 if length $attrs
838 345 77 if (length $content) { }
37 40 elsif ($tagset->can_combine_empty_tags($tag)) { }
840 133 212 if $content =~ /\
849 79 343 ref $more_code && $more_code->isa('CODE') ? :
858 217 16 if (substr($template, 0, 1) ne '/')
866 3 307 if ($_ eq '..') { }
288 22 elsif ($_ ne '.' and $_ ne '') { }
885 0 233 ref $template && $template->isa('Template::Declare::Tag') ? :
891 19 214 unless ($callable)
893 18 1 unless $inside_template
894 1 18 if 'Template::Declare'->strict
899 6 208 if (my $instrumentation = 'Template::Declare'->around_template) { }
923 31 81 $raw ? :
0 112 ref $item eq 'CODE' ? :
937 8 526 unless defined $val
941 526 0 unless ($SKIP_XML_ESCAPING)
951 433 93 unless $skip_postprocess
1047 5 0 if (defined wantarray) { }