line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Valiemon::Attributes::Ref; |
2
|
5
|
|
|
5
|
|
2335
|
use strict; |
|
5
|
|
|
|
|
7
|
|
|
5
|
|
|
|
|
132
|
|
3
|
5
|
|
|
5
|
|
17
|
use warnings; |
|
5
|
|
|
|
|
5
|
|
|
5
|
|
|
|
|
113
|
|
4
|
5
|
|
|
5
|
|
15
|
use utf8; |
|
5
|
|
|
|
|
5
|
|
|
5
|
|
|
|
|
21
|
|
5
|
5
|
|
|
5
|
|
487
|
use parent qw(Valiemon::Attributes); |
|
5
|
|
|
|
|
271
|
|
|
5
|
|
|
|
|
21
|
|
6
|
|
|
|
|
|
|
|
7
|
5
|
|
|
5
|
|
234
|
use Carp qw(croak); |
|
5
|
|
|
|
|
6
|
|
|
5
|
|
|
|
|
661
|
|
8
|
|
|
|
|
|
|
|
9
|
35
|
|
|
35
|
0
|
61
|
sub attr_name { '$ref' } |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub is_valid { |
12
|
51
|
|
|
51
|
0
|
64
|
my ($class, $context, $schema, $data) = @_; |
13
|
51
|
|
|
|
|
50
|
my $ref = $schema->{'$ref'}; |
14
|
51
|
|
|
|
|
99
|
my $sub_schema = $context->rv->resolve_ref($ref); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
$context->in_attr($class, sub { |
17
|
35
|
|
|
35
|
|
57
|
$context->sub_validator($sub_schema)->validate($data, $context); |
18
|
35
|
|
|
|
|
129
|
}); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
1; |