line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use strict; |
3
|
2
|
|
|
2
|
|
76601
|
use warnings; |
|
2
|
|
|
|
|
19
|
|
|
2
|
|
|
|
|
51
|
|
4
|
2
|
|
|
2
|
|
9
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
60
|
|
5
|
|
|
|
|
|
|
use Mo qw(build default is); |
6
|
2
|
|
|
2
|
|
789
|
use Mo::utils qw(check_array_object check_bool check_number); |
|
2
|
|
|
|
|
969
|
|
|
2
|
|
|
|
|
9
|
|
7
|
2
|
|
|
2
|
|
4930
|
|
|
2
|
|
|
|
|
25281
|
|
|
2
|
|
|
|
|
35
|
|
8
|
|
|
|
|
|
|
our $VERSION = 0.06; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has autofocus => ( |
11
|
|
|
|
|
|
|
ro => 1, |
12
|
|
|
|
|
|
|
); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
has css_class => ( |
15
|
|
|
|
|
|
|
is => 'ro', |
16
|
|
|
|
|
|
|
); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
has disabled => ( |
19
|
|
|
|
|
|
|
is => 'ro', |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
has form => ( |
23
|
|
|
|
|
|
|
ro => 1, |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
has id => ( |
27
|
|
|
|
|
|
|
is => 'ro', |
28
|
|
|
|
|
|
|
); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
has label => ( |
31
|
|
|
|
|
|
|
is => 'ro', |
32
|
|
|
|
|
|
|
); |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
has multiple => ( |
35
|
|
|
|
|
|
|
is => 'ro', |
36
|
|
|
|
|
|
|
); |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
has name => ( |
39
|
|
|
|
|
|
|
is => 'ro', |
40
|
|
|
|
|
|
|
); |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
has options => ( |
43
|
|
|
|
|
|
|
default => [], |
44
|
|
|
|
|
|
|
is => 'ro', |
45
|
|
|
|
|
|
|
); |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
has required => ( |
48
|
|
|
|
|
|
|
is => 'ro', |
49
|
|
|
|
|
|
|
); |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
has size => ( |
52
|
|
|
|
|
|
|
is => 'ro', |
53
|
|
|
|
|
|
|
); |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
my $self = shift; |
56
|
|
|
|
|
|
|
|
57
|
0
|
|
|
0
|
0
|
|
# Check autofocus. |
58
|
|
|
|
|
|
|
if (! defined $self->{'autofocus'}) { |
59
|
|
|
|
|
|
|
$self->{'autofocus'} = 0; |
60
|
0
|
0
|
|
|
|
|
} |
61
|
0
|
|
|
|
|
|
check_bool($self, 'autofocus'); |
62
|
|
|
|
|
|
|
|
63
|
0
|
|
|
|
|
|
# Check disabled. |
64
|
|
|
|
|
|
|
if (! defined $self->{'disabled'}) { |
65
|
|
|
|
|
|
|
$self->{'disabled'} = 0; |
66
|
0
|
0
|
|
|
|
|
} |
67
|
0
|
|
|
|
|
|
check_bool($self, 'disabled'); |
68
|
|
|
|
|
|
|
|
69
|
0
|
|
|
|
|
|
# Check multiple. |
70
|
|
|
|
|
|
|
if (! defined $self->{'multiple'}) { |
71
|
|
|
|
|
|
|
$self->{'multiple'} = 0; |
72
|
0
|
0
|
|
|
|
|
} |
73
|
0
|
|
|
|
|
|
check_bool($self, 'multiple'); |
74
|
|
|
|
|
|
|
|
75
|
0
|
|
|
|
|
|
# Check options. |
76
|
|
|
|
|
|
|
check_array_object($self, 'options', 'Data::HTML::Form::Select::Option', 'Option'); |
77
|
|
|
|
|
|
|
|
78
|
0
|
|
|
|
|
|
# Check required. |
79
|
|
|
|
|
|
|
if (! defined $self->{'required'}) { |
80
|
|
|
|
|
|
|
$self->{'required'} = 0; |
81
|
0
|
0
|
|
|
|
|
} |
82
|
0
|
|
|
|
|
|
check_bool($self, 'required'); |
83
|
|
|
|
|
|
|
|
84
|
0
|
|
|
|
|
|
# Check size. |
85
|
|
|
|
|
|
|
check_number($self, 'size'); |
86
|
|
|
|
|
|
|
|
87
|
0
|
|
|
|
|
|
return; |
88
|
|
|
|
|
|
|
} |
89
|
0
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
1; |
91
|
|
|
|
|
|
|
|