Condition Coverage

lib/CGI/FormBuilder/Field.pm
Criterion Covered Total %
condition 70 128 54.6


and 3 conditions

line !l l&&!r l&&r condition
174 0 6 1 $self->sticky and defined $v
178 2 1 4 $self->javascript and not defined $v
193 173 0 6 $self->other and $v eq $self->othername
240 1 0 1 $cache and ref $cache eq 'ARRAY'
1 0 1 $cache and ref $cache eq 'ARRAY' and @{$cache;}
300 73 11 957 $self->sticky and not $self->force
341 1298 0 36 $self->static and $self->{'type'} ne 'hidden'
575 0 323 0 $self->javascript and $pattern || $self->required
614 0 0 36 $self->required and not $pattern
670 41 0 0 defined $inflate and ref $inflate ne 'CODE'
672 41 0 0 defined $inflate and not defined $pattern
700 4 6 2 length $value and defined $pattern
731 0 0 1 defined $value and length $value
772 24 11 0 not $atleastone and $self->required

or 2 conditions

line l !l condition
171 2 5 $oa->{'type'} ||= 'text'
402 51 115 $type ||= 'text'
538 37 346 $self->{'comment'} || (return '')
594 0 0 $pattern->{'javascript'} || (return '')
683 2 0 $pattern->{'perl'} || (return 1)
691 0 41 $self->{'invalid'} ||= 0
774 6 0 $bad || 1

or 3 conditions

line l !l&&r !l&&!r condition
117 0 346 0 ref $self || $self
131 0 152 29 ref $_[0] or @_ > 1
145 20 0 1225 $self->{'force'} || $self->{'override'}
378 7 0 29 $self->multiple or @v > 1
7 1 28 $self->multiple or @v > 1 or $n == 1
390 0 0 0 @v || $self->cols || $self->rows
0 0 0 $name =~ /(?:details?|comments?)$/i or grep /\n|\r/, @v || $self->cols || $self->rows
436 766 108 4208 $k =~ /^_/ or $k eq 'validate'
462 0 90 293 $ret{'class'} ||= $self->{'_form'}->class('_' . ($ret{'type'} eq 'text' ? 'input' : $ret{'type'}))
509 0 4 0 shift() || $self->type
513 4 0 0 $self->{'_form'}{'messages'}->$et || $self->{'_form'}{'messages'}->form_invalid_default
523 0 0 400 $self->{'jsmessage'} || $self->{'message'}
525 0 400 0 shift() || $self->type
529 400 0 0 $self->{'_form'}{'messages'}->$et || $self->{'_form'}{'messages'}->js_invalid_default
552 0 18 0 shift() || $self->type
553 5 0 13 $type eq 'radio' || $type eq 'checkbox'
575 41 36 246 $pattern || $self->required
614 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
665 0 0 41 shift() || $self->{'validate'}
707 0 18 32 $pattern =~ /^m(\S)(.*)\1$/ or $pattern =~ m[^(/)(.*)\1$]
723 0 10 0 $form->{'c'} || $form
772 6 0 35 $bad or not $atleastone and $self->required
815 26 0 0 $self->type eq 'text' or $self->type eq 'file'