line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
2
|
|
|
2
|
|
2913
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
91
|
|
2
|
2
|
|
|
2
|
|
11
|
use warnings FATAL => 'all'; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
117
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package HTML::Tested::Value::CheckBox; |
5
|
2
|
|
|
2
|
|
12
|
use base 'HTML::Tested::Value::Array'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
1111
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub transform_value { |
8
|
11
|
|
|
11
|
0
|
28
|
my ($self, $caller, $val, $n) = @_; |
9
|
11
|
100
|
66
|
|
|
66
|
$val = [ 1, $val ] if (!$val || !ref($val)); |
10
|
11
|
|
|
|
|
74
|
return $self->SUPER::transform_value($caller, $val, $n); |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub merge_one_value { |
14
|
4
|
|
|
4
|
0
|
11
|
my ($self, $root, $val, @path) = @_; |
15
|
4
|
|
|
|
|
13
|
my $n = $self->name; |
16
|
4
|
|
|
|
|
17
|
my $c = $root->$n; |
17
|
4
|
100
|
100
|
|
|
67
|
if (!$c || !ref($c)) { |
18
|
3
|
|
|
|
|
10
|
$root->$n($val); |
19
|
|
|
|
|
|
|
} else { |
20
|
1
|
|
|
|
|
3
|
push @{ $root->$n }, $val; |
|
1
|
|
|
|
|
5
|
|
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub value_to_string { |
25
|
11
|
|
|
11
|
1
|
23
|
my ($self, $name, $val) = @_; |
26
|
11
|
100
|
|
|
|
33
|
my $che = $val->[1] ? " checked=\"1\"" : ""; |
27
|
|
|
|
|
|
|
return <
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
ENDS |
30
|
11
|
|
|
|
|
70
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub finish_load { |
33
|
7
|
|
|
7
|
0
|
54
|
my ($self, $root) = @_; |
34
|
7
|
|
|
|
|
23
|
my $n = $self->name; |
35
|
7
|
100
|
100
|
|
|
25
|
return if $root->$n || $root->ht_get_widget_option($n, "keep_undef"); |
36
|
2
|
|
|
|
|
8
|
$root->$n(0); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |