Branch Coverage

blib/lib/HTML/Template/Plugin/Dot.pm
Criterion Covered Total %
branch 81 96 84.3


line true false branch
34 0 140 $options->{'case_sensitive'} ? :
45 0 140 if $self->{'param_map_done'}{$param} and not $self->{'num_vars_left_in_loop'}
51 4 136 unless $exists
54 121 15 if (@dot_matches) { }
2 13 elsif (defined $value_type and length $value_type and $value_type eq 'ARRAY' || !(ref($value) =~ /^(CODE)|(HASH)|(SCALAR)$/) && $value->isa('ARRAY')) { }
59 23 143 if (defined $dot_value_type and length $dot_value_type and $dot_value_type eq 'ARRAY' || ref $value_for_tmpl && !(ref($value_for_tmpl) =~ /^(CODE)|(HASH)|(SCALAR)$/) && $value_for_tmpl->isa('ARRAY')) { }
61 0 143 unless ref $param_map->{$dot_match} eq "HTML::Template::VAR"
66 0 23 unless ref $param_map->{$dot_match} eq "HTML::Template::LOOP"
79 0 2 unless ref $param_map->{$param} eq "HTML::Template::LOOP"
83 1 1 if exists $param_map->{$param}[0]{'0'}
87 0 13 unless ref $param_map->{$param} eq "HTML::Template::VAR"
93 2 11 if exists $self->{'num_vars_left_in_loop'}
107 15 125 if exists $param_map->{$param}
109 43 7 if exists $self->{'_seen_exists_in_tmpl'} and exists $self->{'_seen_exists_in_tmpl'}{$param}
111 78 4 if (my(@matching_dot_tokens) = grep({/^$param\./;} keys %$param_map)) { }
142 1 176 if ($token_name eq $param_name)
148 0 176 unless length $the_rest
149 0 176 unless $one eq $param_name
152 12 164 if $the_rest =~ s/\s*:\s*([_a-z]\w*)\s*$//
185 88 119 if (&blessed($ref)) { }
118 1 elsif (ref $ref eq 'HASH') { }
186 79 9 if ($ref->can($id) or $ref->can('AUTOLOAD') and not $ref->isa('Test::MockObject')) { }
9 0 elsif (&reftype($ref) eq 'HASH') { }
188 36 43 if ($data)
189 36 0 if $data =~ s/^\(//
191 40 12 if ($data =~ s/ ^\s* ( $RE_delimited # a string | $RE_num_real # or a number ) (?:,\s*)? //xi) { }
12 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 $RE_balanced? # optional argument list )* ) (?:,\s*)? //xi) { }
221 5 7 if (exists $self->{'param_map'}{$m}) { }
4 3 elsif (exists $self->{'param_map_done'}{$o}) { }
1 2 elsif (exists $input->{$o}) { }
222 1 4 exists $input->{$m} ? :
245 0 34 if $data
248 70 7 if ($the_rest or not $want_loop) { }
256 4 73 if ($@)
257 2 2 if ($self->{'options'}{'die_on_bad_params'}) { }
269 1 8 if $data
271 7 1 if ($the_rest or not $want_loop) { }
272 6 1 exists $ref->{$id} ? :
274 0 1 exists $ref->{$id} ? :
282 103 15 if ($the_rest or not $want_loop) { }
283 102 1 exists $ref->{$id} ? :
285 15 0 exists $ref->{$id} ? :
290 23 148 if (not $the_rest and $want_loop)
291 16 7 $#results == 0 && ref $results[0] eq 'ARRAY' ? :
294 1 170 if $the_rest
296 23 147 if ($want_loop) { }
297 23 0 &reftype($ref) eq 'ARRAY' ? :
300 3 144 if ref $ref eq "ARRAY"