Branch Coverage

blib/lib/HTML/FormFu/Element/Checkboxgroup.pm
Criterion Covered Total %
branch 28 32 87.5


line true false branch
47 3 45 defined $self->form->id ? :
48 48 0 defined $self->nested_name ? :
52 15 107 if (exists $option->{'group'}) { }
68 6 131 if (not exists $option->{'attributes'}{'id'} and defined $self->auto_id)
79 0 6 if (defined(my $count = $self->repeatable_count))
87 6 131 if (exists $option->{'label'} and exists $option->{'attributes'}{'id'} and not exists $option->{'label_attributes'}{'for'})
100 2 61 ref $value eq 'ARRAY' ? :
0 23 ref $default eq 'ARRAY' ? :
15 122 if ($submitted and defined $value and ref $value eq 'ARRAY' ? &any(sub { $_ eq $option->{'value'}; } , @$value) : $value eq $option->{'value'}) { }
4 118 elsif ($submitted and $self->retain_default and !defined($value) || $value eq $HTML::FormFu::Element::Checkboxgroup::EMPTY_STR and $self->value eq $option->{'value'}) { }
52 66 elsif ($submitted) { }
8 58 elsif (defined $default and ref $default eq 'ARRAY' ? &any(sub { $_ eq $option->{'value'}; } , @$default) : $default eq $option->{'value'}) { }
156 15 107 if (defined $option->{'group'}) { }
161 8 7 if (defined $option->{'label'})
184 30 0 if ($render->{'reverse_group'}) { }
215 99 8 if ($render->{'reverse_group'}) { }