Branch Coverage

blib/lib/HTML/FormHandler.pm
Criterion Covered Total %
branch 104 152 68.4


line true false branch
63 541 0 if ($self->widget_form)
177 0 0 if $class
217 0 0 ref $_[0] eq 'ARRAY' ? :
227 1 84 if $self->action
228 85 0 if $self->http_method
229 0 85 if $self->enctype
230 8 77 if $self->style
233 14 71 if @$class
235 85 0 ref $mod_attr eq 'HASH' ? :
242 12 3 if @$class
244 15 0 ref $mod_attr eq 'HASH' ? :
250 0 1364 if ($self->can('field_html_attributes'))
258 1273 943 unless $self->can($flag_name)
277 609 46 unless $self->tag_exists($name)
279 0 46 if ref $tag eq 'CODE'
280 46 0 unless $tag =~ /^%/
282 0 0 if $self->form and $self->form->block_exists($block_name)
346 0 0 if $self->_has_form_message($msg)
366 0 246 if (scalar @_ == 1 and ref $_[0] ne 'HASH')
368 0 0 &blessed($arg) ? :
378 3 243 unless $self->no_widgets or $self->widget_form eq 'Simple'
381 3 240 if $self->has_active or $self->has_inactive or $self->has_flag('is_wizard')
383 0 243 if defined $self->item_id and not $self->item
389 242 1 unless ($self->no_preload)
390 0 242 $self->use_init_obj_over_item ? :
10 232 if (my $init_object = $self->use_init_obj_over_item ? $self->init_object || $self->item : $self->item || $self->init_object) { }
398 0 243 if $self->verbose
407 0 271 if $self->verbose
408 102 169 if $self->processed
410 157 114 if $self->posted
411 96 175 if $self->validated and not $self->no_update
412 96 175 if $self->validated and not $self->no_update
413 0 271 if $self->verbose
421 8 4 if $self->posted
422 5 7 if $self->validated and not $self->no_update
436 2 94 if ($self->has_repeatable_fields and $self->item)
438 0 4 unless $field->is_active
444 1 8 if ($sub_field->has_flag('is_compound') and $sub_field->has_primary_key)
446 1 0 unless $pk_field->fif
448 1 0 if $needs_reload
451 3 1 unless $needs_reload
457 1 0 if (ref $rep_item)
555 0 165 if $self->verbose
573 80 203 if (@args == 1) { }
169 34 elsif (@args > 1) { }
579 0 239 unless $self->can($key)
584 0 283 if ($self->item_id and not $self->item)
594 164 119 if $self->has_params and not $self->has_posted
595 283 0 unless ($self->did_init_obj)
596 1 282 $self->use_init_obj_over_item ? :
55 228 if (my $init_object = $self->use_init_obj_over_item ? $self->init_object || $self->item : $self->item || $self->init_object) { }
74 154 elsif (not $self->posted) { }
607 165 118 if ($self->posted)
617 1 278 if ($self->has_active)
620 1 0 if ($field) { }
629 1 278 if ($self->has_inactive)
632 1 0 if ($field) { }
646 0 1 if ($self->has_active)
649 0 0 if ($field) { }
658 1 0 if ($self->has_inactive)
661 1 0 if ($field) { }
688 0 10 if @$group < 2
693 25 2 unless defined $value
697 0 2 if $self->field($name)->type eq 'Boolean' and $value == 0
698 0 2 unless HTML::FormHandler::Field::has_some_value($value)
702 0 6 unless $field and not $field->required
730 354 0 unless $self->params_args
732 6 348 if ($self->html_prefix)
735 4 350 unless defined $new_params
741 1 0 unless $self->params_args
749 0 4 unless (defined $message[0])
768 4 277 if ($self->has_update_field_list)
775 2 279 if ($self->has_defaults)
788 0 11 unless ($field)
792 0 13 unless $field->can($attr_name)
794 1 12 if ($attr_name eq 'tags') { }