Branch Coverage

blib/lib/Mojolicious/Plugin/FormFields.pm
Criterion Covered Total %
branch 65 78 83.3


line true false branch
39 9 11 unless ($field->valid)
53 0 7 $name ? :
76 1 117 unless $name
95 2 3 if @_ % 2
118 28 0 if defined $value
121 10 18 if ($type eq 'checkbox' or $type eq 'radio')
122 4 6 if not exists $options{'checked'} and defined $value and $value eq $options{'value'}
138 1 5 unless defined $value
149 7 0 @_ % 2 ? :
157 2 5 if (defined $c->param($name)) { }
183 1 6 if ref $_[-1] eq 'CODE'
184 3 4 if @_ % 2
205 0 2 if ($size and $size =~ /^(\d+)[xX](\d+)$/)
210 0 2 unless $self->_lookup_value
219 0 1 unless ref $block eq 'CODE'
237 2 6 ref $_[0] eq 'CODE' ? :
254 4 30 if defined $$self{'result'}
268 4 26 if ($eq)
274 6 24 if @{$$self{'filters'};}
296 24 0 if ($method =~ /^is_/) { }
298 0 24 unless $check
320 1 6 unless ref $value eq 'ARRAY'
355 4 50 if defined $$self{'value'}
361 26 24 unless ($object)
363 1 25 unless $object
373 40 21 if (&Scalar::Util::blessed($object) and $object->can($accessor)) { }
7 14 elsif ($isa eq 'HASH') { }
12 2 elsif ($isa eq 'ARRAY') { }
381 1 11 unless $accessor =~ /^\d+$/
407 0 33 unless $_[1]
412 12 21 if $$self{'name'} =~ /\Q$sep\E(\d+)$/
428 0 37 unless $name
430 4 33 if $m eq 'fields'
435 0 33 if $m eq 'error'
438 2 31 if $m eq 'is_equal'
447 2 7 $name ? :
453 0 12 if $name
460 7 8 unless ($field->valid)
474 0 12 unless $name