Branch Coverage

blib/lib/HTML/Template/Plugin/Dot.pm
Criterion Covered Total %
branch 71 88 80.6


line true false branch
29 0 127 $$options{'case_sensitive'} ? :
33 0 127 if $$self{'param_map_done'}{$param} and not $$self{'num_vars_left_in_loop'}
38 1 126 unless $exists
41 113 13 if (@dot_matches) { }
2 11 elsif (defined $value_type and length $value_type and $value_type eq 'ARRAY' || !(ref($value) =~ /^(CODE)|(HASH)|(SCALAR)$/) && $value->isa('ARRAY')) { }
47 136 23 if (not defined $dot_value_type && length $dot_value_type && ($dot_value_type eq 'ARRAY' || ref $value_for_tmpl && !(ref($value_for_tmpl) =~ /^(CODE)|(HASH)|(SCALAR)$/) && $value_for_tmpl->isa('ARRAY'))) { }
49 0 136 unless ref $$param_map{$_} eq 'HTML::Template::VAR'
54 0 23 unless ref $$param_map{$_} eq 'HTML::Template::LOOP'
67 0 2 unless ref $$param_map{$param} eq 'HTML::Template::LOOP'
71 1 1 if exists $$param_map{$param}[0]{'0'}
75 0 11 unless ref $$param_map{$param} eq 'HTML::Template::VAR'
90 13 114 if exists $$param_map{$param}
91 113 1 if (my(@matching_dot_tokes) = grep({/^$param\./;} keys %$param_map)) { }
121 0 168 if ($toke_name eq $param_name) { }
168 0 elsif (my($one, $the_rest) = split(/\./, $toke_name, 2)) { }
128 168 0 if ($one eq $param_name) { }
130 12 156 if $the_rest =~ s/\s*:\s*([_a-z]\w*)\s*$//
168 80 119 if (ref $ref and blessed $ref) { }
118 1 elsif (ref $ref eq 'HASH') { }
170 73 7 if ($ref->can($id)) { }
7 0 elsif (reftype $ref eq 'HASH') { }
173 33 40 if ($data)
174 33 0 if $data =~ s/^\(//
176 39 10 if ($data =~ s/ ^\s* ( $HTML::Template::Plugin::Dot::RE{'delimited'}{join $;, -'delim', q['"`]} # a string | $HTML::Template::Plugin::Dot::RE{'num'}{'real'} # or a number ) (?:,\s*)? //xi) { }
10 0 elsif ($data =~ s/ ^\s* ( # ($1) a sub-expression of the form "object.method(args)" ([_a-z]\w*) # ($2) the object in question (?: \. [_a-z]\w* # method name $HTML::Template::Plugin::Dot::RE{'balanced'}? # optional argument list )* ) (?:,\s*)? //xi) { }
207 4 6 if (exists $$self{'param_map'}{$m}) { }
4 2 elsif (exists $$self{'param_map_done'}{$o}) { }
227 0 31 if $data
231 64 7 if ($the_rest or not $want_loop) { }
239 4 67 if ($@)
240 2 2 if ($$self{'options'}{'die_on_bad_params'}) { }
252 0 7 if $data
254 6 1 if ($the_rest or not $want_loop) { }
255 5 1 exists $$ref{$id} ? :
257 0 1 exists $$ref{$id} ? :
266 103 15 if ($the_rest or not $want_loop) { }
267 102 1 exists $$ref{$id} ? :
269 15 0 exists $$ref{$id} ? :
277 23 141 if (not $the_rest and $want_loop)
278 16 7 $#results == 0 && ref $results[0] eq 'ARRAY' ? :
281 1 163 if $the_rest
284 23 140 if ($want_loop) { }
285 23 0 reftype $ref eq 'ARRAY' ? :
288 3 137 if ref $ref eq 'ARRAY'