Branch Coverage

blib/lib/HTML/FormFu.pm
Criterion Covered Total %
branch 192 268 71.6


line true false branch
182 920 87 unless $element_ref
186 46 41 unless (ref $element_ref)
204 0 18 unless defined $name
205 8 10 unless exists $default_ref->{$name}
220 14 0 if $model->type =~ /\Q$model_name\E$/
225 1 6 $model_name =~ s/^\+// ? :
253 404 55 if (defined $query and not &blessed($query))
258 413 46 if ($query)
259 0 413 if DEBUG()
288 413 46 if (defined $query)
290 0 413 if $@
295 0 459 if &DEBUG_PROCESS()
299 409 50 if ($submitted)
306 4 1207 unless defined $name
307 197 1010 if &none(sub { $name eq $_; } , @params)
313 255 755 if ($field->nested) { }
318 13 242 @values > 1 ? :
328 64 691 @values > 1 ? :
335 0 409 if DEBUG()
365 7 406 if (defined $indicator and ref $indicator ne 'CODE') { }
393 13 elsif (not defined $indicator) { }
366 0 7 if &DEBUG_PROCESS()
375 0 393 if &DEBUG_PROCESS()
397 279 130 unless @{$self->get_errors;}
398 276 133 unless @{$self->get_errors;}
399 275 134 unless @{$self->get_errors;}
415 4 1207 unless defined $name
416 19 1188 if exists $params{$name}
419 131 6 unless $self->nested_hash_key_exists($self->input, $name) or $field->default_empty_value
424 62 995 if (ref $input eq 'ARRAY') { }
6 1951 elsif (not defined $input and $field->default_empty_value) { }
439 0 409 if &DEBUG_PROCESS()
452 13 396 if (@names)
454 13 0 unless ($query_class =~ /^\+/)
463 3 21 unless $self->nested_hash_key_exists($input, $name)
482 0 62 unless defined $name
483 3 59 unless $self->nested_hash_key_exists($params, $name)
498 0 538 if DEBUG_CONSTRAINTS()
507 0 538 if DEBUG_CONSTRAINTS()
508 0 538 if DEBUG_CONSTRAINTS()
510 0 538 if (&blessed($@) and $@->isa('HTML::FormFu::Exception::Constraint')) { }
0 538 elsif ($@) { }
518 130 68 unless ($error->parent)
521 198 0 unless ($error->constraint)
540 0 27 unless defined $name
541 1 26 unless $self->nested_hash_key_exists($params, $name)
542 0 26 if &any(sub { defined $_; } , @{$inflator->parent->get_errors;})
550 0 26 if (&blessed($@) and $@->isa('HTML::FormFu::Exception::Inflator')) { }
0 26 elsif ($@) { }
558 3 0 unless $error->parent
559 3 0 unless $error->inflator
578 0 8 unless defined $name
579 0 8 unless $self->nested_hash_key_exists($params, $name)
580 0 8 if &any(sub { defined $_; } , @{$validator->parent->get_errors;})
584 0 8 if (&blessed($@) and $@->isa('HTML::FormFu::Exception::Validator')) { }
0 8 elsif ($@) { }
592 1 0 unless $error->parent
593 1 0 unless $error->validator
610 0 5 unless defined $name
611 0 5 unless $self->nested_hash_key_exists($params, $name)
612 0 5 if &any(sub { defined $_; } , @{$transformer->parent->get_errors;})
618 0 5 if (&blessed($@) and $@->isa('HTML::FormFu::Exception::Transformer')) { }
0 5 elsif ($@) { }
626 0 0 unless $error->parent
627 0 0 unless $error->transformer
648 4 1207 unless defined $name
649 1 1206 if $skip_private and $field->name =~ /^_/
651 6 1200 if ($field->non_param) { }
1049 151 elsif ($self->nested_hash_key_exists($params, $name)) { }
670 266 524 if $name eq $error
686 2 8 if (ref $hash->{$key} eq 'HASH') { }
2 6 elsif (ref $hash->{$key} eq 'ARRAY') { }
688 2 2 $subscript ? :
693 2 2 $subscript ? :
710 0 4 if (ref $array->[$i] eq 'HASH') { }
0 4 elsif (ref $array->[$i] eq 'ARRAY') { }
712 0 0 $subscript ? :
717 0 0 $subscript ? :
737 0 77 unless $self->submitted
745 13 175 if (@values > 1) { }
759 0 336 if @_ > 2
761 0 336 unless $self->submitted
763 331 5 if (@_ == 2)
764 19 312 unless $self->valid($name)
769 8 304 unless defined $value
771 20 284 if (ref $value eq 'ARRAY') { }
772 18 2 wantarray ? :
786 0 38 if @_ != 2
789 1 37 unless $self->valid($name)
795 3 34 ref $value eq 'ARRAY' ? :
803 0 7 if @_ != 2
807 1 6 unless $self->valid($name)
811 0 6 unless defined $value
813 5 1 ref $value eq 'ARRAY' ? :
821 0 3 if @_ != 2
825 1 2 unless $self->valid($name)
829 0 2 unless defined $value
831 1 1 ref $value eq 'ARRAY' ? :
839 0 991 unless $self->submitted
843 815 176 if (@_)
846 709 106 if &any(sub { $name eq $_; } , @valid)
851 0 106 if (defined $self->nested_name and $self->nested_name eq $name) { }
860 5 101 if (defined $parent)
864 2 3 unless $fail
877 144 756 unless $self->submitted
883 143 613 if (@_)
885 54 89 if &any(sub { /\Q$name\E/; } , @names)
896 0 4 if @_ != 3
902 4 0 if (&none(sub { $_ eq $key; } , @{$self->_valid_names;}))
912 0 1 if (not ref $arg_ref) { }
1 0 elsif (ref $arg_ref eq 'HASH') { }
927 0 1 ref $_ ? :
930 1 0 if (@names) { }
976 0 11 $args ? :
986 11 176 $args ? :
1000 3 184 if ($self->force_error_message or $self->has_errors and defined $self->form_error_message)
1028 229 1 if (length $element_html)
1047 0 176 exists $args_ref->{'render_data'} ? :
1051 3 173 if (defined $render_ref->{'form_error_message'})
1058 2 174 if (defined $render_ref->{'javascript_src'})
1061 1 1 ref $uri eq 'ARRAY' ? :
1071 3 173 if (defined $render_ref->{'javascript'})
1092 0 6 if ('tt' eq $self->render_method) { }
1106 0 6 if ('tt' eq $self->render_method) { }
1128 0 3 if (ref $arg eq 'ARRAY') { }
1135 3 0 @return == 1 ? :
1141 2 1 if (not ref $arg) { }
1 0 elsif (ref $arg eq 'HASH') { }
1163 0 3 if @_ != 3
1165 0 3 if &reftype($opt) ne 'HASH'
1169 3 0 unless ($class =~ s/^\+//)
1185 0 0 if ($parent and exists $parent->default_args->{'output_processor'}{$type})
1201 0 1127 if (exists $args{'type'})
1213 0 0 @$x ? :