JSV/Keyword/Draft4/Ref.pm

filter: Statementstmt 94.4% 17 / 18 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 1 totaltotal 88.4% 23 / 26 CC 2 SCAR 3.1
CC
2
Cov
90%
validate
2.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« JSV/Keyword.pm ↑ Summary JSV/Keyword/Draft4/MaxItems.pm »
1 package JSV::Keyword::Draft4::Ref;
2  
3 47 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 47 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 47 ▶use parent qw(JSV::Keyword);
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 47 ▶use JSV::Keyword qw(:constants);
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 sub instance_type() { INSTANCE_TYPE_ANY(); }
10 sub keyword() { '$ref' }
11 sub keyword_priority() { 5; }
12  
13 68 ▶sub validate {
Subroutine validate: called CC=2 SCAR=7.4
Pod undocumented
14 68 my ($class, $context, $schema, $instance) = @_;
15  
16 68 eval {
17 $context->reference->resolve(
18 $schema,
19 +{
20 base_uri => $context->original_schema->{id},
21 68 root => $context->original_schema
22 }
23 );
24 };
25 68 ▶ if ( my $e = $@ ) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $e = $@) 0 68 68
26 0 $context->log_error(sprintf("Failed to resolve reference: %s", $e));
27 }
28 }
29  
30 47 1;
« JSV/Keyword.pm ↑ Summary JSV/Keyword/Draft4/MaxItems.pm »