line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use strict; |
3
|
2
|
|
|
2
|
|
1210
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
48
|
|
4
|
2
|
|
|
2
|
|
10
|
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
50
|
|
5
|
|
|
|
|
|
|
use Moo; |
6
|
2
|
|
|
2
|
|
10
|
use utf8; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
10
|
|
7
|
2
|
|
|
2
|
|
608
|
use Scalar::Util qw(looks_like_number); |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
35
|
|
8
|
2
|
|
|
2
|
|
54
|
use namespace::clean; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
81
|
|
9
|
2
|
|
|
2
|
|
11
|
|
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
11
|
|
10
|
|
|
|
|
|
|
with 'Dancer2::Plugin::FormValidator::Role::Validator'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
return { |
13
|
|
|
|
|
|
|
en => '%s must be no more %d characters long', |
14
|
|
|
|
|
|
|
ru => '%s должно содержать не более %d символов', |
15
|
1
|
|
|
1
|
0
|
1274
|
de => '%s kann nicht mehr als %d Zeichen enthalten', |
16
|
|
|
|
|
|
|
}; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
my ($self, $field, $input, $max) = @_; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
if ($self->_field_defined_and_non_empty($field, $input)) { |
22
|
2
|
|
|
2
|
0
|
6
|
my $maybe_str = $input->{$field}; |
23
|
|
|
|
|
|
|
|
24
|
2
|
50
|
|
|
|
8
|
if (looks_like_number($maybe_str)) { |
25
|
2
|
|
|
|
|
4
|
return 0; |
26
|
|
|
|
|
|
|
} |
27
|
2
|
50
|
|
|
|
9
|
else { |
28
|
0
|
|
|
|
|
0
|
return length($maybe_str) <= $max; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
} |
31
|
2
|
|
|
|
|
15
|
|
32
|
|
|
|
|
|
|
return 1; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
|
1; |