line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JSV::Keyword::Draft4::Ref; |
2
|
|
|
|
|
|
|
|
3
|
44
|
|
|
44
|
|
30956
|
use strict; |
|
44
|
|
|
|
|
80
|
|
|
44
|
|
|
|
|
999
|
|
4
|
44
|
|
|
44
|
|
189
|
use warnings; |
|
44
|
|
|
|
|
70
|
|
|
44
|
|
|
|
|
1102
|
|
5
|
44
|
|
|
44
|
|
187
|
use parent qw(JSV::Keyword); |
|
44
|
|
|
|
|
65
|
|
|
44
|
|
|
|
|
209
|
|
6
|
|
|
|
|
|
|
|
7
|
44
|
|
|
44
|
|
2128
|
use JSV::Keyword qw(:constants); |
|
44
|
|
|
|
|
67
|
|
|
44
|
|
|
|
|
10659
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub instance_type() { INSTANCE_TYPE_ANY(); } |
10
|
|
|
|
|
|
|
sub keyword() { '$ref' } |
11
|
|
|
|
|
|
|
sub keyword_priority() { 5; } |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub validate { |
14
|
68
|
|
|
68
|
0
|
123
|
my ($class, $context, $schema, $instance) = @_; |
15
|
|
|
|
|
|
|
|
16
|
68
|
|
|
|
|
94
|
eval { |
17
|
|
|
|
|
|
|
$context->reference->resolve( |
18
|
|
|
|
|
|
|
$schema, |
19
|
|
|
|
|
|
|
+{ |
20
|
|
|
|
|
|
|
base_uri => $context->original_schema->{id}, |
21
|
68
|
|
|
|
|
182
|
root => $context->original_schema |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
}; |
25
|
68
|
50
|
|
|
|
645
|
if ( my $e = $@ ) { |
26
|
0
|
|
|
|
|
|
$context->log_error(sprintf("Failed to resolve reference: %s", $e)); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |