Branch Coverage

blib/lib/Moonshine/Element.pm
Criterion Covered Total %
branch 71 74 95.9


line true false branch
60 22787 704 unless defined $val
61 520 184 if is_arrayref($val)
63 25 159 if is_hashref($val)
73 392 18 unless defined $_[1]
75 11 7 if is_arrayref($val) and not is_arrayref($_[1])
77 1 1 if is_hashref($val) and is_hashref($_[1]) and map {$_[0]{$attr}{$_} = $_[1]{$_};} keys %{$_[1];}
79 4 2 if $_[0]{$attr} = $_[1]
87 118 13 if $meth =~ /BUILD|DEMOLISH/
89 13 0 if $element
97 208 23 unless is_arrayref($args->{$ele})
103 27 50 if (is_arrayref($args->{'data'}))
105 50 3 unless is_hashref($args->{'data'}[$_]) or is_blessed_ref($args->{'data'}[$_])
117 9 43 if (is_blessed_ref($build_args))
118 8 1 if $build_args->isa("Moonshine::Element")
127 8 11 if (defined $_[2] and my $parent = $_[0]{'parent'}) { }
5 6 elsif (defined $_[2]) { }
131 5 3 if $_[2] eq "after"
165 121 22680 if ($_[0]->$has_action)
177 8 143 if ($_[0]->has_before_element)
183 7 144 if ($_[0]->has_after_element)
193 62 94 $_[0]->has_data ? :
197 1 2 unless is_hashref($_[1])
208 23 74 unless is_arrayref($_[0]{$ele})
210 8 30 unless is_blessed_ref($e)
213 17 13 if $e->$has and $e->_attribute_value($_, $has) =~ /$_[1]/
217 5 8 if $found
224 1 5 unless is_scalarref(\$_[1])
229 0 0 unless is_scalarref(\$_[1])
236 9 175 unless is_arrayref($_[0]{$ele})
238 81 37 unless is_blessed_ref($e)
242 18 19 if $e->$has and $e->_attribute_value($_, $has) =~ /$_[1]/
251 1 3 unless is_scalarref(\$_[1])
256 1 1 unless is_scalarref(\$_[1])
262 32 119 if ($_[0]->has_children)
279 8 12 if $value
287 50 67 if $value
288 114 3 if is_scalarref(\$_) and $value .= $_