| line |
true |
false |
branch |
|
108
|
0 |
346 |
unless @_ > 1 |
|
115
|
0 |
346 |
unless $opt->{'name'} |
|
131
|
152 |
29 |
if (ref $_[0] or @_ > 1) |
|
134
|
0 |
215 |
if $k eq "name" |
|
144
|
0 |
1245 |
if @_ |
|
151
|
0 |
2349 |
if @_ |
|
152
|
2254 |
95 |
unless $self->{'other'} |
|
153
|
6 |
89 |
unless ref $self->{'other'} |
|
155
|
0 |
95 |
wantarray ? : |
|
165
|
0 |
7 |
unless $self->other |
|
174
|
1 |
6 |
if ($self->sticky and defined $v) |
|
178
|
4 |
3 |
if $self->javascript and not defined $v |
|
190
|
0 |
1222 |
if @_ |
|
191
|
1222 |
0 |
$self->{'_form'}{'params'}->can('multi_param') ? : |
|
|
173 |
1049 |
if (my(@v) = $self->{'_form'}{'params'}->can("multi_param") ? $self->{'_form'}{'params'}->multi_param($self->name) : $self->{'_form'}{'params'}->param($self->name)) |
|
193
|
6 |
173 |
if ($self->other and $v eq $self->othername) |
|
200
|
173 |
0 |
wantarray ? : |
|
208
|
0 |
1181 |
if (@_) |
|
216
|
999 |
182 |
wantarray ? : |
|
225
|
1246 |
2 |
unless exists $self->{'inflate'} |
|
229
|
0 |
2 |
if grep {(caller $_)[3] eq "CGI::FormBuilder::Field::validate";} (1, 2) |
|
235
|
0 |
2 |
if $self->invalid |
|
240
|
1 |
1 |
if ($cache and ref $cache eq 'ARRAY' and @{$cache;}) { } |
|
250
|
0 |
1 |
if ref $self->{'inflate'} ne "CODE" |
|
255
|
0 |
1 |
if $@ |
|
270
|
0 |
277 |
if (@_) |
|
274
|
265 |
12 |
unless ($self->force) |
|
277
|
67 |
198 |
if (my(@v) = $self->cgi_value) |
|
281
|
18 |
49 |
wantarray ? : |
|
293
|
0 |
1041 |
if (@_) |
|
298
|
0 |
1041 |
if $self->{'tag_value'} |
|
300
|
957 |
84 |
if ($self->sticky and not $self->force) |
|
303
|
106 |
851 |
if (my(@v) = $self->cgi_value) |
|
306
|
106 |
0 |
wantarray ? : |
|
317
|
0 |
0 |
if @_ |
|
318
|
0 |
0 |
if $self->{'tag_name'} |
|
321
|
0 |
0 |
unless $tag |
|
329
|
0 |
1334 |
if (@_) |
|
341
|
36 |
1298 |
if ($self->static and $self->{'type'} ne "hidden") |
|
354
|
1100 |
234 |
if $self->{'_cache'}{'type'} |
|
358
|
166 |
68 |
unless ($type = lc $self->{'type'}) |
|
365
|
166 |
0 |
if ($self->{'_form'}->smartness) |
|
367
|
51 |
115 |
if (my $n = $self->options) { } |
|
|
0 |
115 |
elsif ($self->{'_form'}->smartness > 1) { } |
|
369
|
15 |
36 |
if ($n >= $self->selectnum) { } |
|
378
|
8 |
28 |
if ($self->multiple or @v > 1 or $n == 1) { } |
|
390
|
0 |
0 |
if ($name =~ /passw(or)?d/i) { } |
|
|
0 |
0 |
elsif ($name =~ /(?:details?|comments?)$/i or grep /\n|\r/, @v || $self->cols || $self->rows) { } |
|
|
0 |
0 |
elsif ($name =~ /\bfile/i) { } |
|
413
|
0 |
234 |
if $@ |
|
421
|
0 |
774 |
if @_ |
|
422
|
82 |
692 |
if defined $self->{'label'} |
|
428
|
0 |
383 |
if (my $k = shift()) { } |
|
429
|
0 |
0 |
if @_ |
|
430
|
0 |
0 |
exists $self->{$k} ? : |
|
436
|
874 |
4208 |
if $k =~ /^_/ or $k eq "validate" |
|
437
|
18 |
4190 |
if ($k eq 'jsclick') { } |
|
|
3134 |
1056 |
elsif (exists $self->{$k}) { } |
|
444
|
162 |
2972 |
if $k eq "type" |
|
448
|
767 |
3441 |
unless defined $v |
|
457
|
8 |
375 |
if ($self->disabled) { } |
|
462
|
232 |
151 |
$ret{'type'} eq 'text' ? : |
|
467
|
0 |
383 |
wantarray ? : |
|
473
|
0 |
460 |
if (@_) |
|
477
|
3 |
457 |
if $self->{'multiple'} |
|
479
|
44 |
413 |
if @v > 1 |
|
485
|
0 |
760 |
if (@_) |
|
489
|
522 |
238 |
unless $self->{'options'} |
|
495
|
67 |
171 |
unless wantarray |
|
498
|
18 |
153 |
if $self->sortopts |
|
506
|
0 |
4 |
if @_ |
|
508
|
4 |
0 |
unless ($mess) |
|
510
|
0 |
4 |
$type eq 'text' ? : |
|
511
|
0 |
4 |
if $self->other |
|
514
|
0 |
4 |
if $mess =~ /%/ |
|
517
|
4 |
0 |
$self->{'_form'}{'stylesheet'} ? : |
|
523
|
0 |
400 |
if @_ |
|
525
|
400 |
0 |
unless ($mess) |
|
527
|
275 |
125 |
$type eq 'text' ? : |
|
528
|
7 |
393 |
if $self->other |
|
538
|
0 |
383 |
if @_ |
|
541
|
12 |
25 |
$self->{'_form'}{'stylesheet'} ? : |
|
548
|
2 |
199 |
$self->invalid ? : |
|
554
|
5 |
13 |
$type eq 'radio' || $type eq 'checkbox' ? : |
|
576
|
246 |
77 |
unless $self->javascript and $pattern || $self->required |
|
580
|
0 |
77 |
unless ($jsfunc) |
|
588
|
0 |
77 |
if (ref $pattern eq "Regexp") |
|
594
|
0 |
77 |
if (ref $pattern eq "HASH") |
|
599
|
33 |
44 |
if $VALIDATE{$pattern} |
|
611
|
71 |
6 |
$self->required ? : |
|
615
|
39 |
38 |
if ($pattern =~ /^m?(\S)(.*)\1([gimsu]+)?$/) { } |
|
|
2 |
36 |
elsif (ref $pattern eq 'ARRAY') { } |
|
|
36 |
0 |
elsif (ref $pattern eq 'CODE' or $pattern eq 'VALUE' or $self->required and not $pattern) { } |
|
639
|
0 |
0 |
if $pattern =~ /^[A-Z]+$/ |
|
675
|
0 |
41 |
exists $self->{'inflate'} ? : |
|
676
|
0 |
41 |
if defined $inflate and ref $inflate ne "CODE" |
|
678
|
0 |
41 |
if defined $inflate and not defined $pattern |
|
680
|
0 |
41 |
if $inflate |
|
685
|
14 |
27 |
if $VALIDATE{$pattern} |
|
688
|
2 |
39 |
if (ref $pattern eq "HASH") |
|
702
|
48 |
12 |
if ($self->required) { } |
|
706
|
10 |
2 |
unless length $value and defined $pattern |
|
713
|
18 |
32 |
if ($pattern =~ /^m(\S)(.*)\1$/ or $pattern =~ m[^(/)(.*)\1$]) { } |
|
|
8 |
24 |
elsif (ref $pattern eq 'ARRAY') { } |
|
|
10 |
14 |
elsif (ref $pattern eq 'CODE') { } |
|
|
1 |
13 |
elsif ($pattern eq 'VALUE') { } |
|
|
9 |
4 |
elsif (not defined $pattern) { } |
|
718
|
3 |
15 |
unless ($value =~ /$tpat/) |
|
724
|
5 |
3 |
unless (&ismember($value, @{$pattern;})) |
|
731
|
0 |
10 |
unless (&{$pattern;}($value, $extra)) |
|
737
|
0 |
1 |
unless (defined $value and length $value) |
|
742
|
2 |
7 |
unless length $value > 0 |
|
745
|
0 |
4 |
if $pattern =~ /^[A-Z]+$/ |
|
749
|
0 |
4 |
unless (eval "\$value $pattern ? 1 : 0") |
|
752
|
0 |
4 |
if $@ |
|
756
|
10 |
40 |
$thisfail ? : |
|
760
|
0 |
50 |
if (defined $inflate) |
|
763
|
0 |
0 |
if ($@) |
|
771
|
0 |
0 |
$thisfail ? : |
|
778
|
6 |
35 |
if ($bad or not $atleastone and $self->required) { } |
|
793
|
0 |
1551 |
if @_ |
|
794
|
8 |
1543 |
if exists $self->{'static'} |
|
801
|
0 |
383 |
if @_ |
|
803
|
8 |
0 |
$self->{'disabled'} ? : |
|
|
8 |
375 |
if exists $self->{'disabled'} |
|
810
|
0 |
688 |
if @_ |
|
811
|
0 |
688 |
if exists $self->{'javascript'} |
|
818
|
0 |
1541 |
if @_ |
|
819
|
1515 |
26 |
unless $self->{'growable'} |
|
821
|
0 |
26 |
unless ($self->type eq "text" or $self->type eq "file") |
|
830
|
0 |
9659 |
if @_ |
|
832
|
0 |
9659 |
unless exists $self->{'name'} |
|
844
|
0 |
10351 |
unless ref $self |
|
846
|
6 |
10345 |
if @_ |