Branch Coverage

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


line true false branch
181 924 87 unless $element_ref
185 46 41 unless (ref $element_ref)
203 0 18 unless defined $name
204 8 10 unless exists $default_ref->{$name}
219 14 0 if $model->type =~ /\Q$model_name\E$/
224 1 6 $model_name =~ s/^\+// ? :
252 403 56 if (defined $query and not &blessed($query))
257 413 46 if ($query)
258 0 413 if DEBUG()
285 413 46 if (defined $query)
287 0 413 if $@
292 0 459 if &DEBUG_PROCESS()
296 409 50 if ($submitted)
303 4 1232 unless defined $name
304 221 1011 if &none(sub { $name eq $_; } , @params)
310 252 759 if ($field->nested) { }
315 13 239 @values > 1 ? :
325 67 692 @values > 1 ? :
332 0 409 if DEBUG()
362 7 406 if (defined $indicator and ref $indicator ne 'CODE') { }
393 13 elsif (not defined $indicator) { }
363 0 7 if &DEBUG_PROCESS()
372 0 393 if &DEBUG_PROCESS()
394 282 127 unless @{$self->get_errors;}
395 279 130 unless @{$self->get_errors;}
396 278 131 unless @{$self->get_errors;}
412 4 1232 unless defined $name
413 21 1211 if exists $params{$name}
416 158 3 unless $self->nested_hash_key_exists($self->input, $name) or $field->default_empty_value
421 63 990 if (ref $input eq 'ARRAY') { }
3 1947 elsif (not defined $input and $field->default_empty_value) { }
436 0 409 if &DEBUG_PROCESS()
449 14 395 if (@names)
451 14 0 unless ($query_class =~ /^\+/)
460 3 26 unless $self->nested_hash_key_exists($input, $name)
479 0 62 unless defined $name
480 3 59 unless $self->nested_hash_key_exists($params, $name)
495 0 572 if DEBUG_CONSTRAINTS()
504 0 572 if DEBUG_CONSTRAINTS()
505 0 572 if DEBUG_CONSTRAINTS()
507 0 572 if (&blessed($@) and $@->isa('HTML::FormFu::Exception::Constraint')) { }
0 572 elsif ($@) { }
515 128 68 unless ($error->parent)
518 196 0 unless ($error->constraint)
537 0 27 unless defined $name
538 1 26 unless $self->nested_hash_key_exists($params, $name)
539 0 26 if &any(sub { defined $_; } , @{$inflator->parent->get_errors;})
547 0 26 if (&blessed($@) and $@->isa('HTML::FormFu::Exception::Inflator')) { }
0 26 elsif ($@) { }
555 3 0 unless $error->parent
556 3 0 unless $error->inflator
575 0 8 unless defined $name
576 0 8 unless $self->nested_hash_key_exists($params, $name)
577 0 8 if &any(sub { defined $_; } , @{$validator->parent->get_errors;})
581 0 8 if (&blessed($@) and $@->isa('HTML::FormFu::Exception::Validator')) { }
0 8 elsif ($@) { }
589 1 0 unless $error->parent
590 1 0 unless $error->validator
607 0 5 unless defined $name
608 0 5 unless $self->nested_hash_key_exists($params, $name)
609 0 5 if &any(sub { defined $_; } , @{$transformer->parent->get_errors;})
615 0 5 if (&blessed($@) and $@->isa('HTML::FormFu::Exception::Transformer')) { }
0 5 elsif ($@) { }
623 0 0 unless $error->parent
624 0 0 unless $error->transformer
645 4 1232 unless defined $name
646 1 1231 if $skip_private and $field->name =~ /^_/
648 6 1225 if ($field->non_param) { }
1047 178 elsif ($self->nested_hash_key_exists($params, $name)) { }
667 258 522 if $name eq $error
683 2 8 if (ref $hash->{$key} eq 'HASH') { }
2 6 elsif (ref $hash->{$key} eq 'ARRAY') { }
685 2 2 $subscript ? :
690 2 2 $subscript ? :
707 0 4 if (ref $array->[$i] eq 'HASH') { }
0 4 elsif (ref $array->[$i] eq 'ARRAY') { }
709 0 0 $subscript ? :
714 0 0 $subscript ? :
734 0 79 unless $self->submitted
742 15 176 if (@values > 1) { }
756 0 339 if @_ > 2
758 0 339 unless $self->submitted
760 334 5 if (@_ == 2)
761 19 315 unless $self->valid($name)
766 8 307 unless defined $value
768 22 285 if (ref $value eq 'ARRAY') { }
769 20 2 wantarray ? :
783 0 38 if @_ != 2
786 1 37 unless $self->valid($name)
792 3 34 ref $value eq 'ARRAY' ? :
800 0 7 if @_ != 2
804 1 6 unless $self->valid($name)
808 0 6 unless defined $value
810 5 1 ref $value eq 'ARRAY' ? :
818 0 3 if @_ != 2
822 1 2 unless $self->valid($name)
826 0 2 unless defined $value
828 1 1 ref $value eq 'ARRAY' ? :
836 0 992 unless $self->submitted
840 814 178 if (@_)
843 710 104 if &any(sub { $name eq $_; } , @valid)
848 0 104 if (defined $self->nested_name and $self->nested_name eq $name) { }
857 5 99 if (defined $parent)
861 2 3 unless $fail
874 144 760 unless $self->submitted
880 142 618 if (@_)
882 53 89 if &any(sub { /\Q$name\E/; } , @names)
893 0 4 if @_ != 3
899 4 0 if (&none(sub { $_ eq $key; } , @{$self->_valid_names;}))
909 0 1 if (not ref $arg_ref) { }
1 0 elsif (ref $arg_ref eq 'HASH') { }
924 0 1 ref $_ ? :
927 1 0 if (@names) { }
973 0 11 $args ? :
983 11 172 $args ? :
997 3 180 if ($self->force_error_message or $self->has_errors and defined $self->form_error_message)
1025 225 1 if (length $element_html)
1044 0 172 exists $args_ref->{'render_data'} ? :
1048 3 169 if (defined $render_ref->{'form_error_message'})
1055 2 170 if (defined $render_ref->{'javascript_src'})
1058 1 1 ref $uri eq 'ARRAY' ? :
1068 3 169 if (defined $render_ref->{'javascript'})
1089 0 6 if ('tt' eq $self->render_method) { }
1103 0 6 if ('tt' eq $self->render_method) { }
1125 0 3 if (ref $arg eq 'ARRAY') { }
1132 3 0 @return == 1 ? :
1138 2 1 if (not ref $arg) { }
1 0 elsif (ref $arg eq 'HASH') { }
1160 0 3 if @_ != 3
1162 0 3 if &reftype($opt) ne 'HASH'
1166 3 0 unless ($class =~ s/^\+//)
1182 0 0 if ($parent and exists $parent->default_args->{'output_processor'}{$type})
1198 0 1116 if (exists $args{'type'})
1210 0 0 @$x ? :