line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Valiemon::Attributes::Maximum; |
2
|
3
|
|
|
3
|
|
1581
|
use strict; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
79
|
|
3
|
3
|
|
|
3
|
|
9
|
use warnings; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
65
|
|
4
|
3
|
|
|
3
|
|
9
|
use utf8; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
19
|
|
5
|
3
|
|
|
3
|
|
430
|
use parent qw(Valiemon::Attributes); |
|
3
|
|
|
|
|
260
|
|
|
3
|
|
|
|
|
13
|
|
6
|
|
|
|
|
|
|
|
7
|
22
|
|
|
22
|
0
|
46
|
sub attr_name { 'maximum' } |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub is_valid { |
10
|
22
|
|
|
22
|
0
|
31
|
my ($class, $context, $schema, $data) = @_; |
11
|
22
|
|
|
|
|
28
|
my $max = $schema->{maximum}; |
12
|
22
|
|
100
|
|
|
65
|
my $exclusive = $schema->{exclusiveMaximum} || 0; |
13
|
|
|
|
|
|
|
$context->in_attr($class, sub { |
14
|
3
|
|
|
3
|
|
292
|
no warnings 'numeric'; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
247
|
|
15
|
22
|
100
|
|
22
|
|
65
|
$exclusive ? $data < $max : $data <= $max; |
16
|
22
|
|
|
|
|
117
|
}); |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
1; |