line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JSV::Keyword::Draft4::Ref; |
2
|
|
|
|
|
|
|
|
3
|
47
|
|
|
47
|
|
21670
|
use strict; |
|
47
|
|
|
|
|
68
|
|
|
47
|
|
|
|
|
1118
|
|
4
|
47
|
|
|
47
|
|
134
|
use warnings; |
|
47
|
|
|
|
|
45
|
|
|
47
|
|
|
|
|
985
|
|
5
|
47
|
|
|
47
|
|
132
|
use parent qw(JSV::Keyword); |
|
47
|
|
|
|
|
43
|
|
|
47
|
|
|
|
|
162
|
|
6
|
|
|
|
|
|
|
|
7
|
47
|
|
|
47
|
|
1866
|
use JSV::Keyword qw(:constants); |
|
47
|
|
|
|
|
51
|
|
|
47
|
|
|
|
|
9252
|
|
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
|
69
|
my ($class, $context, $schema, $instance) = @_; |
15
|
|
|
|
|
|
|
|
16
|
68
|
|
|
|
|
50
|
eval { |
17
|
|
|
|
|
|
|
$context->reference->resolve( |
18
|
|
|
|
|
|
|
$schema, |
19
|
|
|
|
|
|
|
+{ |
20
|
|
|
|
|
|
|
base_uri => $context->original_schema->{id}, |
21
|
68
|
|
|
|
|
99
|
root => $context->original_schema |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
}; |
25
|
68
|
50
|
|
|
|
441
|
if ( my $e = $@ ) { |
26
|
0
|
|
|
|
|
|
$context->log_error(sprintf("Failed to resolve reference: %s", $e)); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |