Branch Coverage

blib/lib/Template/Direct/Data.pm
Criterion Covered Total %
branch 40 70 57.1


line true false branch
51 160 0 if $data
63 465 0 if (defined $data)
64 1 464 if (UNIVERSAL::isa($data, 'ARRAY')) { }
85 159 146 if (not $newobject) { }
153 0 351 if not defined $name or $name eq ''
159 0 351 if ($name eq 'doc_debug_print')
167 26 353 if $depth == 0
172 42 311 unless defined $pdata
175 0 311 if $p{'forceString'} and UNIVERSAL::isa($pdata, 'ARRAY')
178 311 0 if defined $pdata
180 1 39 $p{'forceString'} ? :
190 1 100 if $name =~ /^\-?\d+$/
210 0 0 defined $prefix ? :
220 0 0 if ($name ne 'parent')
221 0 0 defined $prefix ? :
229 0 0 unless defined $item
230 0 0 if (UNIVERSAL::isa($item, 'ARRAY')) { }
0 0 elsif (UNIVERSAL::isa($item, 'HASH')) { }
235 0 0 if defined $item
247 0 403 unless (defined $pdata)
251 6 397 if ($part =~ /^\-?\d+$/) { }
252 1 5 if ($part < 0) { }
281 39 68 unless defined $data
282 6 62 unless (ref $data)
284 6 0 if ($data =~ /^\d+$/)
287 6 0 if ($to >= $from)
295 0 62 if (UNIVERSAL::isa($data, 'CODE'))
299 0 62 if (my $sub = overload::Method($data, '@{}'))
302 0 62 if (my $sub = overload::Method($data, '%{}'))
305 57 5 if UNIVERSAL::isa($data, 'ARRAY')
306 5 0 if (UNIVERSAL::isa($data, 'HASH'))
331 0 571 unless defined $data
332 0 571 if (UNIVERSAL::isa($data, 'CODE'))
335 0 571 if (my $sub = overload::Method($data, '%{}'))
338 482 89 if UNIVERSAL::isa($data, 'HASH')