line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FormValidator::LazyWay::Result; |
2
|
|
|
|
|
|
|
|
3
|
26
|
|
|
26
|
|
151
|
use strict; |
|
26
|
|
|
|
|
56
|
|
|
26
|
|
|
|
|
974
|
|
4
|
26
|
|
|
26
|
|
153
|
use warnings; |
|
26
|
|
|
|
|
51
|
|
|
26
|
|
|
|
|
843
|
|
5
|
26
|
|
|
26
|
|
142
|
use Carp; |
|
26
|
|
|
|
|
59
|
|
|
26
|
|
|
|
|
1866
|
|
6
|
|
|
|
|
|
|
|
7
|
26
|
|
|
26
|
|
150
|
use base qw/Class::Accessor::Fast/; |
|
26
|
|
|
|
|
57
|
|
|
26
|
|
|
|
|
3327
|
|
8
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors( |
9
|
|
|
|
|
|
|
qw/ |
10
|
|
|
|
|
|
|
unknown |
11
|
|
|
|
|
|
|
missing |
12
|
|
|
|
|
|
|
valid |
13
|
|
|
|
|
|
|
invalid |
14
|
|
|
|
|
|
|
error_message |
15
|
|
|
|
|
|
|
has_missing |
16
|
|
|
|
|
|
|
has_custom_invalid |
17
|
|
|
|
|
|
|
has_invalid |
18
|
|
|
|
|
|
|
has_error |
19
|
|
|
|
|
|
|
success |
20
|
|
|
|
|
|
|
fixed |
21
|
|
|
|
|
|
|
/ |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub custom_invalid { |
25
|
4
|
|
|
4
|
0
|
958
|
my $self = shift; |
26
|
4
|
|
|
|
|
4
|
my $key = shift; |
27
|
4
|
|
|
|
|
5
|
my $message = shift; |
28
|
4
|
100
|
|
|
|
10
|
if ($key) { |
29
|
2
|
|
|
|
|
7
|
$self->has_error(1); |
30
|
2
|
|
|
|
|
19
|
$self->has_custom_invalid(1); |
31
|
2
|
|
|
|
|
13
|
$self->success(0); |
32
|
2
|
|
|
|
|
12
|
$self->{custom_invalid}->{$key} = $message; |
33
|
2
|
|
|
|
|
11
|
$self->{error_message}->{$key} = $message; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
4
|
|
|
|
|
15
|
return $self->{custom_invalid}; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |