Branch Coverage

blib/lib/Dotiac/DTL/Addon/html_template/Replace.pm
Criterion Covered Total %
branch 53 122 43.4


line true false branch
35 1 0 if (@_ and lc $_[0] eq 'combine' || lc $_[0] eq ':combine')
65 30 8 if $$self[2]
68 0 38 unless eval { do { if (@_ and $_[0] eq 'print_to') { my $fh = select($_[1]); $$self[0]->print; select $fh; } else { $r = $$self[0]->string; } ; 1 } }
69 0 38 if (@_ and $_[0] eq 'print_to') { }
80 30 8 if $$self[2]
90 1 0 if $name eq 'Dotiac::DTL::Template'
91 0 0 if $name eq 'HTML::Template'
98 0 0 if (@_ and $_ eq 'name')
100 0 0 if ref $l
102 0 0 if grep {lc $_ eq $l;} @a
104 0 0 if (@_ and $_ eq 'loop')
106 0 0 if ref $l
108 0 0 if grep {lc $_ eq $l;} @a
117 1 1 unless ref $filter eq 'ARRAY'
119 1 1 if (ref $f eq 'HASH' and $$f{'sub'} and ref $$f{'sub'} eq 'CODE') { }
1 0 elsif (ref $f eq 'CODE') { }
120 0 1 if ($$f{'format'} and not ref $$f{'format'} and lc $$f{'format'} eq 'array') { }
140 0 0 if (&Scalar::Util::blessed($a)) { }
144 0 0 if ref $a eq 'ARRAY'
147 0 0 unless &Scalar::Util::blessed($obj)
148 0 0 unless $obj->can('param')
166 0 2 if 'File::Spec'->file_name_is_absolute($file) and -e $file
169 0 0 if -e $path
171 0 2 if (defined $ENV{'HTML_TEMPLATE_ROOT'})
173 0 0 if -e $path
175 0 2 if ($$o{'path'})
178 0 0 if -e $path
181 2 0 if -e $file
182 0 0 if ($$o{'path'})
183 0 0 if (defined $ENV{'HTML_TEMPLATE_ROOT'})
186 0 0 if -e $path
227 30 8 unless $opts{'case_sensitive'}
229 1 37 $opts{'global_vars'} ? :
230 8 30 $opts{'case_sensitive'} ? :
231 2 36 $opts{'loop_context_vars'} ? :
232 7 31 $opts{'default_escape'} ? :
234 35 3 unless $COMBINE
236 2 36 if ($opts{'filename'})
237 0 2 $COMBINE ? :
239 0 2 if exists $opts{'compile'}
241 0 2 unless $file
242 0 2 if (-e "$file$flags.html")
243 0 0 if ((stat "$file$flags.html")[9] >= (stat "$file")[9])
246 0 0 if $opts{'associate'}
250 0 2 if (-e "$file$flags.htm")
251 0 0 if ((stat "$file$flags.htm")[9] >= (stat "$file")[9])
255 0 0 if $opts{'associate'}
261 1 1 if ($opts{'filter'})
263 0 1 unless open my $fh, '<', $file
268 1 0 if (open my $fh, '>', "$file$flags.htm") { }
274 0 1 if $opts{'associate'}
283 0 0 if $opts{'associate'}
291 0 1 if $opts{'associate'}
295 3 33 if ($COMBINE) { }
302 0 36 if ($opts{'filehandle'}) { }
36 0 elsif ($opts{'scalarref'}) { }
0 0 elsif ($opts{'arrayref'}) { }
312 1 35 if $opts{'filter'}
318 0 36 if $opts{'associate'}
324 30 8 unless $opts{'case_sensitive'}
325 38 0 if $r