Condition Coverage

lib/CGI/FormBuilder/Field.pm
Criterion Covered Total %
condition 72 128 56.2


and 3 conditions

line !l l&&!r l&&r condition
175 0 6 1 $self->sticky and defined $v
179 2 1 4 $self->javascript and not defined $v
194 173 0 6 $self->other and $v eq $self->othername
241 1 0 1 $cache and ref $cache eq 'ARRAY'
1 0 1 $cache and ref $cache eq 'ARRAY' and @{$cache;}
301 73 11 957 $self->sticky and not $self->force
342 1298 0 36 $self->static and $$self{'type'} ne 'hidden'
576 0 323 0 $self->javascript and $pattern || $self->required
615 0 0 36 $self->required and not $pattern
671 41 0 0 defined $inflate and ref $inflate ne 'CODE'
673 41 0 0 defined $inflate and not defined $pattern
701 4 6 2 length $value and defined $pattern
732 0 0 1 defined $value and length $value
773 24 11 0 not $atleastone and $self->required

or 2 conditions

line l !l condition
172 2 5 $$oa{'type'} ||= 'text'
403 51 115 $type ||= 'text'
539 37 346 $$self{'comment'} || (return '')
595 0 0 $$pattern{'javascript'} || (return '')
684 2 0 $$pattern{'perl'} || (return 1)
692 0 41 $$self{'invalid'} ||= 0
775 6 0 $bad || 1

or 3 conditions

line l !l&&r !l&&!r condition
118 0 346 0 ref $self || $self
132 0 152 29 ref $_[0] or @_ > 1
146 20 3 1222 $$self{'force'} || $$self{'override'}
379 7 0 29 $self->multiple or @v > 1
7 1 28 $self->multiple or @v > 1 or $n == 1
391 0 0 0 @v || $self->cols || $self->rows
0 0 0 $name =~ /(?:details?|comments?)$/i or grep /\n|\r/, @v || $self->cols || $self->rows
437 766 108 4208 $k =~ /^_/ or $k eq 'validate'
461 0 90 293 $ret{'class'} ||= $$self{'_form'}->class('_' . ($ret{'type'} eq 'text' ? 'input' : $ret{'type'}))
510 0 4 0 shift() || $self->type
513 4 0 0 $$self{'_form'}{'messages'}->$et || $$self{'_form'}{'messages'}->form_invalid_default
524 0 0 400 $$self{'jsmessage'} || $$self{'message'}
526 0 400 0 shift() || $self->type
529 400 0 0 $$self{'_form'}{'messages'}->$et || $$self{'_form'}{'messages'}->js_invalid_default
553 0 18 0 shift() || $self->type
554 5 0 13 $type eq 'radio' || $type eq 'checkbox'
576 41 36 246 $pattern || $self->required
615 0 0 36 ref $pattern eq 'CODE' or $pattern eq 'VALUE'
0 0 36 ref $pattern eq 'CODE' or $pattern eq 'VALUE' or $self->required and not $pattern
666 0 23 18 shift() || $$self{'validate'}
708 0 18 32 $pattern =~ /^m(\S)(.*)\1$/ or $pattern =~ m[^(/)(.*)\1$]
724 0 10 0 $$form{'c'} || $form
773 6 0 35 $bad or not $atleastone and $self->required
816 26 0 0 $self->type eq 'text' or $self->type eq 'file'