Branch Coverage

blib/lib/CGI/Application/Plugin/TT.pm
Criterion Covered Total %
branch 72 96 75.0


line true false branch
32 1 8 if @_
33 9 0 if ($callpkg->isa('CGI::Application')) { }
57 18 11 unless ($tt)
59 18 0 if (keys %{$$options{'TEMPLATE_OPTIONS'};}) { }
79 16 2 ref $self ? :
82 16 2 if (ref $self) { }
83 0 16 if @_ and defined $$self{'__TT'}
91 18 0 if (@_)
93 0 18 if (ref $_[0] eq 'HASH') { }
102 18 0 if ($$props{'TEMPLATE_OPTIONS'})
103 0 18 if &Scalar::Util::reftype($$props{'TEMPLATE_OPTIONS'}) ne 'HASH'
109 1 17 if ($$props{'TEMPLATE_NAME_GENERATOR'})
110 0 1 if &Scalar::Util::reftype($$props{'TEMPLATE_NAME_GENERATOR'}) ne 'CODE'
116 6 12 if ($$props{'TEMPLATE_PRECOMPILE_FILETEST'})
117 0 4 if defined &Scalar::Util::reftype($$props{'TEMPLATE_PRECOMPILE_FILETEST'}) and &Scalar::Util::reftype($$props{'TEMPLATE_PRECOMPILE_FILETEST'}) ne 'CODE' and not overload::StrVal($$props{'TEMPLATE_PRECOMPILE_FILETEST'}) =~ /^Regexp=/
128 6 12 if ($$props{'TEMPLATE_PRECOMPILE_DIR'})
130 0 6 unless not defined $type or $type eq 'ARRAY'
134 0 6 $type && $type eq 'ARRAY' ? :
140 6 0 if ($$tt_config{'TEMPLATE_PRECOMPILE_FILETEST'})
141 2 4 if (not defined &Scalar::Util::reftype($$tt_config{'TEMPLATE_PRECOMPILE_FILETEST'})) { }
2 2 elsif (&Scalar::Util::reftype($$tt_config{'TEMPLATE_PRECOMPILE_FILETEST'}) eq 'CODE') { }
2 0 elsif (overload::StrVal($$tt_config{'TEMPLATE_PRECOMPILE_FILETEST'}) =~ /^Regexp=/) { }
153 9 3 unless &$filetester($file)
154 3 0 if (not -d $file)
164 0 18 if %$props
187 16 13 if (@data)
190 8 8 if (ref $data[0] eq 'HASH') { }
8 0 elsif (@data % 2 == 0) { }
285 13 0 UNIVERSAL::can($self, 'call_hook') ? :
287 4 9 if (not defined $vars and (&Scalar::Util::reftype($file) || '') eq 'HASH')
296 13 0 if $can_call_hook
304 7 6 if $self->can('tt_pre_process')
305 13 0 if $can_call_hook
314 1 12 unless $self->tt_obj->process($file, \%params, \$html)
317 7 5 if $self->can('tt_post_process')
318 12 0 if $can_call_hook
337 1 2 unless @_
338 2 0 ref $_[0] ? :
399 16 2 ref $self ? :
401 16 2 if (ref $self) { }
411 38 0 ref $self ? :
414 38 0 if (ref $self)
415 7 31 if $$self{'__TT_OBJECT'}
416 23 8 if $$self{'__TT_CONFIG'}
426 6 2 if ${$super . '::__TT_OBJECT';}
427 2 0 if ${$super . '::__TT_CONFIG';}
447 11 1 unless UNIVERSAL::can($self, 'devpopup')
451 1 2 if (my $class = &Scalar::Util::blessed($params{$key}))