line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Valiemon::Attributes::Ref; |
2
|
5
|
|
|
5
|
|
3183
|
use strict; |
|
5
|
|
|
|
|
16
|
|
|
5
|
|
|
|
|
156
|
|
3
|
5
|
|
|
5
|
|
27
|
use warnings; |
|
5
|
|
|
|
|
14
|
|
|
5
|
|
|
|
|
133
|
|
4
|
5
|
|
|
5
|
|
26
|
use utf8; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
30
|
|
5
|
5
|
|
|
5
|
|
555
|
use parent qw(Valiemon::Attributes); |
|
5
|
|
|
|
|
301
|
|
|
5
|
|
|
|
|
98
|
|
6
|
|
|
|
|
|
|
|
7
|
5
|
|
|
5
|
|
324
|
use Carp qw(croak); |
|
5
|
|
|
|
|
23
|
|
|
5
|
|
|
|
|
836
|
|
8
|
|
|
|
|
|
|
|
9
|
33
|
|
|
33
|
0
|
96
|
sub attr_name { '$ref' } |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub is_valid { |
12
|
49
|
|
|
49
|
0
|
116
|
my ($class, $context, $schema, $data) = @_; |
13
|
49
|
|
|
|
|
96
|
my $ref = $schema->{'$ref'}; |
14
|
49
|
|
|
|
|
139
|
my $sub_schema = $context->rv->resolve_ref($ref); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
$context->in_attr($class, sub { |
17
|
33
|
|
|
33
|
|
78
|
$context->sub_validator($sub_schema)->validate($data, $context); |
18
|
33
|
|
|
|
|
212
|
}); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
1; |