line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Valiemon::Attributes::Ref; |
2
|
3
|
|
|
3
|
|
2898
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
116
|
|
3
|
3
|
|
|
3
|
|
17
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
122
|
|
4
|
3
|
|
|
3
|
|
17
|
use utf8; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
22
|
|
5
|
3
|
|
|
3
|
|
833
|
use parent qw(Valiemon::Attributes); |
|
3
|
|
|
|
|
348
|
|
|
3
|
|
|
|
|
22
|
|
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
271
|
use Carp qw(croak); |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
642
|
|
8
|
|
|
|
|
|
|
|
9
|
18
|
|
|
18
|
0
|
57
|
sub attr_name { '$ref' } |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub is_valid { |
12
|
18
|
|
|
18
|
0
|
37
|
my ($class, $context, $schema, $data) = @_; |
13
|
18
|
|
|
|
|
34
|
my $ref = $schema->{'$ref'}; |
14
|
18
|
|
|
|
|
80
|
my $sub_schema = $context->rv->resolve_ref($ref); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
$context->in_attr($class, sub { |
17
|
18
|
|
|
18
|
|
48
|
$context->sub_validator($sub_schema)->validate($data, $context); |
18
|
18
|
|
|
|
|
177
|
}); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
1; |