line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Valiemon::Attributes::Maximum; |
2
|
1
|
|
|
1
|
|
724
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
37
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
40
|
|
4
|
1
|
|
|
1
|
|
6
|
use utf8; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
5
|
1
|
|
|
1
|
|
671
|
use parent qw(Valiemon::Attributes); |
|
1
|
|
|
|
|
352
|
|
|
1
|
|
|
|
|
8
|
|
6
|
|
|
|
|
|
|
|
7
|
6
|
|
|
6
|
0
|
57
|
sub attr_name { 'maximum' } |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub is_valid { |
10
|
6
|
|
|
6
|
0
|
9
|
my ($class, $context, $schema, $data) = @_; |
11
|
6
|
|
|
|
|
11
|
my $max = $schema->{maximum}; |
12
|
6
|
|
100
|
|
|
23
|
my $exclusive = $schema->{exclusiveMaximum} || 0; |
13
|
|
|
|
|
|
|
$context->in_attr($class, sub { |
14
|
1
|
|
|
1
|
|
144
|
no warnings 'numeric'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
103
|
|
15
|
6
|
100
|
|
6
|
|
26
|
$exclusive ? $data < $max : $data <= $max; |
16
|
6
|
|
|
|
|
44
|
}); |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
1; |