line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use strict; |
3
|
2
|
|
|
2
|
|
1201
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
50
|
|
4
|
2
|
|
|
2
|
|
9
|
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
40
|
|
5
|
|
|
|
|
|
|
use Moo; |
6
|
2
|
|
|
2
|
|
8
|
use utf8; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
10
|
|
7
|
2
|
|
|
2
|
|
559
|
use Scalar::Util qw(looks_like_number); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
9
|
|
8
|
2
|
|
|
2
|
|
55
|
use namespace::clean; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
80
|
|
9
|
2
|
|
|
2
|
|
11
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
8
|
|
10
|
|
|
|
|
|
|
with 'Dancer2::Plugin::FormValidator::Role::Validator'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
return { |
13
|
|
|
|
|
|
|
en => '%s must be at least %d', |
14
|
|
|
|
|
|
|
ru => '%s должно быть не меньше %d', |
15
|
1
|
|
|
1
|
0
|
1272
|
de => '%s muss größer als %d sein', |
16
|
|
|
|
|
|
|
}; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
my ($self, $field, $input, $min) = @_; |
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
|
|
|
|
8
|
if (looks_like_number($maybe_num)) { |
25
|
2
|
|
|
|
|
4
|
return $maybe_num >= $min; |
26
|
|
|
|
|
|
|
} |
27
|
2
|
50
|
|
|
|
22
|
else { |
28
|
2
|
|
|
|
|
12
|
return 0; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
} |
31
|
0
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
return 1; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
|
1; |