line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use strict; |
3
|
3
|
|
|
3
|
|
89714
|
use warnings; |
|
3
|
|
|
|
|
19
|
|
|
3
|
|
|
|
|
84
|
|
4
|
3
|
|
|
3
|
|
17
|
|
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
82
|
|
5
|
|
|
|
|
|
|
use Error::Pure qw(err); |
6
|
3
|
|
|
3
|
|
1348
|
use List::Util qw(none); |
|
3
|
|
|
|
|
24390
|
|
|
3
|
|
|
|
|
58
|
|
7
|
3
|
|
|
3
|
|
217
|
use Mo qw(build is); |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
403
|
|
8
|
3
|
|
|
3
|
|
1345
|
use Mo::utils qw(check_bool check_number); |
|
3
|
|
|
|
|
1476
|
|
|
3
|
|
|
|
|
1524
|
|
9
|
3
|
|
|
3
|
|
7468
|
use Readonly; |
|
3
|
|
|
|
|
4419
|
|
|
3
|
|
|
|
|
54
|
|
10
|
3
|
|
|
3
|
|
264
|
|
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
1139
|
|
11
|
|
|
|
|
|
|
Readonly::Array our @TYPES => qw(button checkbox color date datetime-local |
12
|
|
|
|
|
|
|
email file hidden image month number password radio range reset search |
13
|
|
|
|
|
|
|
submit tel text time url week); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
our $VERSION = 0.06; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
has autofocus => ( |
18
|
|
|
|
|
|
|
ro => 1, |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
has checked => ( |
22
|
|
|
|
|
|
|
is => 'ro', |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
has css_class => ( |
26
|
|
|
|
|
|
|
is => 'ro', |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
has disabled => ( |
30
|
|
|
|
|
|
|
is => 'ro', |
31
|
|
|
|
|
|
|
); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
has id => ( |
34
|
|
|
|
|
|
|
is => 'ro', |
35
|
|
|
|
|
|
|
); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
has label => ( |
38
|
|
|
|
|
|
|
is => 'ro', |
39
|
|
|
|
|
|
|
); |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
has max => ( |
42
|
|
|
|
|
|
|
is => 'ro', |
43
|
|
|
|
|
|
|
); |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
has min => ( |
46
|
|
|
|
|
|
|
is => 'ro', |
47
|
|
|
|
|
|
|
); |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
has placeholder => ( |
50
|
|
|
|
|
|
|
is => 'ro', |
51
|
|
|
|
|
|
|
); |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
has readonly => ( |
54
|
|
|
|
|
|
|
is => 'ro', |
55
|
|
|
|
|
|
|
); |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
has required => ( |
58
|
|
|
|
|
|
|
is => 'ro', |
59
|
|
|
|
|
|
|
); |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
has size => ( |
62
|
|
|
|
|
|
|
is => 'ro', |
63
|
|
|
|
|
|
|
); |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
has value => ( |
66
|
|
|
|
|
|
|
is => 'ro', |
67
|
|
|
|
|
|
|
); |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
has type => ( |
70
|
|
|
|
|
|
|
is => 'ro', |
71
|
|
|
|
|
|
|
); |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
my $self = shift; |
74
|
|
|
|
|
|
|
|
75
|
3
|
|
|
3
|
0
|
1123
|
# Check autofocus. |
76
|
|
|
|
|
|
|
if (! defined $self->{'autofocus'}) { |
77
|
|
|
|
|
|
|
$self->{'autofocus'} = 0; |
78
|
3
|
50
|
|
|
|
13
|
} |
79
|
3
|
|
|
|
|
7
|
check_bool($self, 'autofocus'); |
80
|
|
|
|
|
|
|
|
81
|
3
|
|
|
|
|
12
|
# Check checked. |
82
|
|
|
|
|
|
|
check_bool($self, 'checked'); |
83
|
|
|
|
|
|
|
|
84
|
3
|
|
|
|
|
57
|
# Check disabled. |
85
|
|
|
|
|
|
|
check_bool($self, 'disabled'); |
86
|
|
|
|
|
|
|
|
87
|
3
|
|
|
|
|
32
|
# Check max. |
88
|
|
|
|
|
|
|
check_number($self, 'max'); |
89
|
|
|
|
|
|
|
|
90
|
3
|
|
|
|
|
32
|
# Check min. |
91
|
|
|
|
|
|
|
check_number($self, 'min'); |
92
|
|
|
|
|
|
|
|
93
|
3
|
|
|
|
|
32
|
# Check readonly. |
94
|
|
|
|
|
|
|
check_bool($self, 'readonly'); |
95
|
|
|
|
|
|
|
|
96
|
3
|
|
|
|
|
30
|
# Check required. |
97
|
|
|
|
|
|
|
check_bool($self, 'required'); |
98
|
|
|
|
|
|
|
|
99
|
3
|
|
|
|
|
28
|
# Check size. |
100
|
|
|
|
|
|
|
check_number($self, 'size'); |
101
|
|
|
|
|
|
|
|
102
|
3
|
|
|
|
|
30
|
# Check type. |
103
|
|
|
|
|
|
|
if (! defined $self->{'type'}) { |
104
|
|
|
|
|
|
|
$self->{'type'} = 'text'; |
105
|
3
|
100
|
|
|
|
29
|
} |
106
|
1
|
|
|
|
|
3
|
if (none { $self->{'type'} eq $_ } @TYPES) { |
107
|
|
|
|
|
|
|
err "Parameter 'type' has bad value."; |
108
|
3
|
100
|
|
60
|
|
22
|
} |
|
60
|
|
|
|
|
337
|
|
109
|
1
|
|
|
|
|
4
|
|
110
|
|
|
|
|
|
|
return; |
111
|
|
|
|
|
|
|
} |
112
|
2
|
|
|
|
|
15
|
|
113
|
|
|
|
|
|
|
1; |
114
|
|
|
|
|
|
|
|