Branch Coverage

blib/lib/HTML/FormHandler/Field/Select.pm
Criterion Covered Total %
branch 68 88 77.2


line true false branch
50 42 59 if ($self->options and $self->has_options)
71 51 50 if ($self->form and $self->form->can($set_options))
73 2 49 if ($attr and $attr->isa('Moose::Meta::Method::Accessor')) { }
111 37 64 if ($self->multiple) { }
122 26 0 if $self->multiple
143 0 0 unless $field->widget eq 'Select' and $size
145 0 0 if @$options > $size
146 0 0 $field->multiple ? :
152 3 1 unless defined $value
153 0 4 unless defined $value
154 4 0 if ($self->multiple) { }
155 1 3 unless (ref $value eq 'ARRAY')
156 1 0 if ($self->has_inflate_default_method) { }
170 8 4 if (exists $value_hash{$_->{'value'}})
173 4 4 unless keys %value_hash
181 0 0 if $_->{'value'} eq $value
191 0 113 unless defined $value
193 2 111 if (ref $value eq 'ARRAY' and not $self->can('multiple') && $self->multiple) { }
1 129 elsif (ref $value ne 'ARRAY' and $self->multiple) { }
204 1 110 if $self->no_option_validation
209 12 1419 if (exists $opt->{'group'}) { }
218 2 108 if ($self->has_many)
221 19 91 ref $value eq 'ARRAY' ? :
222 25 98 unless ($options{$value})
236 0 20 if defined $self->default and not $result->has_value
246 1 124 if defined $self->default and not $result->has_value
254 11 15 ref $input eq 'ARRAY' ? :
26 53 if $self->multiple
258 1 78 if defined $self->default and not $result->has_value
267 64 160 if $self->options_from eq 'build' or $self->has_options and $self->do_not_reload
270 150 10 if ($self->has_options_method) { }
10 0 elsif ($self->form) { }
276 10 0 if $self->parent
278 0 10 if scalar @options
280 10 150 unless @options
288 49 101 ref $options[0] eq 'ARRAY' ? :
289 18 132 if (ref $opts->[0] eq 'HASH')
294 150 0 if ($opts)
296 44 106 if $self->has_sort_options_method
311 408 0 unless $_->{'checked'}
312 2 58 if (scalar @defaults)
313 0 2 if ($self->multiple) { }
344 124 5 unless $self->has_many and $self->multiple
347 2 3 unless ref $value eq 'ARRAY' and scalar @$value and ref $value->[0] eq 'HASH'