line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JSV::Keyword::Draft4::Ref; |
2
|
|
|
|
|
|
|
|
3
|
47
|
|
|
47
|
|
36929
|
use strict; |
|
47
|
|
|
|
|
97
|
|
|
47
|
|
|
|
|
1275
|
|
4
|
47
|
|
|
47
|
|
238
|
use warnings; |
|
47
|
|
|
|
|
91
|
|
|
47
|
|
|
|
|
1311
|
|
5
|
47
|
|
|
47
|
|
237
|
use parent qw(JSV::Keyword); |
|
47
|
|
|
|
|
79
|
|
|
47
|
|
|
|
|
305
|
|
6
|
|
|
|
|
|
|
|
7
|
47
|
|
|
47
|
|
2653
|
use JSV::Keyword qw(:constants); |
|
47
|
|
|
|
|
89
|
|
|
47
|
|
|
|
|
13318
|
|
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
|
142
|
my ($class, $context, $schema, $instance) = @_; |
15
|
|
|
|
|
|
|
|
16
|
68
|
|
|
|
|
90
|
eval { |
17
|
|
|
|
|
|
|
$context->reference->resolve( |
18
|
|
|
|
|
|
|
$schema, |
19
|
|
|
|
|
|
|
+{ |
20
|
|
|
|
|
|
|
base_uri => $context->original_schema->{id}, |
21
|
68
|
|
|
|
|
186
|
root => $context->original_schema |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
}; |
25
|
68
|
50
|
|
|
|
657
|
if ( my $e = $@ ) { |
26
|
0
|
|
|
|
|
|
$context->log_error(sprintf("Failed to resolve reference: %s", $e)); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |