line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use strict; |
3
|
2
|
|
|
2
|
|
1036
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
44
|
|
4
|
2
|
|
|
2
|
|
9
|
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
35
|
|
5
|
|
|
|
|
|
|
use Moo; |
6
|
2
|
|
|
2
|
|
7
|
use utf8; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
6
|
|
7
|
2
|
|
|
2
|
|
501
|
use Scalar::Util qw(looks_like_number); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
14
|
|
8
|
2
|
|
|
2
|
|
43
|
use namespace::clean; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
80
|
|
9
|
2
|
|
|
2
|
|
9
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
9
|
|
10
|
|
|
|
|
|
|
with 'Dancer2::Plugin::FormValidator::Role::Validator'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
return { |
13
|
|
|
|
|
|
|
en => '%s must be no more than %d', |
14
|
|
|
|
|
|
|
ru => '%s должно быть не больше %d', |
15
|
1
|
|
|
1
|
0
|
1606
|
de => 'muss kleiner als %d sein', |
16
|
|
|
|
|
|
|
}; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
my ($self, $field, $input, $max) = @_; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
if ($self->_field_defined_and_non_empty($field, $input)) { |
22
|
2
|
|
|
2
|
0
|
7
|
my $maybe_num = $input->{$field}; |
23
|
|
|
|
|
|
|
|
24
|
2
|
50
|
|
|
|
9
|
if (looks_like_number($maybe_num)) { |
25
|
2
|
|
|
|
|
4
|
return $maybe_num <= $max; |
26
|
|
|
|
|
|
|
} |
27
|
2
|
50
|
|
|
|
9
|
else { |
28
|
2
|
|
|
|
|
10
|
return 0; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
} |
31
|
0
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
return 1; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
|
1; |