| 1 | package JSON::Schema::Corvus::Node; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | # The compiled schema graph: one node per distinct (document, pointer), with its keywords digested. A port of the | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | # Python package's node.py (Corvus.Text.Json.RuntimeEvaluator.Compilation.SchemaNode, trimmed to what code generation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | # and results collection need). A node is a hash of the fields below; the compiler sets them, and they are fixed once | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | # compilation finishes, so the derived has_* and is_* properties are computed once. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | 4 | ▶ | use 5.026; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | 4 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | 4 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | 4 | ▶ | use Exporter 'import'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | # JSON types as bits. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | 4 | ▶ | use constant { T_NONE => 0, T_NULL => 1, T_BOOLEAN => 2, T_OBJECT => 4, T_ARRAY => 8, T_NUMBER => 16, T_STRING => 32, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | 4 | T_INTEGER => 64, T_ALL => 127 }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | # Content kinds. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | 4 | ▶ | use constant { CONTENT_NONE => 0, CONTENT_BASE64 => 1, CONTENT_JSON => 2, CONTENT_BASE64_JSON => 3 }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | 4 | our @EXPORT_OK = qw(T_NONE T_NULL T_BOOLEAN T_OBJECT T_ARRAY T_NUMBER T_STRING T_INTEGER T_ALL | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | CONTENT_NONE CONTENT_BASE64 CONTENT_JSON CONTENT_BASE64_JSON); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | 4 | our %EXPORT_TAGS = (all => \@EXPORT_OK); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | # The fields of a node and their defaults (-1 is "none" for a child node id or a count; undef for a list or a map). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | 4 | my %DEFAULTS = ( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | always_true => 0, always_false => 0, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | # Assertions. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | type => T_NONE, has_type => 0, has_const => 0, const_value => undef, enum_values => undef, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | # References. dynamic_ref is { anchor, is_recursive, fallback, by_resource => {resource id => node id} }. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | ref => -1, static_dynamic_ref => -1, static_dynamic_keyword => undef, dynamic_ref => undef, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | # In-place applicators. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | all_of => undef, any_of => undef, one_of => undef, not_ => -1, if_ => -1, then => -1, else_ => -1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | # Objects. properties is { name => node id } with property_order the names in schema order; pattern_properties is | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | # [ { pattern, node } ]; dependencies is [ { keyword, name, required => [names] or undef, schema => node id or | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | # undef } ]. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | properties => undef, property_order => undef, pattern_properties => undef, additional_properties => -1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | property_names => -1, required => undef, required_list => undef, dependencies => undef, min_properties => -1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | max_properties => -1, unevaluated_properties => -1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | # Arrays. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | prefix_items => undef, prefix_keyword => 'prefixItems', items_keyword => 'items', items => -1, contains => -1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | min_contains => 1, max_contains => -1, contains_marks_evaluated => 0, min_items => -1, max_items => -1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | unique_items => 0, unevaluated_items => -1, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | # Strings. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | min_length => -1, max_length => -1, pattern => undef, format => undef, format_kind => 'unknown', assert_format => 0, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | content => CONTENT_NONE, assert_content => 0, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | # Numbers. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | minimum => undef, maximum => undef, exclusive_minimum => undef, exclusive_maximum => undef, multiple_of => undef, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | # Annotations, in schema order: [ { keyword, value, strings_only } ]. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | annotations => undef, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | # Analysis. A discriminator is { property, known => [ [value, [branch indexes]] ], unknown => [branch indexes], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | # all_require }. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | marks_properties => 0, marks_items => 0, in_place_cycle => 0, one_of_discriminator => undef, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | any_of_discriminator => undef, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | 182 | ▶ | sub new { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | 182 | my ($class, %fields) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | 182 | return bless { %DEFAULTS, %fields }, $class; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | 0 | ▶ | sub _is_numeric_format { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_is_numeric_format: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | 0 | require JSON::Schema::Corvus::Formats; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | 0 | return JSON::Schema::Corvus::Formats::is_numeric_format($_[0]); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | 1130 | ▶ | sub has_object_keywords { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
has_object_keywords: called CC=11 SCAR=25.3
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | 1130 | my ($n) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | return $n->{_has_object} //= (defined $n->{properties} || defined $n->{pattern_properties} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | || $n->{additional_properties} >= 0 || $n->{property_names} >= 0 || defined $n->{required} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | || defined $n->{dependencies} || $n->{min_properties} >= 0 || $n->{max_properties} >= 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | 1130 | ▶ | || $n->{unevaluated_properties} >= 0) ? 1 : 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition73%19/26
$n->{"_has_object"} //= defined $n->{"properties"} || defined $n->{"pattern_properties"} || $n->{"additional_properties"} >= 0 || $n->{"property_names"} >= 0 || defined $n->{"required"} || defined $n->{"dependencies"} || $n->{"min_properties"} >= 0 || $n->{"max_properties"} >= 0 || $n->{"unevaluated_properties"} >= 0 ? 1 : 0
defined $n->{"properties"} or defined $n->{"pattern_properties"} or $n->{"additional_properties"} >= 0 or $n->{"property_names"} >= 0 or defined $n->{"required"} or defined $n->{"dependencies"} or $n->{"min_properties"} >= 0 or $n->{"max_properties"} >= 0 or $n->{"unevaluated_properties"} >= 0
defined $n->{"properties"} or defined $n->{"pattern_properties"} or $n->{"additional_properties"} >= 0 or $n->{"property_names"} >= 0 or defined $n->{"required"} or defined $n->{"dependencies"} or $n->{"min_properties"} >= 0 or $n->{"max_properties"} >= 0
defined $n->{"properties"} or defined $n->{"pattern_properties"} or $n->{"additional_properties"} >= 0 or $n->{"property_names"} >= 0 or defined $n->{"required"} or defined $n->{"dependencies"} or $n->{"min_properties"} >= 0
defined $n->{"properties"} or defined $n->{"pattern_properties"} or $n->{"additional_properties"} >= 0 or $n->{"property_names"} >= 0 or defined $n->{"required"} or defined $n->{"dependencies"}
defined $n->{"properties"} or defined $n->{"pattern_properties"} or $n->{"additional_properties"} >= 0 or $n->{"property_names"} >= 0 or defined $n->{"required"}
defined $n->{"properties"} or defined $n->{"pattern_properties"} or $n->{"additional_properties"} >= 0 or $n->{"property_names"} >= 0
defined $n->{"properties"} or defined $n->{"pattern_properties"} or $n->{"additional_properties"} >= 0
defined $n->{"properties"} or defined $n->{"pattern_properties"}
MC/DC100%1/1
$n->{"_has_object"} //= defined $n->{"properties"} || defined $n->{"pattern_properties"} || $n->{"additional_properties"} >= 0 || $n->{"property_names"} >= 0 || defined $n->{"required"} || defined $n->{"dependencies"} || $n->{"min_properties"} >= 0 || $n->{"max_properties"} >= 0 || $n->{"unevaluated_properties"} >= 0 ? 1 : 0
$n->{"_has_object"}
Truth table100%2/2
A
A= $n->{"_has_object"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | 887 | ▶ | sub has_array_keywords { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
has_array_keywords: called CC=9 SCAR=23.3
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | 887 | my ($n) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | return $n->{_has_array} //= (defined $n->{prefix_items} || $n->{items} >= 0 || $n->{contains} >= 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | 887 | ▶ | || $n->{min_items} >= 0 || $n->{max_items} >= 0 || $n->{unique_items} || $n->{unevaluated_items} >= 0) ? 1 : 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition70%14/20
$n->{"_has_array"} //= defined $n->{"prefix_items"} || $n->{"items"} >= 0 || $n->{"contains"} >= 0 || $n->{"min_items"} >= 0 || $n->{"max_items"} >= 0 || $n->{"unique_items"} || $n->{"unevaluated_items"} >= 0 ? 1 : 0
defined $n->{"prefix_items"} or $n->{"items"} >= 0 or $n->{"contains"} >= 0 or $n->{"min_items"} >= 0 or $n->{"max_items"} >= 0 or $n->{"unique_items"} or $n->{"unevaluated_items"} >= 0
defined $n->{"prefix_items"} or $n->{"items"} >= 0 or $n->{"contains"} >= 0 or $n->{"min_items"} >= 0 or $n->{"max_items"} >= 0 or $n->{"unique_items"}
defined $n->{"prefix_items"} or $n->{"items"} >= 0 or $n->{"contains"} >= 0 or $n->{"min_items"} >= 0 or $n->{"max_items"} >= 0
defined $n->{"prefix_items"} or $n->{"items"} >= 0 or $n->{"contains"} >= 0 or $n->{"min_items"} >= 0
defined $n->{"prefix_items"} or $n->{"items"} >= 0 or $n->{"contains"} >= 0
defined $n->{"prefix_items"} or $n->{"items"} >= 0
MC/DC100%1/1
$n->{"_has_array"} //= defined $n->{"prefix_items"} || $n->{"items"} >= 0 || $n->{"contains"} >= 0 || $n->{"min_items"} >= 0 || $n->{"max_items"} >= 0 || $n->{"unique_items"} || $n->{"unevaluated_items"} >= 0 ? 1 : 0
$n->{"_has_array"}
Truth table100%2/2
A
A= $n->{"_has_array"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | 91 | ▶ | sub has_string_keywords { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
has_string_keywords: called CC=9 SCAR=25.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | 91 | my ($n) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | return $n->{_has_string} //= ($n->{min_length} >= 0 || $n->{max_length} >= 0 || defined $n->{pattern} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | || ($n->{assert_format} && defined $n->{format} && !_is_numeric_format($n->{format_kind})) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | 91 | ▶ | || $n->{assert_content}) ? 1 : 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition55%11/20
$n->{"_has_string"} //= $n->{"min_length"} >= 0 || $n->{"max_length"} >= 0 || defined $n->{"pattern"} || $n->{"assert_format"} && defined $n->{"format"} && !_is_numeric_format($n->{"format_kind"}) || $n->{"assert_content"} ? 1 : 0
$n->{"min_length"} >= 0 or $n->{"max_length"} >= 0 or defined $n->{"pattern"} or $n->{"assert_format"} and defined $n->{"format"} and not _is_numeric_format($n->{"format_kind"}) or $n->{"assert_content"}
$n->{"min_length"} >= 0 or $n->{"max_length"} >= 0 or defined $n->{"pattern"} or $n->{"assert_format"} and defined $n->{"format"} and not _is_numeric_format($n->{"format_kind"})
$n->{"min_length"} >= 0 or $n->{"max_length"} >= 0 or defined $n->{"pattern"}
$n->{"min_length"} >= 0 or $n->{"max_length"} >= 0
$n->{"assert_format"} and defined $n->{"format"} and not _is_numeric_format($n->{"format_kind"})
$n->{"assert_format"} and defined $n->{"format"}
MC/DC100%1/1
$n->{"_has_string"} //= $n->{"min_length"} >= 0 || $n->{"max_length"} >= 0 || defined $n->{"pattern"} || $n->{"assert_format"} && defined $n->{"format"} && !_is_numeric_format($n->{"format_kind"}) || $n->{"assert_content"} ? 1 : 0
$n->{"_has_string"}
Truth table100%2/2
A
A= $n->{"_has_string"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | 89 | ▶ | sub has_number_keywords { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
has_number_keywords: called CC=9 SCAR=23.3
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | 89 | my ($n) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | return $n->{_has_number} //= (defined $n->{minimum} || defined $n->{maximum} || defined $n->{exclusive_minimum} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | || defined $n->{exclusive_maximum} || defined $n->{multiple_of} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | 89 | ▶ | || ($n->{assert_format} && _is_numeric_format($n->{format_kind}))) ? 1 : 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition70%14/20
$n->{"_has_number"} //= defined $n->{"minimum"} || defined $n->{"maximum"} || defined $n->{"exclusive_minimum"} || defined $n->{"exclusive_maximum"} || defined $n->{"multiple_of"} || $n->{"assert_format"} && _is_numeric_format($n->{"format_kind"}) ? 1 : 0
defined $n->{"minimum"} or defined $n->{"maximum"} or defined $n->{"exclusive_minimum"} or defined $n->{"exclusive_maximum"} or defined $n->{"multiple_of"} or $n->{"assert_format"} and _is_numeric_format($n->{"format_kind"})
defined $n->{"minimum"} or defined $n->{"maximum"} or defined $n->{"exclusive_minimum"} or defined $n->{"exclusive_maximum"} or defined $n->{"multiple_of"}
defined $n->{"minimum"} or defined $n->{"maximum"} or defined $n->{"exclusive_minimum"} or defined $n->{"exclusive_maximum"}
defined $n->{"minimum"} or defined $n->{"maximum"} or defined $n->{"exclusive_minimum"}
defined $n->{"minimum"} or defined $n->{"maximum"}
$n->{"assert_format"} and _is_numeric_format($n->{"format_kind"})
MC/DC100%1/1
$n->{"_has_number"} //= defined $n->{"minimum"} || defined $n->{"maximum"} || defined $n->{"exclusive_minimum"} || defined $n->{"exclusive_maximum"} || defined $n->{"multiple_of"} || $n->{"assert_format"} && _is_numeric_format($n->{"format_kind"}) ? 1 : 0
$n->{"_has_number"}
Truth table100%2/2
A
A= $n->{"_has_number"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | 647 | ▶ | sub has_in_place_applicators { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
has_in_place_applicators: called CC=12 SCAR=27.3
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | 647 | my ($n) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | return $n->{_has_in_place} //= ($n->{ref} >= 0 || $n->{static_dynamic_ref} >= 0 || defined $n->{dynamic_ref} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | || defined $n->{all_of} || defined $n->{any_of} || defined $n->{one_of} || $n->{not_} >= 0 || $n->{if_} >= 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | 0 | ▶ | || (defined $n->{dependencies} && grep { defined $_->{schema} } @{ $n->{dependencies} })) ? 1 : 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition72%21/29
$n->{"_has_in_place"} //= $n->{"ref"} >= 0 || $n->{"static_dynamic_ref"} >= 0 || defined $n->{"dynamic_ref"} || defined $n->{"all_of"} || defined $n->{"any_of"} || defined $n->{"one_of"} || $n->{"not_"} >= 0 || $n->{"if_"} >= 0 || defined $n->{"dependencies"} && grep({defined $_->{"schema"};} @{$$n{"dependencies"};}) ? 1 : 0
$n->{"ref"} >= 0 or $n->{"static_dynamic_ref"} >= 0 or defined $n->{"dynamic_ref"} or defined $n->{"all_of"} or defined $n->{"any_of"} or defined $n->{"one_of"} or $n->{"not_"} >= 0 or $n->{"if_"} >= 0 or defined $n->{"dependencies"} and grep {defined $_->{"schema"};} @{$$n{"dependencies"};}
$n->{"ref"} >= 0 or $n->{"static_dynamic_ref"} >= 0 or defined $n->{"dynamic_ref"} or defined $n->{"all_of"} or defined $n->{"any_of"} or defined $n->{"one_of"} or $n->{"not_"} >= 0 or $n->{"if_"} >= 0
$n->{"ref"} >= 0 or $n->{"static_dynamic_ref"} >= 0 or defined $n->{"dynamic_ref"} or defined $n->{"all_of"} or defined $n->{"any_of"} or defined $n->{"one_of"} or $n->{"not_"} >= 0
$n->{"ref"} >= 0 or $n->{"static_dynamic_ref"} >= 0 or defined $n->{"dynamic_ref"} or defined $n->{"all_of"} or defined $n->{"any_of"} or defined $n->{"one_of"}
$n->{"ref"} >= 0 or $n->{"static_dynamic_ref"} >= 0 or defined $n->{"dynamic_ref"} or defined $n->{"all_of"} or defined $n->{"any_of"}
$n->{"ref"} >= 0 or $n->{"static_dynamic_ref"} >= 0 or defined $n->{"dynamic_ref"} or defined $n->{"all_of"}
$n->{"ref"} >= 0 or $n->{"static_dynamic_ref"} >= 0 or defined $n->{"dynamic_ref"}
$n->{"ref"} >= 0 or $n->{"static_dynamic_ref"} >= 0
defined $n->{"dependencies"} and grep {defined $_->{"schema"};} @{$$n{"dependencies"};}
MC/DC100%1/1
$n->{"_has_in_place"} //= $n->{"ref"} >= 0 || $n->{"static_dynamic_ref"} >= 0 || defined $n->{"dynamic_ref"} || defined $n->{"all_of"} || defined $n->{"any_of"} || defined $n->{"one_of"} || $n->{"not_"} >= 0 || $n->{"if_"} >= 0 || defined $n->{"dependencies"} && grep({defined $_->{"schema"};} @{$$n{"dependencies"};}) ? 1 : 0
$n->{"_has_in_place"}
Truth table100%2/2
A
A= $n->{"_has_in_place"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | # Only type (a type test at the call site). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 102 | 1496 | ▶ | sub is_type_only { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
is_type_only: called CC=10 SCAR=23.2
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | 1496 | my ($n) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | return $n->{_type_only} //= ($n->{has_type} && !$n->{has_const} && !defined $n->{enum_values} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | 1496 | ▶ | && !$n->has_object_keywords && !$n->has_array_keywords && !$n->has_string_keywords | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition86%20/23
$n->{"_type_only"} //= $n->{"has_type"} && !$n->{"has_const"} && !defined($n->{"enum_values"}) && !$n->has_object_keywords && !$n->has_array_keywords && !$n->has_string_keywords && !$n->has_number_keywords && !$n->has_in_place_applicators ? 1 : 0
$n->{"has_type"} and not $n->{"has_const"} and not defined $n->{"enum_values"} and not $n->has_object_keywords and not $n->has_array_keywords and not $n->has_string_keywords and not $n->has_number_keywords and not $n->has_in_place_applicators
$n->{"has_type"} and not $n->{"has_const"} and not defined $n->{"enum_values"} and not $n->has_object_keywords and not $n->has_array_keywords and not $n->has_string_keywords and not $n->has_number_keywords
$n->{"has_type"} and not $n->{"has_const"} and not defined $n->{"enum_values"} and not $n->has_object_keywords and not $n->has_array_keywords and not $n->has_string_keywords
$n->{"has_type"} and not $n->{"has_const"} and not defined $n->{"enum_values"} and not $n->has_object_keywords and not $n->has_array_keywords
$n->{"has_type"} and not $n->{"has_const"} and not defined $n->{"enum_values"} and not $n->has_object_keywords
$n->{"has_type"} and not $n->{"has_const"} and not defined $n->{"enum_values"}
$n->{"has_type"} and not $n->{"has_const"}
MC/DC100%1/1
$n->{"_type_only"} //= $n->{"has_type"} && !$n->{"has_const"} && !defined($n->{"enum_values"}) && !$n->has_object_keywords && !$n->has_array_keywords && !$n->has_string_keywords && !$n->has_number_keywords && !$n->has_in_place_applicators ? 1 : 0
$n->{"_type_only"}
Truth table100%2/2
A
A= $n->{"_type_only"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | && !$n->has_number_keywords && !$n->has_in_place_applicators) ? 1 : 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 108 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | # Nothing but $ref. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | 184 | ▶ | sub is_pure_ref { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
is_pure_ref: called CC=18 SCAR=32.1
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | 184 | my ($n) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | return $n->{_pure_ref} //= ($n->{ref} >= 0 && !$n->{has_type} && !$n->{has_const} && !defined $n->{enum_values} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | && !$n->has_object_keywords && !$n->has_array_keywords && !$n->has_string_keywords | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | && !$n->has_number_keywords && !defined $n->{dynamic_ref} && $n->{static_dynamic_ref} < 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | && !defined $n->{all_of} && !defined $n->{any_of} && !defined $n->{one_of} && $n->{not_} < 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | 184 | ▶ | && $n->{if_} < 0 && !defined $n->{dependencies}) ? 1 : 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition70%33/47
$n->{"_pure_ref"} //= $n->{"ref"} >= 0 && !$n->{"has_type"} && !$n->{"has_const"} && !defined($n->{"enum_values"}) && !$n->has_object_keywords && !$n->has_array_keywords && !$n->has_string_keywords && !$n->has_number_keywords && !defined($n->{"dynamic_ref"}) && $n->{"static_dynamic_ref"} < 0 && !defined($n->{"all_of"}) && !defined($n->{"any_of"}) && !defined($n->{"one_of"}) && $n->{"not_"} < 0 && $n->{"if_"} < 0 && !defined($n->{"dependencies"}) ? 1 : 0
$n->{"ref"} >= 0 and not $n->{"has_type"} and not $n->{"has_const"} and not defined $n->{"enum_values"} and not $n->has_object_keywords and not $n->has_array_keywords and not $n->has_string_keywords and not $n->has_number_keywords and not defined $n->{"dynamic_ref"} and $n->{"static_dynamic_ref"} < 0 and not defined $n->{"all_of"} and not defined $n->{"any_of"} and not defined $n->{"one_of"} and $n->{"not_"} < 0 and $n->{"if_"} < 0 and not defined $n->{"dependencies"}
$n->{"ref"} >= 0 and not $n->{"has_type"} and not $n->{"has_const"} and not defined $n->{"enum_values"} and not $n->has_object_keywords and not $n->has_array_keywords and not $n->has_string_keywords and not $n->has_number_keywords and not defined $n->{"dynamic_ref"} and $n->{"static_dynamic_ref"} < 0 and not defined $n->{"all_of"} and not defined $n->{"any_of"} and not defined $n->{"one_of"} and $n->{"not_"} < 0 and $n->{"if_"} < 0
$n->{"ref"} >= 0 and not $n->{"has_type"} and not $n->{"has_const"} and not defined $n->{"enum_values"} and not $n->has_object_keywords and not $n->has_array_keywords and not $n->has_string_keywords and not $n->has_number_keywords and not defined $n->{"dynamic_ref"} and $n->{"static_dynamic_ref"} < 0 and not defined $n->{"all_of"} and not defined $n->{"any_of"} and not defined $n->{"one_of"} and $n->{"not_"} < 0
$n->{"ref"} >= 0 and not $n->{"has_type"} and not $n->{"has_const"} and not defined $n->{"enum_values"} and not $n->has_object_keywords and not $n->has_array_keywords and not $n->has_string_keywords and not $n->has_number_keywords and not defined $n->{"dynamic_ref"} and $n->{"static_dynamic_ref"} < 0 and not defined $n->{"all_of"} and not defined $n->{"any_of"} and not defined $n->{"one_of"}
$n->{"ref"} >= 0 and not $n->{"has_type"} and not $n->{"has_const"} and not defined $n->{"enum_values"} and not $n->has_object_keywords and not $n->has_array_keywords and not $n->has_string_keywords and not $n->has_number_keywords and not defined $n->{"dynamic_ref"} and $n->{"static_dynamic_ref"} < 0 and not defined $n->{"all_of"} and not defined $n->{"any_of"}
$n->{"ref"} >= 0 and not $n->{"has_type"} and not $n->{"has_const"} and not defined $n->{"enum_values"} and not $n->has_object_keywords and not $n->has_array_keywords and not $n->has_string_keywords and not $n->has_number_keywords and not defined $n->{"dynamic_ref"} and $n->{"static_dynamic_ref"} < 0 and not defined $n->{"all_of"}
$n->{"ref"} >= 0 and not $n->{"has_type"} and not $n->{"has_const"} and not defined $n->{"enum_values"} and not $n->has_object_keywords and not $n->has_array_keywords and not $n->has_string_keywords and not $n->has_number_keywords and not defined $n->{"dynamic_ref"} and $n->{"static_dynamic_ref"} < 0
$n->{"ref"} >= 0 and not $n->{"has_type"} and not $n->{"has_const"} and not defined $n->{"enum_values"} and not $n->has_object_keywords and not $n->has_array_keywords and not $n->has_string_keywords and not $n->has_number_keywords and not defined $n->{"dynamic_ref"}
$n->{"ref"} >= 0 and not $n->{"has_type"} and not $n->{"has_const"} and not defined $n->{"enum_values"} and not $n->has_object_keywords and not $n->has_array_keywords and not $n->has_string_keywords and not $n->has_number_keywords
$n->{"ref"} >= 0 and not $n->{"has_type"} and not $n->{"has_const"} and not defined $n->{"enum_values"} and not $n->has_object_keywords and not $n->has_array_keywords and not $n->has_string_keywords
$n->{"ref"} >= 0 and not $n->{"has_type"} and not $n->{"has_const"} and not defined $n->{"enum_values"} and not $n->has_object_keywords and not $n->has_array_keywords
$n->{"ref"} >= 0 and not $n->{"has_type"} and not $n->{"has_const"} and not defined $n->{"enum_values"} and not $n->has_object_keywords
$n->{"ref"} >= 0 and not $n->{"has_type"} and not $n->{"has_const"} and not defined $n->{"enum_values"}
$n->{"ref"} >= 0 and not $n->{"has_type"} and not $n->{"has_const"}
$n->{"ref"} >= 0 and not $n->{"has_type"}
MC/DC100%1/1
$n->{"_pure_ref"} //= $n->{"ref"} >= 0 && !$n->{"has_type"} && !$n->{"has_const"} && !defined($n->{"enum_values"}) && !$n->has_object_keywords && !$n->has_array_keywords && !$n->has_string_keywords && !$n->has_number_keywords && !defined($n->{"dynamic_ref"}) && $n->{"static_dynamic_ref"} < 0 && !defined($n->{"all_of"}) && !defined($n->{"any_of"}) && !defined($n->{"one_of"}) && $n->{"not_"} < 0 && $n->{"if_"} < 0 && !defined($n->{"dependencies"}) ? 1 : 0
$n->{"_pure_ref"}
Truth table100%2/2
A
A= $n->{"_pure_ref"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | # The in-place children (the instance is evaluated at the same location). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | 256 | ▶ | sub in_place_children { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
in_place_children: called CC=14 SCAR=32.2
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | 256 | my ($n, $include_not) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | 256 | my @out; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | 256 | ▶ | push @out, $n->{ref} if $n->{ref} >= 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 124 | 256 | ▶ | push @out, $n->{static_dynamic_ref} if $n->{static_dynamic_ref} >= 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | 256 | ▶ | if (my $d = $n->{dynamic_ref}) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | 0 | push @out, $d->{fallback}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 127 | 0 | push @out, map { $d->{by_resource}{$_} } sort { $a <=> $b } keys %{ $d->{by_resource} }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 129 | 256 | ▶ | push @out, @{ $n->{all_of} } if $n->{all_of}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 130 | 256 | ▶ | push @out, @{ $n->{any_of} } if $n->{any_of}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | 0 | ▶ | push @out, @{ $n->{one_of} } if $n->{one_of}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 132 | 256 | ▶ | push @out, $n->{not_} if $include_not && $n->{not_} >= 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$include_not and $n->{"not_"} >= 0
MC/DC0%0/2
$include_not and $n->{"not_"} >= 0
$include_not
$n->{"not_"} >= 0
Truth table33%1/3
A and B
A= $include_notB= $n->{"not_"} >= 0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 133 | 256 | ▶ | push @out, $n->{if_} if $n->{if_} >= 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 134 | 256 | ▶ | push @out, $n->{then} if $n->{then} >= 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 135 | 256 | ▶ | push @out, $n->{else_} if $n->{else_} >= 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 136 | 256 | ▶ | if ($n->{dependencies}) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 137 | 0 | ▶ | push @out, map { defined $_->{schema} ? $_->{schema} : () } @{ $n->{dependencies} }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 138 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 139 | 256 | return \@out; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 141 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 142 | # Every child node. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 143 | 103 | ▶ | sub children { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
children: called CC=6 SCAR=18.6
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 144 | 103 | my ($n) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 145 | 103 | my @out = @{ $n->in_place_children(1) }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 146 | 103 | ▶ | push @out, map { $n->{properties}{$_} } @{ $n->{property_order} } if $n->{properties}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 147 | 0 | ▶ | push @out, map { $_->{node} } @{ $n->{pattern_properties} } if $n->{pattern_properties}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 148 | 103 | for my $c (@$n{qw(additional_properties property_names unevaluated_properties items contains unevaluated_items)}) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 149 | 618 | ▶ | push @out, $c if $c >= 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 150 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 151 | 0 | ▶ | push @out, @{ $n->{prefix_items} } if $n->{prefix_items}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 152 | 103 | return \@out; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 153 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 154 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 155 | 4 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||