line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Valiemon::Attributes::Maximum; |
2
|
3
|
|
|
3
|
|
1876
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
92
|
|
3
|
3
|
|
|
3
|
|
14
|
use warnings; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
72
|
|
4
|
3
|
|
|
3
|
|
15
|
use utf8; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
16
|
|
5
|
3
|
|
|
3
|
|
524
|
use parent qw(Valiemon::Attributes); |
|
3
|
|
|
|
|
303
|
|
|
3
|
|
|
|
|
14
|
|
6
|
|
|
|
|
|
|
|
7
|
22
|
|
|
22
|
0
|
72
|
sub attr_name { 'maximum' } |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub is_valid { |
10
|
22
|
|
|
22
|
0
|
57
|
my ($class, $context, $schema, $data) = @_; |
11
|
22
|
|
|
|
|
47
|
my $max = $schema->{maximum}; |
12
|
22
|
|
100
|
|
|
85
|
my $exclusive = $schema->{exclusiveMaximum} || 0; |
13
|
|
|
|
|
|
|
$context->in_attr($class, sub { |
14
|
3
|
|
|
3
|
|
368
|
no warnings 'numeric'; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
261
|
|
15
|
22
|
100
|
|
22
|
|
92
|
$exclusive ? $data < $max : $data <= $max; |
16
|
22
|
|
|
|
|
164
|
}); |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
1; |