line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use strict; |
3
|
3
|
|
|
3
|
|
88786
|
use warnings; |
|
3
|
|
|
|
|
21
|
|
|
3
|
|
|
|
|
88
|
|
4
|
3
|
|
|
3
|
|
19
|
|
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
85
|
|
5
|
|
|
|
|
|
|
use Error::Pure qw(err); |
6
|
3
|
|
|
3
|
|
1353
|
use List::Util qw(none); |
|
3
|
|
|
|
|
24655
|
|
|
3
|
|
|
|
|
57
|
|
7
|
3
|
|
|
3
|
|
212
|
use Mo qw(build is); |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
418
|
|
8
|
3
|
|
|
3
|
|
1494
|
use Mo::utils qw(check_bool check_number); |
|
3
|
|
|
|
|
1539
|
|
|
3
|
|
|
|
|
1477
|
|
9
|
3
|
|
|
3
|
|
7291
|
use Readonly; |
|
3
|
|
|
|
|
4334
|
|
|
3
|
|
|
|
|
54
|
|
10
|
3
|
|
|
3
|
|
265
|
|
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
1053
|
|
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.05; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
has checked => ( |
18
|
|
|
|
|
|
|
is => 'ro', |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
has css_class => ( |
22
|
|
|
|
|
|
|
is => 'ro', |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
has disabled => ( |
26
|
|
|
|
|
|
|
is => 'ro', |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
has id => ( |
30
|
|
|
|
|
|
|
is => 'ro', |
31
|
|
|
|
|
|
|
); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
has label => ( |
34
|
|
|
|
|
|
|
is => 'ro', |
35
|
|
|
|
|
|
|
); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
has max => ( |
38
|
|
|
|
|
|
|
is => 'ro', |
39
|
|
|
|
|
|
|
); |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
has min => ( |
42
|
|
|
|
|
|
|
is => 'ro', |
43
|
|
|
|
|
|
|
); |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
has placeholder => ( |
46
|
|
|
|
|
|
|
is => 'ro', |
47
|
|
|
|
|
|
|
); |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
has readonly => ( |
50
|
|
|
|
|
|
|
is => 'ro', |
51
|
|
|
|
|
|
|
); |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
has required => ( |
54
|
|
|
|
|
|
|
is => 'ro', |
55
|
|
|
|
|
|
|
); |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
has size => ( |
58
|
|
|
|
|
|
|
is => 'ro', |
59
|
|
|
|
|
|
|
); |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
has value => ( |
62
|
|
|
|
|
|
|
is => 'ro', |
63
|
|
|
|
|
|
|
); |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
has type => ( |
66
|
|
|
|
|
|
|
is => 'ro', |
67
|
|
|
|
|
|
|
); |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
my $self = shift; |
70
|
|
|
|
|
|
|
|
71
|
3
|
|
|
3
|
0
|
1507
|
# Check checked. |
72
|
|
|
|
|
|
|
check_bool($self, 'checked'); |
73
|
|
|
|
|
|
|
|
74
|
3
|
|
|
|
|
11
|
# Check disabled. |
75
|
|
|
|
|
|
|
check_bool($self, 'disabled'); |
76
|
|
|
|
|
|
|
|
77
|
3
|
|
|
|
|
51
|
# Check max. |
78
|
|
|
|
|
|
|
check_number($self, 'max'); |
79
|
|
|
|
|
|
|
|
80
|
3
|
|
|
|
|
34
|
# Check min. |
81
|
|
|
|
|
|
|
check_number($self, 'min'); |
82
|
|
|
|
|
|
|
|
83
|
3
|
|
|
|
|
34
|
# Check readonly. |
84
|
|
|
|
|
|
|
check_bool($self, 'readonly'); |
85
|
|
|
|
|
|
|
|
86
|
3
|
|
|
|
|
29
|
# Check required. |
87
|
|
|
|
|
|
|
check_bool($self, 'required'); |
88
|
|
|
|
|
|
|
|
89
|
3
|
|
|
|
|
66
|
# Check size. |
90
|
|
|
|
|
|
|
check_number($self, 'size'); |
91
|
|
|
|
|
|
|
|
92
|
3
|
|
|
|
|
30
|
# Check type. |
93
|
|
|
|
|
|
|
if (! defined $self->{'type'}) { |
94
|
|
|
|
|
|
|
$self->{'type'} = 'text'; |
95
|
3
|
100
|
|
|
|
34
|
} |
96
|
1
|
|
|
|
|
2
|
if (none { $self->{'type'} eq $_ } @TYPES) { |
97
|
|
|
|
|
|
|
err "Parameter 'type' has bad value."; |
98
|
3
|
100
|
|
60
|
|
26
|
} |
|
60
|
|
|
|
|
336
|
|
99
|
1
|
|
|
|
|
5
|
|
100
|
|
|
|
|
|
|
return; |
101
|
|
|
|
|
|
|
} |
102
|
2
|
|
|
|
|
14
|
|
103
|
|
|
|
|
|
|
1; |
104
|
|
|
|
|
|
|
|