| 1 |
|
| package GraphQL::Execution; |
| 2 |
|
| |
| 3 |
15 |
▶ | use 5.014; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 4 |
15 |
▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 5 |
15 |
▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 6 |
503 |
▶ | use Types::Standard -all; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 7 |
471 |
▶ | use Types::TypeTiny -all; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 8 |
437 |
▶ | use GraphQL::Type::Library -all; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 9 |
806 |
▶ | use GraphQL::MaybeTypeCheck; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 10 |
799 |
▶ | use GraphQL::Language::Parser qw(parse); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 11 |
2174 |
▶ | use GraphQL::Error; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 12 |
2174 |
▶ | use JSON::MaybeXS; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 13 |
2173 |
▶ | use GraphQL::Debug qw(_debug); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 14 |
2157 |
▶ | use GraphQL::Introspection qw( |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 15 |
|
| $SCHEMA_META_FIELD_DEF $TYPE_META_FIELD_DEF $TYPE_NAME_META_FIELD_DEF |
| 16 |
2173 |
| ); |
| 17 |
2157 |
▶ | use GraphQL::Directive; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 18 |
783 |
▶ | use GraphQL::Schema qw(lookup_type); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 19 |
15 |
▶ | use Exporter 'import'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 20 |
15 |
▶ | use Scalar::Util qw(blessed); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 21 |
|
| |
| 22 |
|
| =head1 NAME |
| 23 |
|
| |
| 24 |
|
| GraphQL::Execution - Execute GraphQL queries |
| 25 |
|
| |
| 26 |
|
| =cut |
| 27 |
|
| |
| 28 |
|
| our @EXPORT_OK = qw( |
| 29 |
|
| execute |
| 30 |
|
| ); |
| 31 |
|
| our $VERSION = '0.02'; |
| 32 |
|
| |
| 33 |
|
| my $JSON = JSON::MaybeXS->new->allow_nonref; |
| 34 |
15 |
▶ | use constant DEBUG => $ENV{GRAPHQL_DEBUG}; # "DEBUG and" gets optimised out if false |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 35 |
|
| |
| 36 |
|
| =head1 SYNOPSIS |
| 37 |
|
| |
| 38 |
|
| use GraphQL::Execution qw(execute); |
| 39 |
|
| my $result = execute($schema, $doc, $root_value); |
| 40 |
|
| |
| 41 |
|
| =head1 DESCRIPTION |
| 42 |
|
| |
| 43 |
|
| Executes a GraphQL query, returns results. |
| 44 |
|
| |
| 45 |
|
| =head1 METHODS |
| 46 |
|
| |
| 47 |
|
| =head2 execute |
| 48 |
|
| |
| 49 |
|
| my $result = execute( |
| 50 |
|
| $schema, |
| 51 |
|
| $doc, # can also be AST |
| 52 |
|
| $root_value, |
| 53 |
|
| $context_value, |
| 54 |
|
| $variable_values, |
| 55 |
|
| $operation_name, |
| 56 |
|
| $field_resolver, |
| 57 |
|
| $promise_code, |
| 58 |
|
| ); |
| 59 |
|
| |
| 60 |
|
| =over |
| 61 |
|
| |
| 62 |
|
| =item $schema |
| 63 |
|
| |
| 64 |
|
| A L<GraphQL::Schema>. |
| 65 |
|
| |
| 66 |
|
| =item $doc |
| 67 |
|
| |
| 68 |
|
| Either a GraphQL query document to be fed in to |
| 69 |
|
| L<GraphQL::Language::Parser/parse>, or a return value from that. |
| 70 |
|
| |
| 71 |
|
| =item $root_value |
| 72 |
|
| |
| 73 |
|
| A root value that can be used by field-resolvers. The default one needs |
| 74 |
|
| a code-ref, a hash-ref or an object. |
| 75 |
|
| |
| 76 |
|
| For instance: |
| 77 |
|
| |
| 78 |
|
| my $schema = GraphQL::Schema->from_doc(<<'EOF'); |
| 79 |
|
| type Query { dateTimeNow: String, hi: String } |
| 80 |
|
| EOF |
| 81 |
|
| my $root_value = { |
| 82 |
|
| dateTimeNow => sub { DateTime->now->ymd }, |
| 83 |
|
| hi => "Bob", |
| 84 |
|
| }; |
| 85 |
|
| my $data = execute($schema, "{ dateTimeNow hi }", $root_value); |
| 86 |
|
| |
| 87 |
|
| will return: |
| 88 |
|
| |
| 89 |
|
| { |
| 90 |
|
| data => { |
| 91 |
|
| dateTimeNow => { ymd => '20190501' }, |
| 92 |
|
| hi => 'Bob', |
| 93 |
|
| } |
| 94 |
|
| } |
| 95 |
|
| |
| 96 |
|
| Be aware that with the default field-resolver, when it calls a method, |
| 97 |
|
| that method will get called with L<GraphQL::Type::Library/$args> |
| 98 |
|
| L<GraphQL::Type::Library/$context>, L<GraphQL::Type::Library/$info>. To |
| 99 |
|
| override that to pass no parameters, this is suitable as a |
| 100 |
|
| C<$field_resolver> parameters: |
| 101 |
|
| |
| 102 |
|
| sub { |
| 103 |
|
| my ($root_value, $args, $context, $info) = @_; |
| 104 |
|
| my $field_name = $info->{field_name}; |
| 105 |
|
| my $property = ref($root_value) eq 'HASH' |
| 106 |
|
| ? $root_value->{$field_name} |
| 107 |
|
| : $root_value; |
| 108 |
|
| return $property->($args, $context, $info) if ref $property eq 'CODE'; |
| 109 |
|
| return $root_value->$field_name if ref $property; # no args |
| 110 |
|
| $property; |
| 111 |
|
| } |
| 112 |
|
| |
| 113 |
|
| =item $context_value |
| 114 |
|
| |
| 115 |
|
| A per-request scalar, that will be passed to field-resolvers. |
| 116 |
|
| |
| 117 |
|
| =item $variable_values |
| 118 |
|
| |
| 119 |
|
| A hash-ref, typically the decoded JSON object supplied by a |
| 120 |
|
| client. E.g. for this query: |
| 121 |
|
| |
| 122 |
|
| query q($input: TestInputObject) { |
| 123 |
|
| fieldWithObjectInput(input: $input) |
| 124 |
|
| } |
| 125 |
|
| |
| 126 |
|
| The C<$variable_values> will need to be a JSON object with a |
| 127 |
|
| key C<input>, whose value will need to conform to the L<input |
| 128 |
|
| type|GraphQL::Type::InputObject> C<TestInputObject>. |
| 129 |
|
| |
| 130 |
|
| The purpose of this is to avoid needing to hard-code input values in |
| 131 |
|
| your query. This aids in, among other things, being able to whitelist |
| 132 |
|
| individual queries as acceptable, non-abusive queries to your system; |
| 133 |
|
| and being able to generate client-side code for client-side validation |
| 134 |
|
| rather than including the full GraphQL system in client code. |
| 135 |
|
| |
| 136 |
|
| =item $operation_name |
| 137 |
|
| |
| 138 |
|
| A string (or C<undef>) that if given will be the name of one of the |
| 139 |
|
| operations in the query. |
| 140 |
|
| |
| 141 |
|
| =item $field_resolver |
| 142 |
|
| |
| 143 |
|
| A code-ref to be used instead of the default field-resolver. |
| 144 |
|
| |
| 145 |
|
| =item $promise_code |
| 146 |
|
| |
| 147 |
|
| If you need to return a promise, supply a hash-ref matching |
| 148 |
|
| L<GraphQL::Type::Library/PromiseCode>. |
| 149 |
|
| |
| 150 |
|
| =back |
| 151 |
|
| |
| 152 |
|
| =cut |
| 153 |
|
| |
| 154 |
219 |
▶ | fun execute( |
|
Subroutine
execute: called CC=21 SCAR=30.7
Pod
documented
|
| 155 |
|
| (InstanceOf['GraphQL::Schema']) $schema, |
| 156 |
|
| Str | ArrayRef[HashRef] $doc, |
| 157 |
|
| Any $root_value = undef, |
| 158 |
|
| Any $context_value = undef, |
| 159 |
|
| Maybe[HashRef] $variable_values = undef, |
| 160 |
|
| Maybe[Str] $operation_name = undef, |
| 161 |
|
| Maybe[CodeLike] $field_resolver = undef, |
| 162 |
|
| Maybe[PromiseCode] $promise_code = undef, |
| 163 |
219 |
▶ | ) :ReturnType(ExecutionResult | Promise) { |
Branch: 8 branches
| Branch | True | False | Total |
| @_ < 2 and Function::Parameters::_croak('Too few arguments for fun execute (expected 2, got ' . @_ . ')') |
77 |
630 |
707 |
| @_ > 8 and Function::Parameters::_croak('Too many arguments for fun execute (expected 8, got ' . @_ . ')') |
53 |
652 |
705 |
| Type::Tiny::XS::AUTO::TC28($schema) or Function::Parameters::_croak('In fun execute: parameter 1 ($schema): ' . ${my $v = bless( {"class" => "GraphQL::Schema","coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 985,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "InstanceOf[\"GraphQL::Schema\"]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","name" => "__ANON__","type_constraints" => [bless( {"class" => "Moo::Object","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_blessed_ref($_[0]) or _failed_check(24, 'Object', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Object","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; builtin::blessed($_);},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 578,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Object","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_blessed_ref($_[1])" : &$maybe_load_modules('Scalar::Util', "Scalar::Util::blessed($_[1])");},"is_object" => 1,"library" => "Types::Standard","name" => "Object","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"uniq" => 24}, 'Type::Tiny' ),"uniq" => 184}, 'Type::Tiny::Class' ),bless( {"class" => "GraphQL::MaybeTypeCheck","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","uniq" => 185}, 'Type::Tiny::Class' )],"uniq" => 186,"xs_sub" => "Type::Tiny::XS::AUTO::TC12"}, 'Type::Tiny::Intersection' ),"uniq" => 150}, 'Type::Tiny::Class' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($schema)) |
222 |
6 |
228 |
| Type::Tiny::XS::AUTO::TC29($doc) or Function::Parameters::_croak('In fun execute: parameter 2 ($doc): ' . ${my $v = bless( {"compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/x86_64-linux/Function/Parameters.pm","line" => 155,"package" => "Function::Parameters"},"deprecated" => !!0,"name" => "__ANON__","type_constraints" => [bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Str","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref \$_ eq 'SCALAR' or ref \(my $val = $_) eq 'SCALAR';},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 291,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Str","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; use warnings; use strict; $Type::Tiny::AvoidCallbacks ? goto $orig_inlined : "$xsubname($_[1])";},"library" => "Types::Standard","name" => "Str","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and not ref $_[0] or _failed_check(8, 'Value', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Value","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; not ref $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 276,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Value","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1]) and not ref($_[1])";},"library" => "Types::Standard","name" => "Value","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 8}, 'Type::Tiny' ),"sorter" => sub { package Types::Standard; no warnings; use strict; $_[0] cmp $_[1];},"type_default" => sub { package Types::Standard; no warnings; use strict; return '';},"uniq" => 9}, 'Type::Tiny' ),bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 92,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "ArrayRef[HashRef]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}';},"name" => "__ANON__","parameters" => [bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => {},"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' )],"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_arrayref($_[0]) or _failed_check(21, 'ArrayRef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_ArrayRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, @new) = ($_, 0);'; push @code, 'for (@$orig) {'; push @code, sprintf('++$return_orig && last unless (%s);', $coercable_item->inline_check('$_')); push @code, sprintf('push @new, (%s);', $param->coercion->inline_coercion('$_')); push @code, '}'; push @code, '$return_orig ? $orig : \\@new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my @new; foreach my $item (@$value) { return $value unless $coercable_item->check($item); push @new, $param->coerce($item); } return \@new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'ARRAY';},"constraint_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; return &Types::Standard::ArrayRef() unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'ArrayRef', \@_, 3); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to ArrayRef[`a] expected to be a type constraint; got $param"; my($min, $max) = (0, -1); $min = Types::Standard::assert_Int(shift()) if @_; $max = Types::Standard::assert_Int(shift()) if @_; my $param_compiled_check = $param->compiled_check; my $xsub; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("ArrayRef[$paramname]") if $paramname; } elsif (&Type::Tiny::_USE_MOUSE() and $param->_has_xsub and $min == 0 and $max == -1) { require Mouse::Util::TypeConstraints; my $maker = 'Mouse::Util::TypeConstraints'->can('_parameterize_ArrayRef_for'); $xsub = &$maker($param) if $maker; } return sub { my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0; } , $xsub if $min == 0 and $max == -1; return sub { my $array = shift(); return if @$array < $min; ($param->check($_) or return) foreach (@$array); return !0; } if $max == -1; return sub { my $array = shift(); return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } if $min == 0; return sub { my $array = shift(); return if @$array < $min; return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } ;},"deep_explanation" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; my($min, $max) = (0, -1); $min = $type->parameters->[1] if @{$type->parameters;} > 1; $max = $type->parameters->[2] if @{$type->parameters;} > 2; if ($min != 0 and @$value < $min) { return [sprintf('"%s" constrains array length at least %s', $type, $min), sprintf('@{%s} is %d', $varname, scalar @$value)]; } if ($max > 0 and @$value > $max) { return [sprintf('"%s" constrains array length at most %d', $type, $max), sprintf('@{%s} is %d', $varname, scalar @$value)]; } foreach my $i (0 .. $value->$#*) { my $item = $value->[$i]; next if $param->check($item); return [sprintf('"%s" constrains each value in the array with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->[%d]', $varname, $i));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 523,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "ArrayRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $param = shift(); my($min, $max) = (0, -1); $min = shift() if @_; $max = shift() if @_; my $param_compiled_check = $param->compiled_check; my $xsubname; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("ArrayRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_arrayref($_[1])" : "ref($_[1]) eq 'ARRAY'";},"library" => "Types::Standard","name" => "ArrayRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return [];},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 21}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 44}, 'Type::Tiny' )],"uniq" => 151,"xs_sub" => "Type::Tiny::XS::AUTO::TC29"}, 'Type::Tiny::Union' );$v->{"type_constraints"}[0]{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0];$v->{"type_constraints"}[0]{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0]{"parent"};$v->{"type_constraints"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"type_constraints"}[0]{"parent"}{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"type_constraints"}[1]{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[1];$v->{"type_constraints"}[1]{"compiled_type_constraint"} = $v->{"type_constraints"}[1]{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[1]{"parameters"}[0]{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[1]{"parameters"}[0];$v->{"type_constraints"}[1]{"parameters"}[0]{"compiled_type_constraint"} = $v->{"type_constraints"}[1]{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[1]{"parameters"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[1]{"parameters"}[0]{"parent"};$v->{"type_constraints"}[1]{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"type_constraints"}[1]{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[1]{"parameters"}[0]{"parent"}{"parent"} = $v->{"type_constraints"}[0]{"parent"}{"parent"};$v->{"type_constraints"}[1]{"parent"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[1]{"parent"};$v->{"type_constraints"}[1]{"parent"}{"compiled_type_constraint"} = $v->{"type_constraints"}[1]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[1]{"parent"}{"parent"} = $v->{"type_constraints"}[1]{"parameters"}[0]{"parent"};$v->{"type_constraints"}[1]{"type_default"} = $v->{"type_constraints"}[1]{"parent"}{"type_default"}; \$v}->get_message($doc)) |
224 |
2163 |
2387 |
| Type::Tiny::XS::AUTO::TC2($variable_values) or Function::Parameters::_croak('In fun execute: parameter 5 ($variable_values): ' . ${my $v = bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; my $value = shift(); return !0 unless defined $value; return $param->check($value);},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 338,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "Maybe[HashRef]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $param_check = $param->inline_check($v); "!defined($v) or $param_check";},"name" => "__ANON__","parameters" => [bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' )],"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Maybe","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; return $param->coercion;},"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Maybe') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Maybe', \@_, 1); my $param = Types::TypeTiny::to_TypeTiny(shift()); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to Maybe[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my @xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); push @xsub, Type::Tiny::XS::get_coderef_for("Maybe[$paramname]") if $paramname }; return sub { my $value = shift(); return !0 unless defined $value; return $param->check($value); } , @xsub;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return [sprintf('%s is defined', Type::Tiny::_dd($value)), sprintf('"%s" constrains the value with "%s" if it is defined', $type, $param), @{$param->validate_explain($value, $varname);}];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 657,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Maybe","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $param = shift(); my $param_compiled_check = $param->compiled_check; my $xsubname; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("Maybe[$paramname]") }; return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $param_check = $param->inline_check($v); "!defined($v) or $param_check"; } ;},"library" => "Types::Standard","name" => "Maybe","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; $_[0]->type_default or $Type::Tiny::parameterize_type->type_default;},"uniq" => 25}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 69}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"coercion"}{"type_constraint"} = $v->{"parameters"}[0];$v->{"parameters"}[0]{"compiled_type_constraint"} = $v->{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"};$v->{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"type_default"} = $v->{"parameters"}[0]{"type_default"}; \$v}->get_message($variable_values)) |
338 |
657 |
995 |
| Type::Tiny::XS::AUTO::TC15($operation_name) or Function::Parameters::_croak('In fun execute: parameter 6 ($operation_name): ' . ${my $v = bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; my $value = shift(); return !0 unless defined $value; return $param->check($value);},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/x86_64-linux/Function/Parameters.pm","line" => 98,"package" => "Function::Parameters"},"deprecated" => !!0,"display_name" => "Maybe[Str]","inlined" => sub { package Types::Standard; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $param_check = $param->inline_check($v); "!defined($v) or $param_check";},"name" => "__ANON__","parameters" => [bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Str","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref \$_ eq 'SCALAR' or ref \(my $val = $_) eq 'SCALAR';},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 291,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Str","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; use warnings; use strict; $Type::Tiny::AvoidCallbacks ? goto $orig_inlined : "$xsubname($_[1])";},"library" => "Types::Standard","name" => "Str","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and not ref $_[0] or _failed_check(8, 'Value', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Value","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; not ref $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 276,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Value","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1]) and not ref($_[1])";},"library" => "Types::Standard","name" => "Value","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 8}, 'Type::Tiny' ),"sorter" => sub { package Types::Standard; no warnings; use strict; $_[0] cmp $_[1];},"type_default" => sub { package Types::Standard; no warnings; use strict; return '';},"uniq" => 9}, 'Type::Tiny' )],"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Maybe","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; return $param->coercion;},"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Maybe') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Maybe', \@_, 1); my $param = Types::TypeTiny::to_TypeTiny(shift()); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to Maybe[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my @xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); push @xsub, Type::Tiny::XS::get_coderef_for("Maybe[$paramname]") if $paramname }; return sub { my $value = shift(); return !0 unless defined $value; return $param->check($value); } , @xsub;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return [sprintf('%s is defined', Type::Tiny::_dd($value)), sprintf('"%s" constrains the value with "%s" if it is defined', $type, $param), @{$param->validate_explain($value, $varname);}];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 657,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Maybe","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $param = shift(); my $param_compiled_check = $param->compiled_check; my $xsubname; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("Maybe[$paramname]") }; return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $param_check = $param->inline_check($v); "!defined($v) or $param_check"; } ;},"library" => "Types::Standard","name" => "Maybe","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; $_[0]->type_default or $Type::Tiny::parameterize_type->type_default;},"uniq" => 25}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 116}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"coercion"}{"type_constraint"} = $v->{"parameters"}[0];$v->{"parameters"}[0]{"compiled_type_constraint"} = $v->{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"};$v->{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"type_default"} = $v->{"parameters"}[0]{"type_default"}; \$v}->get_message($operation_name)) |
219 |
2 |
221 |
| Type::Tiny::XS::AUTO::TC8($field_resolver) or Function::Parameters::_croak('In fun execute: parameter 7 ($field_resolver): ' . ${my $v = bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; my $value = shift(); return !0 unless defined $value; return $param->check($value);},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/x86_64-linux/Function/Parameters.pm","line" => 98,"package" => "Function::Parameters"},"deprecated" => !!0,"display_name" => "Maybe[CodeLike]","inlined" => sub { package Types::Standard; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $param_check = $param->inline_check($v); "!defined($v) or $param_check";},"name" => "__ANON__","parameters" => [bless( {"_default_message" => sub { package Type::Tiny; use warnings; use strict; sprintf '%s did not pass type constraint "%s"', _dd($_[0]), $name;},"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"compiled_type_constraint" => sub ;,"constraint" => sub { package Types::TypeTiny; use warnings; use strict; ref $_ eq 'CODE' or builtin::blessed($_) and _check_overload($_, '&{}');},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/TypeTiny.pm","line" => 432,"package" => "Types::TypeTiny"},"deprecated" => !!0,"display_name" => "CodeLike","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::TypeTiny; use warnings; use strict; $Type::Tiny::AvoidCallbacks || !$xsubname ? goto $inlined : "$xsubname($_[1])";},"is_using_default_message" => 1,"library" => "Types::TypeTiny","name" => "CodeLike","type_default" => sub { package Types::TypeTiny; use warnings; use strict; return sub { } ;},"uniq" => 94}, 'Type::Tiny' )],"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Maybe","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; return $param->coercion;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Maybe') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Maybe', \@_, 1); my $param = Types::TypeTiny::to_TypeTiny(shift()); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to Maybe[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my @xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); push @xsub, Type::Tiny::XS::get_coderef_for("Maybe[$paramname]") if $paramname }; return sub { my $value = shift(); return !0 unless defined $value; return $param->check($value); } , @xsub;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return [sprintf('%s is defined', Type::Tiny::_dd($value)), sprintf('"%s" constrains the value with "%s" if it is defined', $type, $param), @{$param->validate_explain($value, $varname);}];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 657,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Maybe","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $param = shift(); my $param_compiled_check = $param->compiled_check; my $xsubname; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("Maybe[$paramname]") }; return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $param_check = $param->inline_check($v); "!defined($v) or $param_check"; } ;},"library" => "Types::Standard","name" => "Maybe","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; $_[0]->type_default or $Type::Tiny::parameterize_type->type_default;},"uniq" => 25}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 100}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"constraint"};$v->{"type_default"} = $v->{"parameters"}[0]{"type_default"}; \$v}->get_message($field_resolver)) |
218 |
0 |
218 |
| do {
package Type::Tiny;
not defined $promise_code or do {
Ref::Util::XS::is_plain_hashref($promise_code) and not grep((!/\A(?:resolve|all|reject|new)\z/u), keys %{$promise_code;}) and exists $promise_code->{"resolve"} and do {
Type::Tiny::XS::CodeLike($promise_code->{"resolve"})
} and exists $promise_code->{"all"} and do {
Type::Tiny::XS::CodeLike($promise_code->{"all"})
} and exists $promise_code->{"reject"} and do {
Type::Tiny::XS::CodeLike($promise_code->{"reject"})
} and !exists $promise_code->{"new"} || do {
Type::Tiny::XS::CodeLike($promise_code->{"new"})
}
}
} or Function::Parameters::_croak('In fun execute: parameter 8 ($promise_code): ' . ${my $v = bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ($) { package Eval::TypeTiny::Sandbox; use strict; do { package Type::Tiny; not defined $_[0] or do { Ref::Util::XS::is_plain_hashref($_[0]) and not grep((!/\A(?:resolve|all|reject|new)\z/), keys %{$_[0];}) and exists $_[0]{'resolve'} and do { Type::Tiny::XS::CodeLike($_[0]{'resolve'}) } and exists $_[0]{'all'} and do { Type::Tiny::XS::CodeLike($_[0]{'all'}) } and exists $_[0]{'reject'} and do { Type::Tiny::XS::CodeLike($_[0]{'reject'}) } and !exists $_[0]{'new'} || do { Type::Tiny::XS::CodeLike($_[0]{'new'}) } } };},"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; my $value = shift(); return !0 unless defined $value; return $param->check($value);},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/x86_64-linux/Function/Parameters.pm","line" => 98,"package" => "Function::Parameters"},"deprecated" => !!0,"display_name" => "Maybe[PromiseCode]","inlined" => sub { package Types::Standard; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $param_check = $param->inline_check($v); "!defined($v) or $param_check";},"name" => "__ANON__","parameters" => [bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; do { Ref::Util::XS::is_plain_hashref($_[0]) and not grep((!/\A(?:resolve|all|reject|new)\z/), keys %{$_[0];}) and exists $_[0]{'resolve'} and do { Type::Tiny::XS::CodeLike($_[0]{'resolve'}) } and exists $_[0]{'all'} and do { Type::Tiny::XS::CodeLike($_[0]{'all'}) } and exists $_[0]{'reject'} and do { Type::Tiny::XS::CodeLike($_[0]{'reject'}) } and !exists $_[0]{'new'} || do { Type::Tiny::XS::CodeLike($_[0]{'new'}) } } or _failed_check(97, 'PromiseCode', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"compiled_type_constraint" => sub ($) { package Eval::TypeTiny::Sandbox; use strict; do { package Type::Tiny; Ref::Util::XS::is_plain_hashref($_[0]) and not grep((!/\A(?:resolve|all|reject|new)\z/), keys %{$_[0];}) and exists $_[0]{'resolve'} and do { Type::Tiny::XS::CodeLike($_[0]{'resolve'}) } and exists $_[0]{'all'} and do { Type::Tiny::XS::CodeLike($_[0]{'all'}) } and exists $_[0]{'reject'} and do { Type::Tiny::XS::CodeLike($_[0]{'reject'}) } and !exists $_[0]{'new'} || do { Type::Tiny::XS::CodeLike($_[0]{'new'}) } };},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 438,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "PromiseCode","exception_class" => "Error::TypeTiny::Assertion","library" => "GraphQL::Type::Library","name" => "PromiseCode","parent" => bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard::Dict; no warnings; use strict; my $value = $_[0]; if ($slurpy) { my(%tmp) = map((exists $constraints{$_} ? () : ($_, $value->{$_})), keys %$value); return unless $slurpy->check(\%tmp); } else { (exists $constraints{$_} or return) foreach (sort keys %$value); } foreach my $k (@keys) { exists $value->{$k} or $is_optional{$k} ? next : (return); $constraints{$k}->check($value->{$k}) or return; } return !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 438,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "Dict[all=>CodeLike,new=>Optional[CodeLike],reject=>CodeLike,resolve=>CodeLike]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard::Dict; no warnings; use strict; require B; my $h = $_[1]; join ' and ', &Types::Standard::HashRef()->inline_check($h), $slurpy_is_any ? () : $slurpy_is_map ? do { '(not grep {' . "my \$v = ($h)->{\$_};" . sprintf('not((/\\A(?:%s)\\z/) or ((%s) and (%s)))', $regexp, $slurpy_is_map->[0]->inline_check('$_'), $slurpy_is_map->[1]->inline_check('$v')) . "} keys %{$h})" } : ($slurpy ? do { 'do {' . "my \$slurpy_tmp = +{ map /\\A(?:$regexp)\\z/ ? () : (\$_ => ($h)->{\$_}), keys %{$h} };" . $slurpy->inline_check('$slurpy_tmp') . '}' } : "not(grep !/\\A(?:$regexp)\\z/, keys %{$h})"), map({my $k = B::perlstring($_); $constraints{$_}->is_strictly_a_type_of($_optional) ? sprintf('(!exists %s->{%s} or %s)', $h, $k, $constraints{$_}->inline_check("$h->{$k}")) : ("exists($h->{$k})", $constraints{$_}->inline_check("$h->{$k}"));} @keys);},"name" => "__ANON__","parameters" => ["resolve",bless( {"_default_message" => sub { package Type::Tiny; use warnings; use strict; sprintf '%s did not pass type constraint "%s"', _dd($_[0]), $name;},"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"compiled_type_constraint" => sub ;,"constraint" => sub { package Types::TypeTiny; use warnings; use strict; ref $_ eq 'CODE' or builtin::blessed($_) and _check_overload($_, '&{}');},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/TypeTiny.pm","line" => 432,"package" => "Types::TypeTiny"},"deprecated" => !!0,"display_name" => "CodeLike","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::TypeTiny; use warnings; use strict; $Type::Tiny::AvoidCallbacks || !$xsubname ? goto $inlined : "$xsubname($_[1])";},"is_using_default_message" => 1,"library" => "Types::TypeTiny","name" => "CodeLike","type_default" => sub { package Types::TypeTiny; use warnings; use strict; return sub { } ;},"uniq" => 94}, 'Type::Tiny' ),"all",{},"reject",{},"new",bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"constraint" => sub { package Types::Standard; no warnings; use strict; $param->check($_[0]);},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 438,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "Optional[CodeLike]","inlined" => sub { package Types::Standard; no warnings; use strict; my $v = $_[1]; $param->inline_check($v);},"name" => "__ANON__","parameters" => [{}],"parent" => bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Optional","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; return $param->coercion;},"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Optional') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Optional', \@_, 1); my $param = Types::TypeTiny::to_TypeTiny(shift()); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to Optional[`a] expected to be a type constraint; got $param"; sub { $param->check($_[0]); } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return [sprintf('%s exists', $varname), sprintf('"%s" constrains %s with "%s" if it exists', $type, $varname, $param), @{$param->validate_explain($value, $varname);}];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 719,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Optional","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $param = shift(); return unless $param->can_be_inlined; return sub { my $v = $_[1]; $param->inline_check($v); } ;},"library" => "Types::Standard","name" => "Optional","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $_[0]->type_default;},"uniq" => 27}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 95}, 'Type::Tiny' )],"parent" => bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_hashref($_[0]) or _failed_check(31, 'Dict', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Dict","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::Dict; no warnings; use strict; my $slurpy = @_ && Types::TypeTiny::is_TypeTiny($_[-1]) && $_[-1]->is_strictly_a_type_of($_Slurpy) ? (pop())->my_unslurpy : undef; my($parent, $child, %dict) = @_; my $C = 'Type::Coercion'->new('type_constraint', $child); my $all_inlinable = 1; my $child_coercions_exist = 0; foreach my $tc (values %dict) { $all_inlinable = 0 unless $tc->can_be_inlined; $all_inlinable = 0 if $tc->has_coercion and not $tc->coercion->can_be_inlined; ++$child_coercions_exist if $tc->has_coercion; } $all_inlinable = 0 if $slurpy and not $slurpy->can_be_inlined; $all_inlinable = 0 if $slurpy and $slurpy->has_coercion and not $slurpy->coercion->can_be_inlined; ++$child_coercions_exist if $slurpy and $slurpy->has_coercion; return unless $child_coercions_exist; if ($all_inlinable) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { require B; my $keycheck = join('|', map(quotemeta($_), (sort {length $b <=> length $a or $a cmp $b;} keys %dict))); $keycheck = ($KEYCHECK[++$keycheck_counter] = qr/^($keycheck)$/ms); my $label = sprintf('DICTLABEL%d', ++$label_counter); my @code; push @code, 'do { my ($orig, $return_orig, $tmp, %new) = ($_, 0);'; push @code, "${label}: {"; if ($slurpy) { push @code, sprintf('my $slurped = +{ map +($_=~$%s::KEYCHECK[%d])?():($_=>$orig->{$_}), keys %%$orig };', __PACKAGE__, $keycheck_counter); if ($slurpy->has_coercion) { push @code, sprintf('my $coerced = %s;', $slurpy->coercion->inline_coercion('$slurped')); push @code, sprintf('((%s)&&(%s))?(%%new=%%$coerced):(($return_orig = 1), last %s);', $_hash->inline_check('$coerced'), $slurpy->inline_check('$coerced'), $label); } else { push @code, sprintf('(%s)?(%%new=%%$slurped):(($return_orig = 1), last %s);', $slurpy->inline_check('$slurped'), $label); } } else { push @code, sprintf('($_ =~ $%s::KEYCHECK[%d])||(($return_orig = 1), last %s) for sort keys %%$orig;', __PACKAGE__, $keycheck_counter, $label); } foreach my $k (keys %dict) { my $ct = $dict{$k}; my $ct_coerce = $ct->has_coercion; my $ct_optional = $ct->is_a_type_of($_optional); my $K = B::perlstring($k); push @code, sprintf('if (exists $orig->{%s}) { $tmp = %s; (%s) ? ($new{%s}=$tmp) : (($return_orig=1), last %s) }', $K, $ct_coerce ? $ct->coercion->inline_coercion("\$orig->{$K}") : "\$orig->{$K}", $ct->inline_check('$tmp'), $K, $label); } push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { my(%is_optional) = map({$_, !!$dict{$_}->is_strictly_a_type_of($_optional);} sort(keys %dict)); $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; if ($slurpy) { my(%slurped) = map((exists $dict{$_} ? () : ($_, $value->{$_})), keys %$value); if ($slurpy->check(\%slurped)) { %new = %slurped; } elsif ($slurpy->has_coercion) { my $coerced = $slurpy->coerce(\%slurped); $slurpy->check($coerced) ? %new = %$coerced : (return $value); } else { return $value; } } else { foreach my $k (keys %$value) { return $value unless exists $dict{$k}; } } foreach my $k (keys %dict) { next if $is_optional{$k} and not exists $value->{$k}; my $ct = $dict{$k}; my $x = $ct->has_coercion ? $ct->coerce($value->{$k}) : $value->{$k}; return $value unless $ct->check($x); $new{$k} = $x; } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"constraint_generator" => sub { package Types::Standard::Dict; no warnings; use strict; my $slurpy = @_ && Types::TypeTiny::is_TypeTiny($_[-1]) && $_[-1]->is_strictly_a_type_of($_Slurpy) ? (pop())->my_unslurpy : undef; my $iterator = pair_iterator(@_); my(%constraints, %is_optional); my @keys; while (my($k, $v) = &$iterator()) { do { $constraints{$k} = $v; Types::TypeTiny::is_TypeTiny($v) or _croak "Parameter for Dict[...] with key '${k}' expected to be a type constraint; got $v"; Types::TypeTiny::is_StringLike($k) or _croak "Key for Dict[...] expected to be string; got $k"; push @keys, $k; $is_optional{$k} = !!$constraints{$k}->is_strictly_a_type_of($_optional) }; } return sub { my $value = $_[0]; if ($slurpy) { my(%tmp) = map((exists $constraints{$_} ? () : ($_, $value->{$_})), keys %$value); return unless $slurpy->check(\%tmp); } else { (exists $constraints{$_} or return) foreach (sort keys %$value); } foreach my $k (@keys) { exists $value->{$k} or $is_optional{$k} ? next : (return); $constraints{$k}->check($value->{$k}) or return; } return !0; } ;},"deep_explanation" => sub { package Types::Standard::Dict; no warnings; use strict; require B; my($type, $value, $varname) = @_; my(@params) = @{$type->parameters;}; my $slurpy = @params && Types::TypeTiny::is_TypeTiny($params[-1]) && $params[-1]->is_strictly_a_type_of($_Slurpy) ? pop(@params)->my_unslurpy : undef; my $iterator = pair_iterator(@params); my(%constraints, @keys); while (my($k, $c) = &$iterator()) { do { push @keys, $k; $constraints{$k} = $c }; } foreach my $k (@keys) { next if $constraints{$k}->has_parent and $constraints{$k}->parent == &Types::Standard::Optional() and not exists $value->{$k}; next if $constraints{$k}->check($value->{$k}); return [sprintf('"%s" requires key %s to appear in hash', $type, B::perlstring($k))] unless exists $value->{$k}; return [sprintf('"%s" constrains value at key %s of hash with "%s"', $type, B::perlstring($k), $constraints{$k}), @{$constraints{$k}->validate_explain($value->{$k}, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } if ($slurpy) { my(%tmp) = map({exists $constraints{$_} ? () : ($_, $value->{$_});} keys %$value); my $explain = $slurpy->validate_explain(\%tmp, '$slurpy'); return [sprintf('"%s" requires the hashref of additional key/value pairs to conform to "%s"', $type, $slurpy), @$explain] if $explain; } else { foreach my $k (sort keys %$value) { return [sprintf('"%s" does not allow key %s to appear in hash', $type, B::perlstring($k))] unless exists $constraints{$k}; } } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 842,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Dict","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::Dict; no warnings; use strict; my $slurpy = @_ && Types::TypeTiny::is_TypeTiny($_[-1]) && $_[-1]->is_strictly_a_type_of($_Slurpy) ? (pop())->my_unslurpy : undef; return if $slurpy and not $slurpy->can_be_inlined; my $slurpy_is_any = $slurpy && $_hash->is_a_type_of($slurpy); my $slurpy_is_map = $slurpy && $slurpy->is_parameterized && ($slurpy->parent->strictly_equals($_map) && $slurpy->parameters || $slurpy->parent->strictly_equals($_hash) && [$_any, $slurpy->parameters->[0]]); my $iterator = pair_iterator(@_); my(%constraints, @keys); while (my($k, $c) = &$iterator()) { do { return unless $c->can_be_inlined; $constraints{$k} = $c; push @keys, $k }; } my $regexp = join('|', map(quotemeta($_), @keys)); return sub { require B; my $h = $_[1]; join ' and ', &Types::Standard::HashRef()->inline_check($h), $slurpy_is_any ? () : $slurpy_is_map ? do { '(not grep {' . "my \$v = ($h)->{\$_};" . sprintf('not((/\\A(?:%s)\\z/) or ((%s) and (%s)))', $regexp, $slurpy_is_map->[0]->inline_check('$_'), $slurpy_is_map->[1]->inline_check('$v')) . "} keys %{$h})" } : ($slurpy ? do { 'do {' . "my \$slurpy_tmp = +{ map /\\A(?:$regexp)\\z/ ? () : (\$_ => ($h)->{\$_}), keys %{$h} };" . $slurpy->inline_check('$slurpy_tmp') . '}' } : "not(grep !/\\A(?:$regexp)\\z/, keys %{$h})"), map({my $k = B::perlstring($_); $constraints{$_}->is_strictly_a_type_of($_optional) ? sprintf('(!exists %s->{%s} or %s)', $h, $k, $constraints{$_}->inline_check("$h->{$k}")) : ("exists($h->{$k})", $constraints{$_}->inline_check("$h->{$k}"));} @keys); } ;},"library" => "Types::Standard","my_methods" => {"dict_is_slurpy" => sub { package Types::Standard::Dict; no warnings; use strict; my $self = shift(); return !1 if $self == &Types::Standard::Dict(); my $dict = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::Dict(); } ); my $slurpy = @{$dict->parameters;} && Types::TypeTiny::is_TypeTiny($dict->parameters->[-1]) && $dict->parameters->[-1]->is_strictly_a_type_of($_Slurpy) ? $dict->parameters->[-1] : undef;},"hashref_allows_key" => sub { package Types::Standard::Dict; no warnings; use strict; my $self = shift(); my($key) = @_; return Types::Standard::is_Str($key) if $self == &Types::Standard::Dict(); my $dict = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::Dict(); } ); my %params; my $slurpy = $dict->my_dict_is_slurpy; if ($slurpy) { my(@args) = @{$dict->parameters;}; pop @args; %params = @args; $slurpy = $slurpy->my_unslurpy; } else { %params = @{$dict->parameters;}; } return !0 if exists $params{$key}; return !1 unless $slurpy; return Types::Standard::is_Str($key) if $slurpy == &Types::Standard::Any() or $slurpy == &Types::Standard::Item() or $slurpy == &Types::Standard::Defined() or $slurpy == &Types::Standard::Ref(); return $slurpy->my_hashref_allows_key($key) if $slurpy->is_a_type_of(&Types::Standard::HashRef()); return !1;},"hashref_allows_value" => sub { package Types::Standard::Dict; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::Dict(); my $dict = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::Dict(); } ); my %params; my $slurpy = $dict->my_dict_is_slurpy; if ($slurpy) { my(@args) = @{$dict->parameters;}; pop @args; %params = @args; $slurpy = $slurpy->my_unslurpy; } else { %params = @{$dict->parameters;}; } return !0 if exists $params{$key} and $params{$key}->check($value); return !1 unless $slurpy; return !0 if $slurpy == &Types::Standard::Any() or $slurpy == &Types::Standard::Item() or $slurpy == &Types::Standard::Defined() or $slurpy == &Types::Standard::Ref(); return $slurpy->my_hashref_allows_value($key, $value) if $slurpy->is_a_type_of(&Types::Standard::HashRef()); return !1;}},"name" => "Dict","name_generator" => sub { package Types::Standard; no warnings; use strict; my($s, @p) = @_; my $l = @p && Types::TypeTiny::is_TypeTiny($p[-1]) && $p[-1]->is_strictly_a_type_of(Slurpy) ? pop @p : undef; my(%a) = @p; sprintf '%s[%s%s]', $s, join(',', map((sprintf('%s=>%s', $_, $a{$_})), sort(keys %a))), $l ? ",$l" : '';},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' ),"uniq" => 31}, 'Type::Tiny' ),"uniq" => 96}, 'Type::Tiny' ),"uniq" => 97}, 'Type::Tiny' )],"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Maybe","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; return $param->coercion;},"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Maybe') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Maybe', \@_, 1); my $param = Types::TypeTiny::to_TypeTiny(shift()); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to Maybe[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my @xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); push @xsub, Type::Tiny::XS::get_coderef_for("Maybe[$paramname]") if $paramname }; return sub { my $value = shift(); return !0 unless defined $value; return $param->check($value); } , @xsub;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return [sprintf('%s is defined', Type::Tiny::_dd($value)), sprintf('"%s" constrains the value with "%s" if it is defined', $type, $param), @{$param->validate_explain($value, $varname);}];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 657,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Maybe","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $param = shift(); my $param_compiled_check = $param->compiled_check; my $xsubname; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("Maybe[$paramname]") }; return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $param_check = $param->inline_check($v); "!defined($v) or $param_check"; } ;},"library" => "Types::Standard","name" => "Maybe","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; $_[0]->type_default or $Type::Tiny::parameterize_type->type_default;},"uniq" => 25}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 152}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"compiled_type_constraint"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3] = $v->{"parameters"}[0]{"parent"}{"parameters"}[1];$v->{"parameters"}[0]{"parent"}{"parameters"}[5] = $v->{"parameters"}[0]{"parent"}{"parameters"}[1];$v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parameters"}[0] = $v->{"parameters"}[0]{"parent"}{"parameters"}[1];$v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"constraint"} = $v->{"parameters"}[0]{"constraint"};$v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"constraint"};$v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"constraint"};$v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"type_default"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"type_default"};$v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"constraint"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"parent"};$v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"constraint"} = $v->{"parameters"}[0]{"constraint"};$v->{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"parent"};$v->{"type_default"} = $v->{"parent"}{"type_default"}; \$v}->get_message($promise_code)) |
218 |
0 |
218 |
|
| 164 |
259 |
| my $context = eval { |
| 165 |
259 |
▶ | my $ast = ref($doc) ? $doc : parse($doc); |
Branch: 1 branch
| Branch | True | False | Total |
| ref $doc ? : |
0 |
259 |
259 |
|
| 166 |
259 |
| _build_context( |
| 167 |
|
| $schema, |
| 168 |
|
| $ast, |
| 169 |
|
| $root_value, |
| 170 |
|
| $context_value, |
| 171 |
|
| $variable_values, |
| 172 |
|
| $operation_name, |
| 173 |
|
| $field_resolver, |
| 174 |
|
| $promise_code, |
| 175 |
|
| ); |
| 176 |
|
| }; |
| 177 |
259 |
| DEBUG and _debug('execute', $context, $@); |
| 178 |
259 |
▶ | return _build_response(_wrap_error($@)) if $@; |
Branch: 1 branch
| Branch | True | False | Total |
| if $@ |
0 |
259 |
259 |
|
| 179 |
|
| my $result = _execute_operation( |
| 180 |
|
| $context, |
| 181 |
|
| $context->{operation}, |
| 182 |
259 |
| $root_value, |
| 183 |
|
| ); |
| 184 |
221 |
| DEBUG and _debug('execute(result)', $result, $@); |
| 185 |
221 |
| _build_response($result, 1); |
| 186 |
15 |
▶ | } |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 187 |
|
| |
| 188 |
259 |
▶ | fun _build_response( |
|
Subroutine
_build_response: called CC=10 SCAR=23.3
|
| 189 |
|
| ExecutionPartialResult | Promise $result, |
| 190 |
|
| Bool $force_data = 0, |
| 191 |
221 |
▶ | ) :ReturnType(ExecutionResult | Promise) { |
Branch: 5 branches
| Branch | True | False | Total |
| @_ < 1 and Function::Parameters::_croak('Too few arguments for fun _build_response (expected 1, got ' . @_ . ')') |
61 |
198 |
259 |
| @_ > 2 and Function::Parameters::_croak('Too many arguments for fun _build_response (expected 2, got ' . @_ . ')') |
259 |
0 |
259 |
| @_ < 2 and $force_data = 0 |
259 |
0 |
259 |
| ${my $v = bless( {"compiled_type_constraint" => sub ($) { package Type::Tiny; use warnings; use strict; local $_ = $_[0]; foreach my $c (@constraints) { return unless &$c(@_); } return !0;},"constraint" => sub { package Type::Tiny::Union; use warnings; use strict; my $val = $_; &$_($val) and return !0 foreach (@checks); return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/x86_64-linux/Function/Parameters.pm","line" => 155,"package" => "Function::Parameters"},"deprecated" => !!0,"name" => "__ANON__","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_constraints" => [bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; $type->check($_[0]) or _failed_check($type, 'ExecutionPartialResult', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"compiled_type_constraint" => sub ($) { package Type::Tiny; use warnings; use strict; local $_ = $_[0]; foreach my $c (@constraints) { return unless &$c(@_); } return !0;},"constraint" => do{my $o},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 402,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "ExecutionPartialResult","exception_class" => "Error::TypeTiny::Assertion","library" => "GraphQL::Type::Library","name" => "ExecutionPartialResult","parent" => bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard::Dict; no warnings; use strict; my $value = $_[0]; if ($slurpy) { my(%tmp) = map((exists $constraints{$_} ? () : ($_, $value->{$_})), keys %$value); return unless $slurpy->check(\%tmp); } else { (exists $constraints{$_} or return) foreach (sort keys %$value); } foreach my $k (@keys) { exists $value->{$k} or $is_optional{$k} ? next : (return); $constraints{$k}->check($value->{$k}) or return; } return !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 402,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "Dict[data=>Optional[JSONable],errors=>Optional[ArrayRef[InstanceOf[\"GraphQL::Error\"]]]]","exception_class" => "Error::TypeTiny::Assertion","name" => "__ANON__","parameters" => ["data",bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"compiled_type_constraint" => sub ($) { package Type::Tiny; use warnings; use strict; local $_ = $_[0]; foreach my $c (@constraints) { return unless &$c(@_); } return !0;},"constraint" => sub { package Types::Standard; no warnings; use strict; $param->check($_[0]);},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 388,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "Optional[JSONable]","name" => "__ANON__","parameters" => [bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; $type->check($_[0]) or _failed_check($type, 'JSONable', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"compiled_type_constraint" => sub ($) { package Type::Tiny; use warnings; use strict; local $_ = $_[0]; foreach my $c (@constraints) { return unless &$c(@_); } return !0;},"constraint" => sub { package GraphQL::Type::Library; use warnings; use strict; no feature ':all'; use feature ':5.12'; $JSON->encode($_); 1;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 360,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "JSONable","exception_class" => "Error::TypeTiny::Assertion","library" => "GraphQL::Type::Library","name" => "JSONable","parent" => {},"uniq" => 73}, 'Type::Tiny' )],"parent" => bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Optional","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; return $param->coercion;},"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Optional') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Optional', \@_, 1); my $param = Types::TypeTiny::to_TypeTiny(shift()); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to Optional[`a] expected to be a type constraint; got $param"; sub { $param->check($_[0]); } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return [sprintf('%s exists', $varname), sprintf('"%s" constrains %s with "%s" if it exists', $type, $varname, $param), @{$param->validate_explain($value, $varname);}];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 719,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Optional","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $param = shift(); return unless $param->can_be_inlined; return sub { my $v = $_[1]; $param->inline_check($v); } ;},"library" => "Types::Standard","name" => "Optional","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $_[0]->type_default;},"uniq" => 27}, 'Type::Tiny' ),"uniq" => 82}, 'Type::Tiny' ),"errors",bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"compiled_type_constraint" => sub ($) { package Eval::TypeTiny::Sandbox; use strict; Type::Tiny::XS::AUTO::TC5($_[0]);},"constraint" => sub { package Types::Standard; no warnings; use strict; $param->check($_[0]);},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 402,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "Optional[ArrayRef[InstanceOf[\"GraphQL::Error\"]]]","inlined" => sub { package Types::Standard; no warnings; use strict; my $v = $_[1]; $param->inline_check($v);},"name" => "__ANON__","parameters" => [bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 402,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "ArrayRef[InstanceOf[\"GraphQL::Error\"]]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}';},"name" => "__ANON__","parameters" => [bless( {"class" => "GraphQL::Error","coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 985,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "InstanceOf[\"GraphQL::Error\"]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","name" => "__ANON__","type_constraints" => [bless( {"class" => "Moo::Object","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_blessed_ref($_[0]) or _failed_check(24, 'Object', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Object","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; builtin::blessed($_);},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 578,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Object","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_blessed_ref($_[1])" : &$maybe_load_modules('Scalar::Util', "Scalar::Util::blessed($_[1])");},"is_object" => 1,"library" => "Types::Standard","name" => "Object","parent" => {},"uniq" => 24}, 'Type::Tiny' ),"uniq" => 178}, 'Type::Tiny::Class' ),bless( {"class" => "GraphQL::MaybeTypeCheck","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","uniq" => 179}, 'Type::Tiny::Class' )],"uniq" => 180,"xs_sub" => "Type::Tiny::XS::AUTO::TC12"}, 'Type::Tiny::Intersection' ),"uniq" => 87}, 'Type::Tiny::Class' )],"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_arrayref($_[0]) or _failed_check(21, 'ArrayRef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_ArrayRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, @new) = ($_, 0);'; push @code, 'for (@$orig) {'; push @code, sprintf('++$return_orig && last unless (%s);', $coercable_item->inline_check('$_')); push @code, sprintf('push @new, (%s);', $param->coercion->inline_coercion('$_')); push @code, '}'; push @code, '$return_orig ? $orig : \\@new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my @new; foreach my $item (@$value) { return $value unless $coercable_item->check($item); push @new, $param->coerce($item); } return \@new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'ARRAY';},"constraint_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; return &Types::Standard::ArrayRef() unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'ArrayRef', \@_, 3); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to ArrayRef[`a] expected to be a type constraint; got $param"; my($min, $max) = (0, -1); $min = Types::Standard::assert_Int(shift()) if @_; $max = Types::Standard::assert_Int(shift()) if @_; my $param_compiled_check = $param->compiled_check; my $xsub; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("ArrayRef[$paramname]") if $paramname; } elsif (&Type::Tiny::_USE_MOUSE() and $param->_has_xsub and $min == 0 and $max == -1) { require Mouse::Util::TypeConstraints; my $maker = 'Mouse::Util::TypeConstraints'->can('_parameterize_ArrayRef_for'); $xsub = &$maker($param) if $maker; } return sub { my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0; } , $xsub if $min == 0 and $max == -1; return sub { my $array = shift(); return if @$array < $min; ($param->check($_) or return) foreach (@$array); return !0; } if $max == -1; return sub { my $array = shift(); return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } if $min == 0; return sub { my $array = shift(); return if @$array < $min; return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } ;},"deep_explanation" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; my($min, $max) = (0, -1); $min = $type->parameters->[1] if @{$type->parameters;} > 1; $max = $type->parameters->[2] if @{$type->parameters;} > 2; if ($min != 0 and @$value < $min) { return [sprintf('"%s" constrains array length at least %s', $type, $min), sprintf('@{%s} is %d', $varname, scalar @$value)]; } if ($max > 0 and @$value > $max) { return [sprintf('"%s" constrains array length at most %d', $type, $max), sprintf('@{%s} is %d', $varname, scalar @$value)]; } foreach my $i (0 .. $value->$#*) { my $item = $value->[$i]; next if $param->check($item); return [sprintf('"%s" constrains each value in the array with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->[%d]', $varname, $i));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 523,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "ArrayRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $param = shift(); my($min, $max) = (0, -1); $min = shift() if @_; $max = shift() if @_; my $param_compiled_check = $param->compiled_check; my $xsubname; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("ArrayRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_arrayref($_[1])" : "ref($_[1]) eq 'ARRAY'";},"library" => "Types::Standard","name" => "ArrayRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return [];},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 21}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 88}, 'Type::Tiny' )],"parent" => {},"type_default" => do{my $o},"uniq" => 89}, 'Type::Tiny' )],"parent" => bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_hashref($_[0]) or _failed_check(31, 'Dict', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Dict","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::Dict; no warnings; use strict; my $slurpy = @_ && Types::TypeTiny::is_TypeTiny($_[-1]) && $_[-1]->is_strictly_a_type_of($_Slurpy) ? (pop())->my_unslurpy : undef; my($parent, $child, %dict) = @_; my $C = 'Type::Coercion'->new('type_constraint', $child); my $all_inlinable = 1; my $child_coercions_exist = 0; foreach my $tc (values %dict) { $all_inlinable = 0 unless $tc->can_be_inlined; $all_inlinable = 0 if $tc->has_coercion and not $tc->coercion->can_be_inlined; ++$child_coercions_exist if $tc->has_coercion; } $all_inlinable = 0 if $slurpy and not $slurpy->can_be_inlined; $all_inlinable = 0 if $slurpy and $slurpy->has_coercion and not $slurpy->coercion->can_be_inlined; ++$child_coercions_exist if $slurpy and $slurpy->has_coercion; return unless $child_coercions_exist; if ($all_inlinable) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { require B; my $keycheck = join('|', map(quotemeta($_), (sort {length $b <=> length $a or $a cmp $b;} keys %dict))); $keycheck = ($KEYCHECK[++$keycheck_counter] = qr/^($keycheck)$/ms); my $label = sprintf('DICTLABEL%d', ++$label_counter); my @code; push @code, 'do { my ($orig, $return_orig, $tmp, %new) = ($_, 0);'; push @code, "${label}: {"; if ($slurpy) { push @code, sprintf('my $slurped = +{ map +($_=~$%s::KEYCHECK[%d])?():($_=>$orig->{$_}), keys %%$orig };', __PACKAGE__, $keycheck_counter); if ($slurpy->has_coercion) { push @code, sprintf('my $coerced = %s;', $slurpy->coercion->inline_coercion('$slurped')); push @code, sprintf('((%s)&&(%s))?(%%new=%%$coerced):(($return_orig = 1), last %s);', $_hash->inline_check('$coerced'), $slurpy->inline_check('$coerced'), $label); } else { push @code, sprintf('(%s)?(%%new=%%$slurped):(($return_orig = 1), last %s);', $slurpy->inline_check('$slurped'), $label); } } else { push @code, sprintf('($_ =~ $%s::KEYCHECK[%d])||(($return_orig = 1), last %s) for sort keys %%$orig;', __PACKAGE__, $keycheck_counter, $label); } foreach my $k (keys %dict) { my $ct = $dict{$k}; my $ct_coerce = $ct->has_coercion; my $ct_optional = $ct->is_a_type_of($_optional); my $K = B::perlstring($k); push @code, sprintf('if (exists $orig->{%s}) { $tmp = %s; (%s) ? ($new{%s}=$tmp) : (($return_orig=1), last %s) }', $K, $ct_coerce ? $ct->coercion->inline_coercion("\$orig->{$K}") : "\$orig->{$K}", $ct->inline_check('$tmp'), $K, $label); } push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { my(%is_optional) = map({$_, !!$dict{$_}->is_strictly_a_type_of($_optional);} sort(keys %dict)); $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; if ($slurpy) { my(%slurped) = map((exists $dict{$_} ? () : ($_, $value->{$_})), keys %$value); if ($slurpy->check(\%slurped)) { %new = %slurped; } elsif ($slurpy->has_coercion) { my $coerced = $slurpy->coerce(\%slurped); $slurpy->check($coerced) ? %new = %$coerced : (return $value); } else { return $value; } } else { foreach my $k (keys %$value) { return $value unless exists $dict{$k}; } } foreach my $k (keys %dict) { next if $is_optional{$k} and not exists $value->{$k}; my $ct = $dict{$k}; my $x = $ct->has_coercion ? $ct->coerce($value->{$k}) : $value->{$k}; return $value unless $ct->check($x); $new{$k} = $x; } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"constraint_generator" => sub { package Types::Standard::Dict; no warnings; use strict; my $slurpy = @_ && Types::TypeTiny::is_TypeTiny($_[-1]) && $_[-1]->is_strictly_a_type_of($_Slurpy) ? (pop())->my_unslurpy : undef; my $iterator = pair_iterator(@_); my(%constraints, %is_optional); my @keys; while (my($k, $v) = &$iterator()) { do { $constraints{$k} = $v; Types::TypeTiny::is_TypeTiny($v) or _croak "Parameter for Dict[...] with key '${k}' expected to be a type constraint; got $v"; Types::TypeTiny::is_StringLike($k) or _croak "Key for Dict[...] expected to be string; got $k"; push @keys, $k; $is_optional{$k} = !!$constraints{$k}->is_strictly_a_type_of($_optional) }; } return sub { my $value = $_[0]; if ($slurpy) { my(%tmp) = map((exists $constraints{$_} ? () : ($_, $value->{$_})), keys %$value); return unless $slurpy->check(\%tmp); } else { (exists $constraints{$_} or return) foreach (sort keys %$value); } foreach my $k (@keys) { exists $value->{$k} or $is_optional{$k} ? next : (return); $constraints{$k}->check($value->{$k}) or return; } return !0; } ;},"deep_explanation" => sub { package Types::Standard::Dict; no warnings; use strict; require B; my($type, $value, $varname) = @_; my(@params) = @{$type->parameters;}; my $slurpy = @params && Types::TypeTiny::is_TypeTiny($params[-1]) && $params[-1]->is_strictly_a_type_of($_Slurpy) ? pop(@params)->my_unslurpy : undef; my $iterator = pair_iterator(@params); my(%constraints, @keys); while (my($k, $c) = &$iterator()) { do { push @keys, $k; $constraints{$k} = $c }; } foreach my $k (@keys) { next if $constraints{$k}->has_parent and $constraints{$k}->parent == &Types::Standard::Optional() and not exists $value->{$k}; next if $constraints{$k}->check($value->{$k}); return [sprintf('"%s" requires key %s to appear in hash', $type, B::perlstring($k))] unless exists $value->{$k}; return [sprintf('"%s" constrains value at key %s of hash with "%s"', $type, B::perlstring($k), $constraints{$k}), @{$constraints{$k}->validate_explain($value->{$k}, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } if ($slurpy) { my(%tmp) = map({exists $constraints{$_} ? () : ($_, $value->{$_});} keys %$value); my $explain = $slurpy->validate_explain(\%tmp, '$slurpy'); return [sprintf('"%s" requires the hashref of additional key/value pairs to conform to "%s"', $type, $slurpy), @$explain] if $explain; } else { foreach my $k (sort keys %$value) { return [sprintf('"%s" does not allow key %s to appear in hash', $type, B::perlstring($k))] unless exists $constraints{$k}; } } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 842,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Dict","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::Dict; no warnings; use strict; my $slurpy = @_ && Types::TypeTiny::is_TypeTiny($_[-1]) && $_[-1]->is_strictly_a_type_of($_Slurpy) ? (pop())->my_unslurpy : undef; return if $slurpy and not $slurpy->can_be_inlined; my $slurpy_is_any = $slurpy && $_hash->is_a_type_of($slurpy); my $slurpy_is_map = $slurpy && $slurpy->is_parameterized && ($slurpy->parent->strictly_equals($_map) && $slurpy->parameters || $slurpy->parent->strictly_equals($_hash) && [$_any, $slurpy->parameters->[0]]); my $iterator = pair_iterator(@_); my(%constraints, @keys); while (my($k, $c) = &$iterator()) { do { return unless $c->can_be_inlined; $constraints{$k} = $c; push @keys, $k }; } my $regexp = join('|', map(quotemeta($_), @keys)); return sub { require B; my $h = $_[1]; join ' and ', &Types::Standard::HashRef()->inline_check($h), $slurpy_is_any ? () : $slurpy_is_map ? do { '(not grep {' . "my \$v = ($h)->{\$_};" . sprintf('not((/\\A(?:%s)\\z/) or ((%s) and (%s)))', $regexp, $slurpy_is_map->[0]->inline_check('$_'), $slurpy_is_map->[1]->inline_check('$v')) . "} keys %{$h})" } : ($slurpy ? do { 'do {' . "my \$slurpy_tmp = +{ map /\\A(?:$regexp)\\z/ ? () : (\$_ => ($h)->{\$_}), keys %{$h} };" . $slurpy->inline_check('$slurpy_tmp') . '}' } : "not(grep !/\\A(?:$regexp)\\z/, keys %{$h})"), map({my $k = B::perlstring($_); $constraints{$_}->is_strictly_a_type_of($_optional) ? sprintf('(!exists %s->{%s} or %s)', $h, $k, $constraints{$_}->inline_check("$h->{$k}")) : ("exists($h->{$k})", $constraints{$_}->inline_check("$h->{$k}"));} @keys); } ;},"library" => "Types::Standard","my_methods" => {"dict_is_slurpy" => sub { package Types::Standard::Dict; no warnings; use strict; my $self = shift(); return !1 if $self == &Types::Standard::Dict(); my $dict = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::Dict(); } ); my $slurpy = @{$dict->parameters;} && Types::TypeTiny::is_TypeTiny($dict->parameters->[-1]) && $dict->parameters->[-1]->is_strictly_a_type_of($_Slurpy) ? $dict->parameters->[-1] : undef;},"hashref_allows_key" => sub { package Types::Standard::Dict; no warnings; use strict; my $self = shift(); my($key) = @_; return Types::Standard::is_Str($key) if $self == &Types::Standard::Dict(); my $dict = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::Dict(); } ); my %params; my $slurpy = $dict->my_dict_is_slurpy; if ($slurpy) { my(@args) = @{$dict->parameters;}; pop @args; %params = @args; $slurpy = $slurpy->my_unslurpy; } else { %params = @{$dict->parameters;}; } return !0 if exists $params{$key}; return !1 unless $slurpy; return Types::Standard::is_Str($key) if $slurpy == &Types::Standard::Any() or $slurpy == &Types::Standard::Item() or $slurpy == &Types::Standard::Defined() or $slurpy == &Types::Standard::Ref(); return $slurpy->my_hashref_allows_key($key) if $slurpy->is_a_type_of(&Types::Standard::HashRef()); return !1;},"hashref_allows_value" => sub { package Types::Standard::Dict; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::Dict(); my $dict = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::Dict(); } ); my %params; my $slurpy = $dict->my_dict_is_slurpy; if ($slurpy) { my(@args) = @{$dict->parameters;}; pop @args; %params = @args; $slurpy = $slurpy->my_unslurpy; } else { %params = @{$dict->parameters;}; } return !0 if exists $params{$key} and $params{$key}->check($value); return !1 unless $slurpy; return !0 if $slurpy == &Types::Standard::Any() or $slurpy == &Types::Standard::Item() or $slurpy == &Types::Standard::Defined() or $slurpy == &Types::Standard::Ref(); return $slurpy->my_hashref_allows_value($key, $value) if $slurpy->is_a_type_of(&Types::Standard::HashRef()); return !1;}},"name" => "Dict","name_generator" => sub { package Types::Standard; no warnings; use strict; my($s, @p) = @_; my $l = @p && Types::TypeTiny::is_TypeTiny($p[-1]) && $p[-1]->is_strictly_a_type_of(Slurpy) ? pop @p : undef; my(%a) = @p; sprintf '%s[%s%s]', $s, join(',', map((sprintf('%s=>%s', $_, $a{$_})), sort(keys %a))), $l ? ",$l" : '';},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' ),"uniq" => 31}, 'Type::Tiny' ),"uniq" => 90}, 'Type::Tiny' ),"uniq" => 91}, 'Type::Tiny' ),bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Type::Tiny::XS::AUTO::TC6($_[0]) or _failed_check(93, 'Promise', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"compiled_type_constraint" => sub ;,"constraint" => do{my $o},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 414,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "Promise","exception_class" => "Error::TypeTiny::Assertion","library" => "GraphQL::Type::Library","name" => "Promise","parent" => bless( {"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"frozen" => 1,"name" => "__ANON__","type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 1043,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HasMethods[\"then\"]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Duck; use warnings; use strict; my $var = $_[1]; local $" = ' '; my $code = $var =~ /\$_/ ? " Scalar::Util::blessed($var) and not do { my \$tmp = $var; grep(!\$tmp->can(\$_), qw/@methods/) } " : " Scalar::Util::blessed($var) and not grep(!$var->can(\$_), qw/@methods/) "; return "do { $Type::Tiny::SafePackage use Scalar::Util (); $code }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; $code;},"methods" => ["then"],"name" => "__ANON__","uniq" => 92}, 'Type::Tiny::Duck' ),"uniq" => 93}, 'Type::Tiny' )],"uniq" => 153}, 'Type::Tiny::Union' );$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"type_constraints"}[0]{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"type_constraints"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"compiled_type_constraint"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[1]{"parameters"}[0]{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[1]{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[1]{"parent"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parameters"}[1]{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[1]{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[1]{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[1]{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0];$v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0];$v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"} = $v->{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"}{"parent"} = $v->{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"type_default"} = $v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"}{"type_default"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parent"} = $v->{"type_constraints"}[0]{"parent"}{"parameters"}[1]{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"type_default"} = $v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"}{"type_default"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"parent"} = $v->{"parent"};$v->{"type_constraints"}[1]{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"type_constraints"}[1]{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"type_constraints"}[1]{"compiled_type_constraint"};$v->{"type_constraints"}[1]{"parent"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[1]{"parent"};$v->{"type_constraints"}[1]{"parent"}{"compiled_type_constraint"} = $v->{"type_constraints"}[1]{"compiled_type_constraint"}; \$v}->check($result) or Function::Parameters::_croak('In fun _build_response: parameter 1 ($result): ' . ${my $v = bless( {"compiled_type_constraint" => sub ($) { package Type::Tiny; use warnings; use strict; local $_ = $_[0]; foreach my $c (@constraints) { return unless &$c(@_); } return !0;},"constraint" => sub { package Type::Tiny::Union; use warnings; use strict; my $val = $_; &$_($val) and return !0 foreach (@checks); return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/x86_64-linux/Function/Parameters.pm","line" => 155,"package" => "Function::Parameters"},"deprecated" => !!0,"name" => "__ANON__","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_constraints" => [bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; $type->check($_[0]) or _failed_check($type, 'ExecutionPartialResult', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"compiled_type_constraint" => sub ($) { package Type::Tiny; use warnings; use strict; local $_ = $_[0]; foreach my $c (@constraints) { return unless &$c(@_); } return !0;},"constraint" => do{my $o},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 402,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "ExecutionPartialResult","exception_class" => "Error::TypeTiny::Assertion","library" => "GraphQL::Type::Library","name" => "ExecutionPartialResult","parent" => bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard::Dict; no warnings; use strict; my $value = $_[0]; if ($slurpy) { my(%tmp) = map((exists $constraints{$_} ? () : ($_, $value->{$_})), keys %$value); return unless $slurpy->check(\%tmp); } else { (exists $constraints{$_} or return) foreach (sort keys %$value); } foreach my $k (@keys) { exists $value->{$k} or $is_optional{$k} ? next : (return); $constraints{$k}->check($value->{$k}) or return; } return !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 402,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "Dict[data=>Optional[JSONable],errors=>Optional[ArrayRef[InstanceOf[\"GraphQL::Error\"]]]]","exception_class" => "Error::TypeTiny::Assertion","name" => "__ANON__","parameters" => ["data",bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"compiled_type_constraint" => sub ($) { package Type::Tiny; use warnings; use strict; local $_ = $_[0]; foreach my $c (@constraints) { return unless &$c(@_); } return !0;},"constraint" => sub { package Types::Standard; no warnings; use strict; $param->check($_[0]);},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 388,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "Optional[JSONable]","name" => "__ANON__","parameters" => [bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; $type->check($_[0]) or _failed_check($type, 'JSONable', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"compiled_type_constraint" => sub ($) { package Type::Tiny; use warnings; use strict; local $_ = $_[0]; foreach my $c (@constraints) { return unless &$c(@_); } return !0;},"constraint" => sub { package GraphQL::Type::Library; use warnings; use strict; no feature ':all'; use feature ':5.12'; $JSON->encode($_); 1;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 360,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "JSONable","exception_class" => "Error::TypeTiny::Assertion","library" => "GraphQL::Type::Library","name" => "JSONable","parent" => {},"uniq" => 73}, 'Type::Tiny' )],"parent" => bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Optional","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; return $param->coercion;},"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Optional') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Optional', \@_, 1); my $param = Types::TypeTiny::to_TypeTiny(shift()); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to Optional[`a] expected to be a type constraint; got $param"; sub { $param->check($_[0]); } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return [sprintf('%s exists', $varname), sprintf('"%s" constrains %s with "%s" if it exists', $type, $varname, $param), @{$param->validate_explain($value, $varname);}];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 719,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Optional","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $param = shift(); return unless $param->can_be_inlined; return sub { my $v = $_[1]; $param->inline_check($v); } ;},"library" => "Types::Standard","name" => "Optional","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $_[0]->type_default;},"uniq" => 27}, 'Type::Tiny' ),"uniq" => 82}, 'Type::Tiny' ),"errors",bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"compiled_type_constraint" => sub ($) { package Eval::TypeTiny::Sandbox; use strict; Type::Tiny::XS::AUTO::TC5($_[0]);},"constraint" => sub { package Types::Standard; no warnings; use strict; $param->check($_[0]);},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 402,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "Optional[ArrayRef[InstanceOf[\"GraphQL::Error\"]]]","inlined" => sub { package Types::Standard; no warnings; use strict; my $v = $_[1]; $param->inline_check($v);},"name" => "__ANON__","parameters" => [bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 402,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "ArrayRef[InstanceOf[\"GraphQL::Error\"]]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}';},"name" => "__ANON__","parameters" => [bless( {"class" => "GraphQL::Error","coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 985,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "InstanceOf[\"GraphQL::Error\"]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","name" => "__ANON__","type_constraints" => [bless( {"class" => "Moo::Object","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_blessed_ref($_[0]) or _failed_check(24, 'Object', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Object","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; builtin::blessed($_);},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 578,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Object","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_blessed_ref($_[1])" : &$maybe_load_modules('Scalar::Util', "Scalar::Util::blessed($_[1])");},"is_object" => 1,"library" => "Types::Standard","name" => "Object","parent" => {},"uniq" => 24}, 'Type::Tiny' ),"uniq" => 178}, 'Type::Tiny::Class' ),bless( {"class" => "GraphQL::MaybeTypeCheck","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","uniq" => 179}, 'Type::Tiny::Class' )],"uniq" => 180,"xs_sub" => "Type::Tiny::XS::AUTO::TC12"}, 'Type::Tiny::Intersection' ),"uniq" => 87}, 'Type::Tiny::Class' )],"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_arrayref($_[0]) or _failed_check(21, 'ArrayRef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_ArrayRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, @new) = ($_, 0);'; push @code, 'for (@$orig) {'; push @code, sprintf('++$return_orig && last unless (%s);', $coercable_item->inline_check('$_')); push @code, sprintf('push @new, (%s);', $param->coercion->inline_coercion('$_')); push @code, '}'; push @code, '$return_orig ? $orig : \\@new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my @new; foreach my $item (@$value) { return $value unless $coercable_item->check($item); push @new, $param->coerce($item); } return \@new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'ARRAY';},"constraint_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; return &Types::Standard::ArrayRef() unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'ArrayRef', \@_, 3); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to ArrayRef[`a] expected to be a type constraint; got $param"; my($min, $max) = (0, -1); $min = Types::Standard::assert_Int(shift()) if @_; $max = Types::Standard::assert_Int(shift()) if @_; my $param_compiled_check = $param->compiled_check; my $xsub; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("ArrayRef[$paramname]") if $paramname; } elsif (&Type::Tiny::_USE_MOUSE() and $param->_has_xsub and $min == 0 and $max == -1) { require Mouse::Util::TypeConstraints; my $maker = 'Mouse::Util::TypeConstraints'->can('_parameterize_ArrayRef_for'); $xsub = &$maker($param) if $maker; } return sub { my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0; } , $xsub if $min == 0 and $max == -1; return sub { my $array = shift(); return if @$array < $min; ($param->check($_) or return) foreach (@$array); return !0; } if $max == -1; return sub { my $array = shift(); return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } if $min == 0; return sub { my $array = shift(); return if @$array < $min; return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } ;},"deep_explanation" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; my($min, $max) = (0, -1); $min = $type->parameters->[1] if @{$type->parameters;} > 1; $max = $type->parameters->[2] if @{$type->parameters;} > 2; if ($min != 0 and @$value < $min) { return [sprintf('"%s" constrains array length at least %s', $type, $min), sprintf('@{%s} is %d', $varname, scalar @$value)]; } if ($max > 0 and @$value > $max) { return [sprintf('"%s" constrains array length at most %d', $type, $max), sprintf('@{%s} is %d', $varname, scalar @$value)]; } foreach my $i (0 .. $value->$#*) { my $item = $value->[$i]; next if $param->check($item); return [sprintf('"%s" constrains each value in the array with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->[%d]', $varname, $i));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 523,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "ArrayRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $param = shift(); my($min, $max) = (0, -1); $min = shift() if @_; $max = shift() if @_; my $param_compiled_check = $param->compiled_check; my $xsubname; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("ArrayRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_arrayref($_[1])" : "ref($_[1]) eq 'ARRAY'";},"library" => "Types::Standard","name" => "ArrayRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return [];},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 21}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 88}, 'Type::Tiny' )],"parent" => {},"type_default" => do{my $o},"uniq" => 89}, 'Type::Tiny' )],"parent" => bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_hashref($_[0]) or _failed_check(31, 'Dict', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Dict","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::Dict; no warnings; use strict; my $slurpy = @_ && Types::TypeTiny::is_TypeTiny($_[-1]) && $_[-1]->is_strictly_a_type_of($_Slurpy) ? (pop())->my_unslurpy : undef; my($parent, $child, %dict) = @_; my $C = 'Type::Coercion'->new('type_constraint', $child); my $all_inlinable = 1; my $child_coercions_exist = 0; foreach my $tc (values %dict) { $all_inlinable = 0 unless $tc->can_be_inlined; $all_inlinable = 0 if $tc->has_coercion and not $tc->coercion->can_be_inlined; ++$child_coercions_exist if $tc->has_coercion; } $all_inlinable = 0 if $slurpy and not $slurpy->can_be_inlined; $all_inlinable = 0 if $slurpy and $slurpy->has_coercion and not $slurpy->coercion->can_be_inlined; ++$child_coercions_exist if $slurpy and $slurpy->has_coercion; return unless $child_coercions_exist; if ($all_inlinable) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { require B; my $keycheck = join('|', map(quotemeta($_), (sort {length $b <=> length $a or $a cmp $b;} keys %dict))); $keycheck = ($KEYCHECK[++$keycheck_counter] = qr/^($keycheck)$/ms); my $label = sprintf('DICTLABEL%d', ++$label_counter); my @code; push @code, 'do { my ($orig, $return_orig, $tmp, %new) = ($_, 0);'; push @code, "${label}: {"; if ($slurpy) { push @code, sprintf('my $slurped = +{ map +($_=~$%s::KEYCHECK[%d])?():($_=>$orig->{$_}), keys %%$orig };', __PACKAGE__, $keycheck_counter); if ($slurpy->has_coercion) { push @code, sprintf('my $coerced = %s;', $slurpy->coercion->inline_coercion('$slurped')); push @code, sprintf('((%s)&&(%s))?(%%new=%%$coerced):(($return_orig = 1), last %s);', $_hash->inline_check('$coerced'), $slurpy->inline_check('$coerced'), $label); } else { push @code, sprintf('(%s)?(%%new=%%$slurped):(($return_orig = 1), last %s);', $slurpy->inline_check('$slurped'), $label); } } else { push @code, sprintf('($_ =~ $%s::KEYCHECK[%d])||(($return_orig = 1), last %s) for sort keys %%$orig;', __PACKAGE__, $keycheck_counter, $label); } foreach my $k (keys %dict) { my $ct = $dict{$k}; my $ct_coerce = $ct->has_coercion; my $ct_optional = $ct->is_a_type_of($_optional); my $K = B::perlstring($k); push @code, sprintf('if (exists $orig->{%s}) { $tmp = %s; (%s) ? ($new{%s}=$tmp) : (($return_orig=1), last %s) }', $K, $ct_coerce ? $ct->coercion->inline_coercion("\$orig->{$K}") : "\$orig->{$K}", $ct->inline_check('$tmp'), $K, $label); } push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { my(%is_optional) = map({$_, !!$dict{$_}->is_strictly_a_type_of($_optional);} sort(keys %dict)); $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; if ($slurpy) { my(%slurped) = map((exists $dict{$_} ? () : ($_, $value->{$_})), keys %$value); if ($slurpy->check(\%slurped)) { %new = %slurped; } elsif ($slurpy->has_coercion) { my $coerced = $slurpy->coerce(\%slurped); $slurpy->check($coerced) ? %new = %$coerced : (return $value); } else { return $value; } } else { foreach my $k (keys %$value) { return $value unless exists $dict{$k}; } } foreach my $k (keys %dict) { next if $is_optional{$k} and not exists $value->{$k}; my $ct = $dict{$k}; my $x = $ct->has_coercion ? $ct->coerce($value->{$k}) : $value->{$k}; return $value unless $ct->check($x); $new{$k} = $x; } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"constraint_generator" => sub { package Types::Standard::Dict; no warnings; use strict; my $slurpy = @_ && Types::TypeTiny::is_TypeTiny($_[-1]) && $_[-1]->is_strictly_a_type_of($_Slurpy) ? (pop())->my_unslurpy : undef; my $iterator = pair_iterator(@_); my(%constraints, %is_optional); my @keys; while (my($k, $v) = &$iterator()) { do { $constraints{$k} = $v; Types::TypeTiny::is_TypeTiny($v) or _croak "Parameter for Dict[...] with key '${k}' expected to be a type constraint; got $v"; Types::TypeTiny::is_StringLike($k) or _croak "Key for Dict[...] expected to be string; got $k"; push @keys, $k; $is_optional{$k} = !!$constraints{$k}->is_strictly_a_type_of($_optional) }; } return sub { my $value = $_[0]; if ($slurpy) { my(%tmp) = map((exists $constraints{$_} ? () : ($_, $value->{$_})), keys %$value); return unless $slurpy->check(\%tmp); } else { (exists $constraints{$_} or return) foreach (sort keys %$value); } foreach my $k (@keys) { exists $value->{$k} or $is_optional{$k} ? next : (return); $constraints{$k}->check($value->{$k}) or return; } return !0; } ;},"deep_explanation" => sub { package Types::Standard::Dict; no warnings; use strict; require B; my($type, $value, $varname) = @_; my(@params) = @{$type->parameters;}; my $slurpy = @params && Types::TypeTiny::is_TypeTiny($params[-1]) && $params[-1]->is_strictly_a_type_of($_Slurpy) ? pop(@params)->my_unslurpy : undef; my $iterator = pair_iterator(@params); my(%constraints, @keys); while (my($k, $c) = &$iterator()) { do { push @keys, $k; $constraints{$k} = $c }; } foreach my $k (@keys) { next if $constraints{$k}->has_parent and $constraints{$k}->parent == &Types::Standard::Optional() and not exists $value->{$k}; next if $constraints{$k}->check($value->{$k}); return [sprintf('"%s" requires key %s to appear in hash', $type, B::perlstring($k))] unless exists $value->{$k}; return [sprintf('"%s" constrains value at key %s of hash with "%s"', $type, B::perlstring($k), $constraints{$k}), @{$constraints{$k}->validate_explain($value->{$k}, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } if ($slurpy) { my(%tmp) = map({exists $constraints{$_} ? () : ($_, $value->{$_});} keys %$value); my $explain = $slurpy->validate_explain(\%tmp, '$slurpy'); return [sprintf('"%s" requires the hashref of additional key/value pairs to conform to "%s"', $type, $slurpy), @$explain] if $explain; } else { foreach my $k (sort keys %$value) { return [sprintf('"%s" does not allow key %s to appear in hash', $type, B::perlstring($k))] unless exists $constraints{$k}; } } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 842,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Dict","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::Dict; no warnings; use strict; my $slurpy = @_ && Types::TypeTiny::is_TypeTiny($_[-1]) && $_[-1]->is_strictly_a_type_of($_Slurpy) ? (pop())->my_unslurpy : undef; return if $slurpy and not $slurpy->can_be_inlined; my $slurpy_is_any = $slurpy && $_hash->is_a_type_of($slurpy); my $slurpy_is_map = $slurpy && $slurpy->is_parameterized && ($slurpy->parent->strictly_equals($_map) && $slurpy->parameters || $slurpy->parent->strictly_equals($_hash) && [$_any, $slurpy->parameters->[0]]); my $iterator = pair_iterator(@_); my(%constraints, @keys); while (my($k, $c) = &$iterator()) { do { return unless $c->can_be_inlined; $constraints{$k} = $c; push @keys, $k }; } my $regexp = join('|', map(quotemeta($_), @keys)); return sub { require B; my $h = $_[1]; join ' and ', &Types::Standard::HashRef()->inline_check($h), $slurpy_is_any ? () : $slurpy_is_map ? do { '(not grep {' . "my \$v = ($h)->{\$_};" . sprintf('not((/\\A(?:%s)\\z/) or ((%s) and (%s)))', $regexp, $slurpy_is_map->[0]->inline_check('$_'), $slurpy_is_map->[1]->inline_check('$v')) . "} keys %{$h})" } : ($slurpy ? do { 'do {' . "my \$slurpy_tmp = +{ map /\\A(?:$regexp)\\z/ ? () : (\$_ => ($h)->{\$_}), keys %{$h} };" . $slurpy->inline_check('$slurpy_tmp') . '}' } : "not(grep !/\\A(?:$regexp)\\z/, keys %{$h})"), map({my $k = B::perlstring($_); $constraints{$_}->is_strictly_a_type_of($_optional) ? sprintf('(!exists %s->{%s} or %s)', $h, $k, $constraints{$_}->inline_check("$h->{$k}")) : ("exists($h->{$k})", $constraints{$_}->inline_check("$h->{$k}"));} @keys); } ;},"library" => "Types::Standard","my_methods" => {"dict_is_slurpy" => sub { package Types::Standard::Dict; no warnings; use strict; my $self = shift(); return !1 if $self == &Types::Standard::Dict(); my $dict = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::Dict(); } ); my $slurpy = @{$dict->parameters;} && Types::TypeTiny::is_TypeTiny($dict->parameters->[-1]) && $dict->parameters->[-1]->is_strictly_a_type_of($_Slurpy) ? $dict->parameters->[-1] : undef;},"hashref_allows_key" => sub { package Types::Standard::Dict; no warnings; use strict; my $self = shift(); my($key) = @_; return Types::Standard::is_Str($key) if $self == &Types::Standard::Dict(); my $dict = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::Dict(); } ); my %params; my $slurpy = $dict->my_dict_is_slurpy; if ($slurpy) { my(@args) = @{$dict->parameters;}; pop @args; %params = @args; $slurpy = $slurpy->my_unslurpy; } else { %params = @{$dict->parameters;}; } return !0 if exists $params{$key}; return !1 unless $slurpy; return Types::Standard::is_Str($key) if $slurpy == &Types::Standard::Any() or $slurpy == &Types::Standard::Item() or $slurpy == &Types::Standard::Defined() or $slurpy == &Types::Standard::Ref(); return $slurpy->my_hashref_allows_key($key) if $slurpy->is_a_type_of(&Types::Standard::HashRef()); return !1;},"hashref_allows_value" => sub { package Types::Standard::Dict; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::Dict(); my $dict = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::Dict(); } ); my %params; my $slurpy = $dict->my_dict_is_slurpy; if ($slurpy) { my(@args) = @{$dict->parameters;}; pop @args; %params = @args; $slurpy = $slurpy->my_unslurpy; } else { %params = @{$dict->parameters;}; } return !0 if exists $params{$key} and $params{$key}->check($value); return !1 unless $slurpy; return !0 if $slurpy == &Types::Standard::Any() or $slurpy == &Types::Standard::Item() or $slurpy == &Types::Standard::Defined() or $slurpy == &Types::Standard::Ref(); return $slurpy->my_hashref_allows_value($key, $value) if $slurpy->is_a_type_of(&Types::Standard::HashRef()); return !1;}},"name" => "Dict","name_generator" => sub { package Types::Standard; no warnings; use strict; my($s, @p) = @_; my $l = @p && Types::TypeTiny::is_TypeTiny($p[-1]) && $p[-1]->is_strictly_a_type_of(Slurpy) ? pop @p : undef; my(%a) = @p; sprintf '%s[%s%s]', $s, join(',', map((sprintf('%s=>%s', $_, $a{$_})), sort(keys %a))), $l ? ",$l" : '';},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' ),"uniq" => 31}, 'Type::Tiny' ),"uniq" => 90}, 'Type::Tiny' ),"uniq" => 91}, 'Type::Tiny' ),bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Type::Tiny::XS::AUTO::TC6($_[0]) or _failed_check(93, 'Promise', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"compiled_type_constraint" => sub ;,"constraint" => do{my $o},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 414,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "Promise","exception_class" => "Error::TypeTiny::Assertion","library" => "GraphQL::Type::Library","name" => "Promise","parent" => bless( {"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"frozen" => 1,"name" => "__ANON__","type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 1043,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HasMethods[\"then\"]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Duck; use warnings; use strict; my $var = $_[1]; local $" = ' '; my $code = $var =~ /\$_/ ? " Scalar::Util::blessed($var) and not do { my \$tmp = $var; grep(!\$tmp->can(\$_), qw/@methods/) } " : " Scalar::Util::blessed($var) and not grep(!$var->can(\$_), qw/@methods/) "; return "do { $Type::Tiny::SafePackage use Scalar::Util (); $code }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; $code;},"methods" => ["then"],"name" => "__ANON__","uniq" => 92}, 'Type::Tiny::Duck' ),"uniq" => 93}, 'Type::Tiny' )],"uniq" => 153}, 'Type::Tiny::Union' );$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"type_constraints"}[0]{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"type_constraints"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"compiled_type_constraint"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[1]{"parameters"}[0]{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[1]{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[1]{"parent"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parameters"}[1]{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[1]{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[1]{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[1]{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0];$v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0];$v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"} = $v->{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"}{"parent"} = $v->{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"type_default"} = $v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"}{"type_default"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parent"} = $v->{"type_constraints"}[0]{"parent"}{"parameters"}[1]{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"type_default"} = $v->{"type_constraints"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"}{"type_default"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"parent"} = $v->{"parent"};$v->{"type_constraints"}[1]{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"type_constraints"}[1]{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"type_constraints"}[1]{"compiled_type_constraint"};$v->{"type_constraints"}[1]{"parent"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[1]{"parent"};$v->{"type_constraints"}[1]{"parent"}{"compiled_type_constraint"} = $v->{"type_constraints"}[1]{"compiled_type_constraint"}; \$v}->get_message($result)) |
38 |
221 |
259 |
| $force_data = ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Type::Tiny::XS::Bool($_[0]) or _failed_check(3, 'Bool', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"compiled_coercion" => sub ($) { package Eval::TypeTiny::Sandbox; use strict; Type::Tiny::XS::Bool($_[0]) ? $_[0] : scalar do { local $_ = $_[0]; not !$_ };},"display_name" => "to_Bool","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"!!\$_"],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; not ref $_ and !defined($_) || $_ eq '' || $_ eq '0' || $_ eq '1';},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 242,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Bool","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; use warnings; use strict; $Type::Tiny::AvoidCallbacks ? goto $orig_inlined : "$xsubname($_[1])";},"library" => "Types::Standard","name" => "Bool","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => {},"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return !1;},"uniq" => 3}, 'Type::Tiny' );$v->{"coercion"}{"type_coercion_map"}[0]{"coercion"}{"type_constraint"} = $v->{"coercion"}{"type_coercion_map"}[0];$v->{"coercion"}{"type_coercion_map"}[0]{"compiled_type_constraint"} = $v->{"coercion"}{"type_coercion_map"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"coercion"}{"type_coercion_map"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"coercion"}{"type_coercion_map"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"constraint"} = $v->{"coercion"}{"type_coercion_map"}[0]{"constraint"};$v->{"parent"}{"parent"} = $v->{"coercion"}{"type_coercion_map"}[0]; \$v}->coerce($force_data), Type::Tiny::XS::Bool($force_data) or Function::Parameters::_croak('In fun _build_response: parameter 2 ($force_data): ' . ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Type::Tiny::XS::Bool($_[0]) or _failed_check(3, 'Bool', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"compiled_coercion" => sub ($) { package Eval::TypeTiny::Sandbox; use strict; Type::Tiny::XS::Bool($_[0]) ? $_[0] : scalar do { local $_ = $_[0]; not !$_ };},"display_name" => "to_Bool","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"!!\$_"],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; not ref $_ and !defined($_) || $_ eq '' || $_ eq '0' || $_ eq '1';},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 242,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Bool","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; use warnings; use strict; $Type::Tiny::AvoidCallbacks ? goto $orig_inlined : "$xsubname($_[1])";},"library" => "Types::Standard","name" => "Bool","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => {},"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return !1;},"uniq" => 3}, 'Type::Tiny' );$v->{"coercion"}{"type_coercion_map"}[0]{"coercion"}{"type_constraint"} = $v->{"coercion"}{"type_coercion_map"}[0];$v->{"coercion"}{"type_coercion_map"}[0]{"compiled_type_constraint"} = $v->{"coercion"}{"type_coercion_map"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"coercion"}{"type_coercion_map"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"coercion"}{"type_coercion_map"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"constraint"} = $v->{"coercion"}{"type_coercion_map"}[0]{"constraint"};$v->{"parent"}{"parent"} = $v->{"coercion"}{"type_coercion_map"}[0]; \$v}->get_message($force_data)) |
160 |
61 |
221 |
|
| 192 |
99 |
▶ | return $result->then(sub { _build_response(@_) }) if is_Promise($result); |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
| Branch | True | False | Total |
| if is_Promise($result) |
76 |
145 |
221 |
|
| 193 |
99 |
▶ | my @errors = @{$result->{errors} || []}; |
Condition100%2/2
$result->{'errors'} || []
MC/DC100%1/1
$result->{'errors'} || []
$result->{'errors'}
|
| 194 |
|
| +{ |
| 195 |
|
| $force_data ? (data => undef) : (), # default if none given |
| 196 |
|
| %$result, |
| 197 |
99 |
▶ | @errors ? (errors => [ map $_->to_json, @{$result->{errors}} ]) : (), |
Branch: 2 branches
| Branch | True | False | Total |
| $force_data ? : |
0 |
99 |
99 |
| @errors ? : |
0 |
99 |
99 |
|
| 198 |
|
| }; |
| 199 |
15 |
▶ | } |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 200 |
|
| |
| 201 |
99 |
▶ | fun _wrap_error( |
|
Subroutine
_wrap_error: called CC=4 SCAR=14.3
|
| 202 |
|
| Any $error, |
| 203 |
229 |
▶ | ) :ReturnType(ExecutionPartialResult) { |
Branch: 2 branches
| Branch | True | False | Total |
| @_ < 1 and Function::Parameters::_croak('Too few arguments for fun _wrap_error (expected 1, got ' . @_ . ')') |
0 |
99 |
99 |
| @_ > 1 and Function::Parameters::_croak('Too many arguments for fun _wrap_error (expected 1, got ' . @_ . ')') |
0 |
229 |
229 |
|
| 204 |
229 |
▶ | return $error if is_ExecutionPartialResult($error); |
Branch: 1 branch
| Branch | True | False | Total |
| if &is_ExecutionPartialResult($error) |
0 |
229 |
229 |
|
| 205 |
229 |
| +{ errors => [ GraphQL::Error->coerce($error) ] }; |
| 206 |
15 |
▶ | } |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 207 |
|
| |
| 208 |
229 |
▶ | fun _build_context( |
|
Subroutine
_build_context: called CC=24 SCAR=34.0
|
| 209 |
|
| (InstanceOf['GraphQL::Schema']) $schema, |
| 210 |
|
| ArrayRef[HashRef] $ast, |
| 211 |
|
| Any $root_value, |
| 212 |
|
| Any $context_value, |
| 213 |
|
| Maybe[HashRef] $variable_values, |
| 214 |
|
| Maybe[Str] $operation_name, |
| 215 |
|
| Maybe[CodeLike] $field_resolver, |
| 216 |
|
| Maybe[PromiseCode] $promise_code, |
| 217 |
229 |
▶ | ) :ReturnType(HashRef) { |
Branch: 8 branches
| Branch | True | False | Total |
| @_ < 8 and Function::Parameters::_croak('Too few arguments for fun _build_context (expected 8, got ' . @_ . ')') |
229 |
0 |
229 |
| @_ > 8 and Function::Parameters::_croak('Too many arguments for fun _build_context (expected 8, got ' . @_ . ')') |
229 |
0 |
229 |
| Type::Tiny::XS::AUTO::TC28($schema) or Function::Parameters::_croak('In fun _build_context: parameter 1 ($schema): ' . ${my $v = bless( {"class" => "GraphQL::Schema","coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 985,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "InstanceOf[\"GraphQL::Schema\"]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","name" => "__ANON__","type_constraints" => [bless( {"class" => "Moo::Object","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_blessed_ref($_[0]) or _failed_check(24, 'Object', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Object","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; builtin::blessed($_);},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 578,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Object","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_blessed_ref($_[1])" : &$maybe_load_modules('Scalar::Util', "Scalar::Util::blessed($_[1])");},"is_object" => 1,"library" => "Types::Standard","name" => "Object","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"uniq" => 24}, 'Type::Tiny' ),"uniq" => 184}, 'Type::Tiny::Class' ),bless( {"class" => "GraphQL::MaybeTypeCheck","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","uniq" => 185}, 'Type::Tiny::Class' )],"uniq" => 186,"xs_sub" => "Type::Tiny::XS::AUTO::TC12"}, 'Type::Tiny::Intersection' ),"uniq" => 150}, 'Type::Tiny::Class' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($schema)) |
229 |
0 |
229 |
| Type::Tiny::XS::AUTO::TC1($ast) or Function::Parameters::_croak('In fun _build_context: parameter 2 ($ast): ' . ${my $v = bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 92,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "ArrayRef[HashRef]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}';},"name" => "__ANON__","parameters" => [bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' )],"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_arrayref($_[0]) or _failed_check(21, 'ArrayRef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_ArrayRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, @new) = ($_, 0);'; push @code, 'for (@$orig) {'; push @code, sprintf('++$return_orig && last unless (%s);', $coercable_item->inline_check('$_')); push @code, sprintf('push @new, (%s);', $param->coercion->inline_coercion('$_')); push @code, '}'; push @code, '$return_orig ? $orig : \\@new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my @new; foreach my $item (@$value) { return $value unless $coercable_item->check($item); push @new, $param->coerce($item); } return \@new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'ARRAY';},"constraint_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; return &Types::Standard::ArrayRef() unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'ArrayRef', \@_, 3); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to ArrayRef[`a] expected to be a type constraint; got $param"; my($min, $max) = (0, -1); $min = Types::Standard::assert_Int(shift()) if @_; $max = Types::Standard::assert_Int(shift()) if @_; my $param_compiled_check = $param->compiled_check; my $xsub; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("ArrayRef[$paramname]") if $paramname; } elsif (&Type::Tiny::_USE_MOUSE() and $param->_has_xsub and $min == 0 and $max == -1) { require Mouse::Util::TypeConstraints; my $maker = 'Mouse::Util::TypeConstraints'->can('_parameterize_ArrayRef_for'); $xsub = &$maker($param) if $maker; } return sub { my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0; } , $xsub if $min == 0 and $max == -1; return sub { my $array = shift(); return if @$array < $min; ($param->check($_) or return) foreach (@$array); return !0; } if $max == -1; return sub { my $array = shift(); return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } if $min == 0; return sub { my $array = shift(); return if @$array < $min; return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } ;},"deep_explanation" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; my($min, $max) = (0, -1); $min = $type->parameters->[1] if @{$type->parameters;} > 1; $max = $type->parameters->[2] if @{$type->parameters;} > 2; if ($min != 0 and @$value < $min) { return [sprintf('"%s" constrains array length at least %s', $type, $min), sprintf('@{%s} is %d', $varname, scalar @$value)]; } if ($max > 0 and @$value > $max) { return [sprintf('"%s" constrains array length at most %d', $type, $max), sprintf('@{%s} is %d', $varname, scalar @$value)]; } foreach my $i (0 .. $value->$#*) { my $item = $value->[$i]; next if $param->check($item); return [sprintf('"%s" constrains each value in the array with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->[%d]', $varname, $i));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 523,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "ArrayRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $param = shift(); my($min, $max) = (0, -1); $min = shift() if @_; $max = shift() if @_; my $param_compiled_check = $param->compiled_check; my $xsubname; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("ArrayRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_arrayref($_[1])" : "ref($_[1]) eq 'ARRAY'";},"library" => "Types::Standard","name" => "ArrayRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return [];},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 21}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 44}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"coercion"}{"type_constraint"} = $v->{"parameters"}[0];$v->{"parameters"}[0]{"compiled_type_constraint"} = $v->{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"};$v->{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"};$v->{"type_default"} = $v->{"parent"}{"type_default"}; \$v}->get_message($ast)) |
229 |
0 |
229 |
| Type::Tiny::XS::AUTO::TC2($variable_values) or Function::Parameters::_croak('In fun _build_context: parameter 5 ($variable_values): ' . ${my $v = bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; my $value = shift(); return !0 unless defined $value; return $param->check($value);},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 338,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "Maybe[HashRef]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $param_check = $param->inline_check($v); "!defined($v) or $param_check";},"name" => "__ANON__","parameters" => [bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' )],"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Maybe","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; return $param->coercion;},"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Maybe') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Maybe', \@_, 1); my $param = Types::TypeTiny::to_TypeTiny(shift()); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to Maybe[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my @xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); push @xsub, Type::Tiny::XS::get_coderef_for("Maybe[$paramname]") if $paramname }; return sub { my $value = shift(); return !0 unless defined $value; return $param->check($value); } , @xsub;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return [sprintf('%s is defined', Type::Tiny::_dd($value)), sprintf('"%s" constrains the value with "%s" if it is defined', $type, $param), @{$param->validate_explain($value, $varname);}];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 657,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Maybe","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $param = shift(); my $param_compiled_check = $param->compiled_check; my $xsubname; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("Maybe[$paramname]") }; return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $param_check = $param->inline_check($v); "!defined($v) or $param_check"; } ;},"library" => "Types::Standard","name" => "Maybe","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; $_[0]->type_default or $Type::Tiny::parameterize_type->type_default;},"uniq" => 25}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 69}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"coercion"}{"type_constraint"} = $v->{"parameters"}[0];$v->{"parameters"}[0]{"compiled_type_constraint"} = $v->{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"};$v->{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"type_default"} = $v->{"parameters"}[0]{"type_default"}; \$v}->get_message($variable_values)) |
229 |
0 |
229 |
| Type::Tiny::XS::AUTO::TC15($operation_name) or Function::Parameters::_croak('In fun _build_context: parameter 6 ($operation_name): ' . ${my $v = bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; my $value = shift(); return !0 unless defined $value; return $param->check($value);},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/x86_64-linux/Function/Parameters.pm","line" => 98,"package" => "Function::Parameters"},"deprecated" => !!0,"display_name" => "Maybe[Str]","inlined" => sub { package Types::Standard; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $param_check = $param->inline_check($v); "!defined($v) or $param_check";},"name" => "__ANON__","parameters" => [bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Str","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref \$_ eq 'SCALAR' or ref \(my $val = $_) eq 'SCALAR';},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 291,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Str","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; use warnings; use strict; $Type::Tiny::AvoidCallbacks ? goto $orig_inlined : "$xsubname($_[1])";},"library" => "Types::Standard","name" => "Str","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and not ref $_[0] or _failed_check(8, 'Value', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Value","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; not ref $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 276,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Value","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1]) and not ref($_[1])";},"library" => "Types::Standard","name" => "Value","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 8}, 'Type::Tiny' ),"sorter" => sub { package Types::Standard; no warnings; use strict; $_[0] cmp $_[1];},"type_default" => sub { package Types::Standard; no warnings; use strict; return '';},"uniq" => 9}, 'Type::Tiny' )],"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Maybe","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; return $param->coercion;},"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Maybe') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Maybe', \@_, 1); my $param = Types::TypeTiny::to_TypeTiny(shift()); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to Maybe[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my @xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); push @xsub, Type::Tiny::XS::get_coderef_for("Maybe[$paramname]") if $paramname }; return sub { my $value = shift(); return !0 unless defined $value; return $param->check($value); } , @xsub;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return [sprintf('%s is defined', Type::Tiny::_dd($value)), sprintf('"%s" constrains the value with "%s" if it is defined', $type, $param), @{$param->validate_explain($value, $varname);}];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 657,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Maybe","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $param = shift(); my $param_compiled_check = $param->compiled_check; my $xsubname; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("Maybe[$paramname]") }; return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $param_check = $param->inline_check($v); "!defined($v) or $param_check"; } ;},"library" => "Types::Standard","name" => "Maybe","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; $_[0]->type_default or $Type::Tiny::parameterize_type->type_default;},"uniq" => 25}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 116}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"coercion"}{"type_constraint"} = $v->{"parameters"}[0];$v->{"parameters"}[0]{"compiled_type_constraint"} = $v->{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"};$v->{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"type_default"} = $v->{"parameters"}[0]{"type_default"}; \$v}->get_message($operation_name)) |
229 |
0 |
229 |
| Type::Tiny::XS::AUTO::TC8($field_resolver) or Function::Parameters::_croak('In fun _build_context: parameter 7 ($field_resolver): ' . ${my $v = bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; my $value = shift(); return !0 unless defined $value; return $param->check($value);},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/x86_64-linux/Function/Parameters.pm","line" => 98,"package" => "Function::Parameters"},"deprecated" => !!0,"display_name" => "Maybe[CodeLike]","inlined" => sub { package Types::Standard; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $param_check = $param->inline_check($v); "!defined($v) or $param_check";},"name" => "__ANON__","parameters" => [bless( {"_default_message" => sub { package Type::Tiny; use warnings; use strict; sprintf '%s did not pass type constraint "%s"', _dd($_[0]), $name;},"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"compiled_type_constraint" => sub ;,"constraint" => sub { package Types::TypeTiny; use warnings; use strict; ref $_ eq 'CODE' or builtin::blessed($_) and _check_overload($_, '&{}');},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/TypeTiny.pm","line" => 432,"package" => "Types::TypeTiny"},"deprecated" => !!0,"display_name" => "CodeLike","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::TypeTiny; use warnings; use strict; $Type::Tiny::AvoidCallbacks || !$xsubname ? goto $inlined : "$xsubname($_[1])";},"is_using_default_message" => 1,"library" => "Types::TypeTiny","name" => "CodeLike","type_default" => sub { package Types::TypeTiny; use warnings; use strict; return sub { } ;},"uniq" => 94}, 'Type::Tiny' )],"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Maybe","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; return $param->coercion;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Maybe') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Maybe', \@_, 1); my $param = Types::TypeTiny::to_TypeTiny(shift()); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to Maybe[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my @xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); push @xsub, Type::Tiny::XS::get_coderef_for("Maybe[$paramname]") if $paramname }; return sub { my $value = shift(); return !0 unless defined $value; return $param->check($value); } , @xsub;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return [sprintf('%s is defined', Type::Tiny::_dd($value)), sprintf('"%s" constrains the value with "%s" if it is defined', $type, $param), @{$param->validate_explain($value, $varname);}];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 657,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Maybe","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $param = shift(); my $param_compiled_check = $param->compiled_check; my $xsubname; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("Maybe[$paramname]") }; return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $param_check = $param->inline_check($v); "!defined($v) or $param_check"; } ;},"library" => "Types::Standard","name" => "Maybe","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; $_[0]->type_default or $Type::Tiny::parameterize_type->type_default;},"uniq" => 25}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 100}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"constraint"};$v->{"type_default"} = $v->{"parameters"}[0]{"type_default"}; \$v}->get_message($field_resolver)) |
0 |
224 |
224 |
| do {
package Type::Tiny;
not defined $promise_code or do {
Ref::Util::XS::is_plain_hashref($promise_code) and not grep((!/\A(?:resolve|all|reject|new)\z/u), keys %{$promise_code;}) and exists $promise_code->{"resolve"} and do {
Type::Tiny::XS::CodeLike($promise_code->{"resolve"})
} and exists $promise_code->{"all"} and do {
Type::Tiny::XS::CodeLike($promise_code->{"all"})
} and exists $promise_code->{"reject"} and do {
Type::Tiny::XS::CodeLike($promise_code->{"reject"})
} and !exists $promise_code->{"new"} || do {
Type::Tiny::XS::CodeLike($promise_code->{"new"})
}
}
} or Function::Parameters::_croak('In fun _build_context: parameter 8 ($promise_code): ' . ${my $v = bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ($) { package Eval::TypeTiny::Sandbox; use strict; do { package Type::Tiny; not defined $_[0] or do { Ref::Util::XS::is_plain_hashref($_[0]) and not grep((!/\A(?:resolve|all|reject|new)\z/), keys %{$_[0];}) and exists $_[0]{'resolve'} and do { Type::Tiny::XS::CodeLike($_[0]{'resolve'}) } and exists $_[0]{'all'} and do { Type::Tiny::XS::CodeLike($_[0]{'all'}) } and exists $_[0]{'reject'} and do { Type::Tiny::XS::CodeLike($_[0]{'reject'}) } and !exists $_[0]{'new'} || do { Type::Tiny::XS::CodeLike($_[0]{'new'}) } } };},"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; my $value = shift(); return !0 unless defined $value; return $param->check($value);},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/x86_64-linux/Function/Parameters.pm","line" => 98,"package" => "Function::Parameters"},"deprecated" => !!0,"display_name" => "Maybe[PromiseCode]","inlined" => sub { package Types::Standard; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $param_check = $param->inline_check($v); "!defined($v) or $param_check";},"name" => "__ANON__","parameters" => [bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; do { Ref::Util::XS::is_plain_hashref($_[0]) and not grep((!/\A(?:resolve|all|reject|new)\z/), keys %{$_[0];}) and exists $_[0]{'resolve'} and do { Type::Tiny::XS::CodeLike($_[0]{'resolve'}) } and exists $_[0]{'all'} and do { Type::Tiny::XS::CodeLike($_[0]{'all'}) } and exists $_[0]{'reject'} and do { Type::Tiny::XS::CodeLike($_[0]{'reject'}) } and !exists $_[0]{'new'} || do { Type::Tiny::XS::CodeLike($_[0]{'new'}) } } or _failed_check(97, 'PromiseCode', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"compiled_type_constraint" => sub ($) { package Eval::TypeTiny::Sandbox; use strict; do { package Type::Tiny; Ref::Util::XS::is_plain_hashref($_[0]) and not grep((!/\A(?:resolve|all|reject|new)\z/), keys %{$_[0];}) and exists $_[0]{'resolve'} and do { Type::Tiny::XS::CodeLike($_[0]{'resolve'}) } and exists $_[0]{'all'} and do { Type::Tiny::XS::CodeLike($_[0]{'all'}) } and exists $_[0]{'reject'} and do { Type::Tiny::XS::CodeLike($_[0]{'reject'}) } and !exists $_[0]{'new'} || do { Type::Tiny::XS::CodeLike($_[0]{'new'}) } };},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 438,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "PromiseCode","exception_class" => "Error::TypeTiny::Assertion","library" => "GraphQL::Type::Library","name" => "PromiseCode","parent" => bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard::Dict; no warnings; use strict; my $value = $_[0]; if ($slurpy) { my(%tmp) = map((exists $constraints{$_} ? () : ($_, $value->{$_})), keys %$value); return unless $slurpy->check(\%tmp); } else { (exists $constraints{$_} or return) foreach (sort keys %$value); } foreach my $k (@keys) { exists $value->{$k} or $is_optional{$k} ? next : (return); $constraints{$k}->check($value->{$k}) or return; } return !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 438,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "Dict[all=>CodeLike,new=>Optional[CodeLike],reject=>CodeLike,resolve=>CodeLike]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard::Dict; no warnings; use strict; require B; my $h = $_[1]; join ' and ', &Types::Standard::HashRef()->inline_check($h), $slurpy_is_any ? () : $slurpy_is_map ? do { '(not grep {' . "my \$v = ($h)->{\$_};" . sprintf('not((/\\A(?:%s)\\z/) or ((%s) and (%s)))', $regexp, $slurpy_is_map->[0]->inline_check('$_'), $slurpy_is_map->[1]->inline_check('$v')) . "} keys %{$h})" } : ($slurpy ? do { 'do {' . "my \$slurpy_tmp = +{ map /\\A(?:$regexp)\\z/ ? () : (\$_ => ($h)->{\$_}), keys %{$h} };" . $slurpy->inline_check('$slurpy_tmp') . '}' } : "not(grep !/\\A(?:$regexp)\\z/, keys %{$h})"), map({my $k = B::perlstring($_); $constraints{$_}->is_strictly_a_type_of($_optional) ? sprintf('(!exists %s->{%s} or %s)', $h, $k, $constraints{$_}->inline_check("$h->{$k}")) : ("exists($h->{$k})", $constraints{$_}->inline_check("$h->{$k}"));} @keys);},"name" => "__ANON__","parameters" => ["resolve",bless( {"_default_message" => sub { package Type::Tiny; use warnings; use strict; sprintf '%s did not pass type constraint "%s"', _dd($_[0]), $name;},"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"compiled_type_constraint" => sub ;,"constraint" => sub { package Types::TypeTiny; use warnings; use strict; ref $_ eq 'CODE' or builtin::blessed($_) and _check_overload($_, '&{}');},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/TypeTiny.pm","line" => 432,"package" => "Types::TypeTiny"},"deprecated" => !!0,"display_name" => "CodeLike","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::TypeTiny; use warnings; use strict; $Type::Tiny::AvoidCallbacks || !$xsubname ? goto $inlined : "$xsubname($_[1])";},"is_using_default_message" => 1,"library" => "Types::TypeTiny","name" => "CodeLike","type_default" => sub { package Types::TypeTiny; use warnings; use strict; return sub { } ;},"uniq" => 94}, 'Type::Tiny' ),"all",{},"reject",{},"new",bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"constraint" => sub { package Types::Standard; no warnings; use strict; $param->check($_[0]);},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 438,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "Optional[CodeLike]","inlined" => sub { package Types::Standard; no warnings; use strict; my $v = $_[1]; $param->inline_check($v);},"name" => "__ANON__","parameters" => [{}],"parent" => bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Optional","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; return $param->coercion;},"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Optional') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Optional', \@_, 1); my $param = Types::TypeTiny::to_TypeTiny(shift()); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to Optional[`a] expected to be a type constraint; got $param"; sub { $param->check($_[0]); } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return [sprintf('%s exists', $varname), sprintf('"%s" constrains %s with "%s" if it exists', $type, $varname, $param), @{$param->validate_explain($value, $varname);}];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 719,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Optional","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $param = shift(); return unless $param->can_be_inlined; return sub { my $v = $_[1]; $param->inline_check($v); } ;},"library" => "Types::Standard","name" => "Optional","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $_[0]->type_default;},"uniq" => 27}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 95}, 'Type::Tiny' )],"parent" => bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_hashref($_[0]) or _failed_check(31, 'Dict', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Dict","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::Dict; no warnings; use strict; my $slurpy = @_ && Types::TypeTiny::is_TypeTiny($_[-1]) && $_[-1]->is_strictly_a_type_of($_Slurpy) ? (pop())->my_unslurpy : undef; my($parent, $child, %dict) = @_; my $C = 'Type::Coercion'->new('type_constraint', $child); my $all_inlinable = 1; my $child_coercions_exist = 0; foreach my $tc (values %dict) { $all_inlinable = 0 unless $tc->can_be_inlined; $all_inlinable = 0 if $tc->has_coercion and not $tc->coercion->can_be_inlined; ++$child_coercions_exist if $tc->has_coercion; } $all_inlinable = 0 if $slurpy and not $slurpy->can_be_inlined; $all_inlinable = 0 if $slurpy and $slurpy->has_coercion and not $slurpy->coercion->can_be_inlined; ++$child_coercions_exist if $slurpy and $slurpy->has_coercion; return unless $child_coercions_exist; if ($all_inlinable) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { require B; my $keycheck = join('|', map(quotemeta($_), (sort {length $b <=> length $a or $a cmp $b;} keys %dict))); $keycheck = ($KEYCHECK[++$keycheck_counter] = qr/^($keycheck)$/ms); my $label = sprintf('DICTLABEL%d', ++$label_counter); my @code; push @code, 'do { my ($orig, $return_orig, $tmp, %new) = ($_, 0);'; push @code, "${label}: {"; if ($slurpy) { push @code, sprintf('my $slurped = +{ map +($_=~$%s::KEYCHECK[%d])?():($_=>$orig->{$_}), keys %%$orig };', __PACKAGE__, $keycheck_counter); if ($slurpy->has_coercion) { push @code, sprintf('my $coerced = %s;', $slurpy->coercion->inline_coercion('$slurped')); push @code, sprintf('((%s)&&(%s))?(%%new=%%$coerced):(($return_orig = 1), last %s);', $_hash->inline_check('$coerced'), $slurpy->inline_check('$coerced'), $label); } else { push @code, sprintf('(%s)?(%%new=%%$slurped):(($return_orig = 1), last %s);', $slurpy->inline_check('$slurped'), $label); } } else { push @code, sprintf('($_ =~ $%s::KEYCHECK[%d])||(($return_orig = 1), last %s) for sort keys %%$orig;', __PACKAGE__, $keycheck_counter, $label); } foreach my $k (keys %dict) { my $ct = $dict{$k}; my $ct_coerce = $ct->has_coercion; my $ct_optional = $ct->is_a_type_of($_optional); my $K = B::perlstring($k); push @code, sprintf('if (exists $orig->{%s}) { $tmp = %s; (%s) ? ($new{%s}=$tmp) : (($return_orig=1), last %s) }', $K, $ct_coerce ? $ct->coercion->inline_coercion("\$orig->{$K}") : "\$orig->{$K}", $ct->inline_check('$tmp'), $K, $label); } push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { my(%is_optional) = map({$_, !!$dict{$_}->is_strictly_a_type_of($_optional);} sort(keys %dict)); $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; if ($slurpy) { my(%slurped) = map((exists $dict{$_} ? () : ($_, $value->{$_})), keys %$value); if ($slurpy->check(\%slurped)) { %new = %slurped; } elsif ($slurpy->has_coercion) { my $coerced = $slurpy->coerce(\%slurped); $slurpy->check($coerced) ? %new = %$coerced : (return $value); } else { return $value; } } else { foreach my $k (keys %$value) { return $value unless exists $dict{$k}; } } foreach my $k (keys %dict) { next if $is_optional{$k} and not exists $value->{$k}; my $ct = $dict{$k}; my $x = $ct->has_coercion ? $ct->coerce($value->{$k}) : $value->{$k}; return $value unless $ct->check($x); $new{$k} = $x; } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"constraint_generator" => sub { package Types::Standard::Dict; no warnings; use strict; my $slurpy = @_ && Types::TypeTiny::is_TypeTiny($_[-1]) && $_[-1]->is_strictly_a_type_of($_Slurpy) ? (pop())->my_unslurpy : undef; my $iterator = pair_iterator(@_); my(%constraints, %is_optional); my @keys; while (my($k, $v) = &$iterator()) { do { $constraints{$k} = $v; Types::TypeTiny::is_TypeTiny($v) or _croak "Parameter for Dict[...] with key '${k}' expected to be a type constraint; got $v"; Types::TypeTiny::is_StringLike($k) or _croak "Key for Dict[...] expected to be string; got $k"; push @keys, $k; $is_optional{$k} = !!$constraints{$k}->is_strictly_a_type_of($_optional) }; } return sub { my $value = $_[0]; if ($slurpy) { my(%tmp) = map((exists $constraints{$_} ? () : ($_, $value->{$_})), keys %$value); return unless $slurpy->check(\%tmp); } else { (exists $constraints{$_} or return) foreach (sort keys %$value); } foreach my $k (@keys) { exists $value->{$k} or $is_optional{$k} ? next : (return); $constraints{$k}->check($value->{$k}) or return; } return !0; } ;},"deep_explanation" => sub { package Types::Standard::Dict; no warnings; use strict; require B; my($type, $value, $varname) = @_; my(@params) = @{$type->parameters;}; my $slurpy = @params && Types::TypeTiny::is_TypeTiny($params[-1]) && $params[-1]->is_strictly_a_type_of($_Slurpy) ? pop(@params)->my_unslurpy : undef; my $iterator = pair_iterator(@params); my(%constraints, @keys); while (my($k, $c) = &$iterator()) { do { push @keys, $k; $constraints{$k} = $c }; } foreach my $k (@keys) { next if $constraints{$k}->has_parent and $constraints{$k}->parent == &Types::Standard::Optional() and not exists $value->{$k}; next if $constraints{$k}->check($value->{$k}); return [sprintf('"%s" requires key %s to appear in hash', $type, B::perlstring($k))] unless exists $value->{$k}; return [sprintf('"%s" constrains value at key %s of hash with "%s"', $type, B::perlstring($k), $constraints{$k}), @{$constraints{$k}->validate_explain($value->{$k}, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } if ($slurpy) { my(%tmp) = map({exists $constraints{$_} ? () : ($_, $value->{$_});} keys %$value); my $explain = $slurpy->validate_explain(\%tmp, '$slurpy'); return [sprintf('"%s" requires the hashref of additional key/value pairs to conform to "%s"', $type, $slurpy), @$explain] if $explain; } else { foreach my $k (sort keys %$value) { return [sprintf('"%s" does not allow key %s to appear in hash', $type, B::perlstring($k))] unless exists $constraints{$k}; } } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 842,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Dict","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::Dict; no warnings; use strict; my $slurpy = @_ && Types::TypeTiny::is_TypeTiny($_[-1]) && $_[-1]->is_strictly_a_type_of($_Slurpy) ? (pop())->my_unslurpy : undef; return if $slurpy and not $slurpy->can_be_inlined; my $slurpy_is_any = $slurpy && $_hash->is_a_type_of($slurpy); my $slurpy_is_map = $slurpy && $slurpy->is_parameterized && ($slurpy->parent->strictly_equals($_map) && $slurpy->parameters || $slurpy->parent->strictly_equals($_hash) && [$_any, $slurpy->parameters->[0]]); my $iterator = pair_iterator(@_); my(%constraints, @keys); while (my($k, $c) = &$iterator()) { do { return unless $c->can_be_inlined; $constraints{$k} = $c; push @keys, $k }; } my $regexp = join('|', map(quotemeta($_), @keys)); return sub { require B; my $h = $_[1]; join ' and ', &Types::Standard::HashRef()->inline_check($h), $slurpy_is_any ? () : $slurpy_is_map ? do { '(not grep {' . "my \$v = ($h)->{\$_};" . sprintf('not((/\\A(?:%s)\\z/) or ((%s) and (%s)))', $regexp, $slurpy_is_map->[0]->inline_check('$_'), $slurpy_is_map->[1]->inline_check('$v')) . "} keys %{$h})" } : ($slurpy ? do { 'do {' . "my \$slurpy_tmp = +{ map /\\A(?:$regexp)\\z/ ? () : (\$_ => ($h)->{\$_}), keys %{$h} };" . $slurpy->inline_check('$slurpy_tmp') . '}' } : "not(grep !/\\A(?:$regexp)\\z/, keys %{$h})"), map({my $k = B::perlstring($_); $constraints{$_}->is_strictly_a_type_of($_optional) ? sprintf('(!exists %s->{%s} or %s)', $h, $k, $constraints{$_}->inline_check("$h->{$k}")) : ("exists($h->{$k})", $constraints{$_}->inline_check("$h->{$k}"));} @keys); } ;},"library" => "Types::Standard","my_methods" => {"dict_is_slurpy" => sub { package Types::Standard::Dict; no warnings; use strict; my $self = shift(); return !1 if $self == &Types::Standard::Dict(); my $dict = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::Dict(); } ); my $slurpy = @{$dict->parameters;} && Types::TypeTiny::is_TypeTiny($dict->parameters->[-1]) && $dict->parameters->[-1]->is_strictly_a_type_of($_Slurpy) ? $dict->parameters->[-1] : undef;},"hashref_allows_key" => sub { package Types::Standard::Dict; no warnings; use strict; my $self = shift(); my($key) = @_; return Types::Standard::is_Str($key) if $self == &Types::Standard::Dict(); my $dict = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::Dict(); } ); my %params; my $slurpy = $dict->my_dict_is_slurpy; if ($slurpy) { my(@args) = @{$dict->parameters;}; pop @args; %params = @args; $slurpy = $slurpy->my_unslurpy; } else { %params = @{$dict->parameters;}; } return !0 if exists $params{$key}; return !1 unless $slurpy; return Types::Standard::is_Str($key) if $slurpy == &Types::Standard::Any() or $slurpy == &Types::Standard::Item() or $slurpy == &Types::Standard::Defined() or $slurpy == &Types::Standard::Ref(); return $slurpy->my_hashref_allows_key($key) if $slurpy->is_a_type_of(&Types::Standard::HashRef()); return !1;},"hashref_allows_value" => sub { package Types::Standard::Dict; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::Dict(); my $dict = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::Dict(); } ); my %params; my $slurpy = $dict->my_dict_is_slurpy; if ($slurpy) { my(@args) = @{$dict->parameters;}; pop @args; %params = @args; $slurpy = $slurpy->my_unslurpy; } else { %params = @{$dict->parameters;}; } return !0 if exists $params{$key} and $params{$key}->check($value); return !1 unless $slurpy; return !0 if $slurpy == &Types::Standard::Any() or $slurpy == &Types::Standard::Item() or $slurpy == &Types::Standard::Defined() or $slurpy == &Types::Standard::Ref(); return $slurpy->my_hashref_allows_value($key, $value) if $slurpy->is_a_type_of(&Types::Standard::HashRef()); return !1;}},"name" => "Dict","name_generator" => sub { package Types::Standard; no warnings; use strict; my($s, @p) = @_; my $l = @p && Types::TypeTiny::is_TypeTiny($p[-1]) && $p[-1]->is_strictly_a_type_of(Slurpy) ? pop @p : undef; my(%a) = @p; sprintf '%s[%s%s]', $s, join(',', map((sprintf('%s=>%s', $_, $a{$_})), sort(keys %a))), $l ? ",$l" : '';},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' ),"uniq" => 31}, 'Type::Tiny' ),"uniq" => 96}, 'Type::Tiny' ),"uniq" => 97}, 'Type::Tiny' )],"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Maybe","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; return $param->coercion;},"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Maybe') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Maybe', \@_, 1); my $param = Types::TypeTiny::to_TypeTiny(shift()); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to Maybe[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my @xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); push @xsub, Type::Tiny::XS::get_coderef_for("Maybe[$paramname]") if $paramname }; return sub { my $value = shift(); return !0 unless defined $value; return $param->check($value); } , @xsub;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return [sprintf('%s is defined', Type::Tiny::_dd($value)), sprintf('"%s" constrains the value with "%s" if it is defined', $type, $param), @{$param->validate_explain($value, $varname);}];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 657,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Maybe","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $param = shift(); my $param_compiled_check = $param->compiled_check; my $xsubname; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("Maybe[$paramname]") }; return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $param_check = $param->inline_check($v); "!defined($v) or $param_check"; } ;},"library" => "Types::Standard","name" => "Maybe","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; $_[0]->type_default or $Type::Tiny::parameterize_type->type_default;},"uniq" => 25}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 152}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"compiled_type_constraint"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3] = $v->{"parameters"}[0]{"parent"}{"parameters"}[1];$v->{"parameters"}[0]{"parent"}{"parameters"}[5] = $v->{"parameters"}[0]{"parent"}{"parameters"}[1];$v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parameters"}[0] = $v->{"parameters"}[0]{"parent"}{"parameters"}[1];$v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"constraint"} = $v->{"parameters"}[0]{"constraint"};$v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"constraint"};$v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"constraint"};$v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"type_default"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"type_default"};$v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"constraint"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"parent"};$v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"constraint"} = $v->{"parameters"}[0]{"constraint"};$v->{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[7]{"parent"}{"parent"};$v->{"type_default"} = $v->{"parent"}{"type_default"}; \$v}->get_message($promise_code)) |
0 |
224 |
224 |
|
| 218 |
|
| my %fragments = map { |
| 219 |
222 |
| ($_->{name} => $_) |
| 220 |
1 |
| } grep $_->{kind} eq 'fragment', @$ast; |
| 221 |
58 |
| my @operations = grep $_->{kind} eq 'operation', @$ast; |
| 222 |
58 |
▶ | die "No operations supplied.\n" if !@operations; |
Branch: 1 branch
| Branch | True | False | Total |
| unless @operations |
224 |
0 |
224 |
|
| 223 |
58 |
▶ | die "Can only execute document containing fragments or operations\n" |
Branch: 1 branch
| Branch | True | False | Total |
| if @$ast != keys(%fragments) + @operations |
224 |
0 |
224 |
|
| 224 |
|
| if @$ast != keys(%fragments) + @operations; |
| 225 |
58 |
| my $operation = _get_operation($operation_name, \@operations); |
| 226 |
|
| { |
| 227 |
|
| schema => $schema, |
| 228 |
|
| fragments => \%fragments, |
| 229 |
|
| root_value => $root_value, |
| 230 |
|
| context_value => $context_value, |
| 231 |
|
| operation => $operation, |
| 232 |
|
| variable_values => _variables_apply_defaults( |
| 233 |
|
| $schema, |
| 234 |
|
| $operation->{variables} || {}, |
| 235 |
58 |
▶ | $variable_values || {}, |
Condition100%7/7
$operation->{'variables'} || {}
$field_resolver || \&GraphQL::Execution::_default_field_resolver
MC/DC100%1/1
$operation->{'variables'} || {}
$operation->{'variables'}
MC/DC100%1/1
$variable_values || {}
$variable_values
MC/DC100%1/1
$field_resolver || \&GraphQL::Execution::_default_field_resolver
$field_resolver
Truth table100%2/2
A
A= $operation->{'variables'}
|
| 236 |
|
| ), |
| 237 |
|
| field_resolver => $field_resolver || \&_default_field_resolver, |
| 238 |
|
| promise_code => $promise_code, |
| 239 |
|
| }; |
| 240 |
15 |
▶ | } |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 241 |
|
| |
| 242 |
|
| # takes each operation var: query q(a: String) |
| 243 |
|
| # applies to it supplied variable from web request |
| 244 |
|
| # if none, applies any defaults in the operation var: query q(a: String = "h") |
| 245 |
|
| # converts with graphql_to_perl (which also validates) to Perl values |
| 246 |
|
| # return { varname => { value => ..., type => $type } } |
| 247 |
224 |
▶ | fun _variables_apply_defaults( |
|
Subroutine
_variables_apply_defaults: called CC=9 SCAR=22.4
|
| 248 |
|
| (InstanceOf['GraphQL::Schema']) $schema, |
| 249 |
|
| HashRef $operation_variables, |
| 250 |
|
| HashRef $variable_values, |
| 251 |
58 |
▶ | ) :ReturnType(HashRef) { |
Branch: 5 branches
| Branch | True | False | Total |
| @_ < 3 and Function::Parameters::_croak('Too few arguments for fun _variables_apply_defaults (expected 3, got ' . @_ . ')') |
224 |
0 |
224 |
| @_ > 3 and Function::Parameters::_croak('Too many arguments for fun _variables_apply_defaults (expected 3, got ' . @_ . ')') |
1 |
222 |
223 |
| Type::Tiny::XS::AUTO::TC28($schema) or Function::Parameters::_croak('In fun _variables_apply_defaults: parameter 1 ($schema): ' . ${my $v = bless( {"class" => "GraphQL::Schema","coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 985,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "InstanceOf[\"GraphQL::Schema\"]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","name" => "__ANON__","type_constraints" => [bless( {"class" => "Moo::Object","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_blessed_ref($_[0]) or _failed_check(24, 'Object', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Object","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; builtin::blessed($_);},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 578,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Object","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_blessed_ref($_[1])" : &$maybe_load_modules('Scalar::Util', "Scalar::Util::blessed($_[1])");},"is_object" => 1,"library" => "Types::Standard","name" => "Object","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"uniq" => 24}, 'Type::Tiny' ),"uniq" => 184}, 'Type::Tiny::Class' ),bless( {"class" => "GraphQL::MaybeTypeCheck","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","uniq" => 185}, 'Type::Tiny::Class' )],"uniq" => 186,"xs_sub" => "Type::Tiny::XS::AUTO::TC12"}, 'Type::Tiny::Intersection' ),"uniq" => 150}, 'Type::Tiny::Class' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($schema)) |
14 |
44 |
58 |
| Ref::Util::XS::is_plain_hashref($operation_variables) or Function::Parameters::_croak('In fun _variables_apply_defaults: parameter 2 ($operation_variables): ' . ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($operation_variables)) |
0 |
226 |
226 |
| Ref::Util::XS::is_plain_hashref($variable_values) or Function::Parameters::_croak('In fun _variables_apply_defaults: parameter 3 ($variable_values): ' . ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($variable_values)) |
0 |
226 |
226 |
|
| 252 |
|
| my @bad = grep { |
| 253 |
44 |
| ! lookup_type($operation_variables->{$_}, $schema->name2type)->DOES('GraphQL::Role::Input'); |
| 254 |
|
| } keys %$operation_variables; |
| 255 |
226 |
▶ | die "Variable '\$$bad[0]' is type '@{[ |
Branch: 1 branch
| Branch | True | False | Total |
| if @bad |
226 |
0 |
226 |
|
| 256 |
226 |
| lookup_type($operation_variables->{$bad[0]}, $schema->name2type)->to_string |
| 257 |
|
| ]}' which cannot be used as an input type.\n" if @bad; |
| 258 |
|
| +{ map { |
| 259 |
226 |
| my $opvar = $operation_variables->{$_}; |
| 260 |
226 |
| my $opvar_type = lookup_type($opvar, $schema->name2type); |
| 261 |
226 |
| my $parsed_value; |
| 262 |
226 |
▶ | my $maybe_value = $variable_values->{$_} // $opvar->{default_value}; |
Condition33%1/3
$variable_values->{$_} // $opvar->{"default_value"}
MC/DC0%0/2
$variable_values->{$_} // $opvar->{"default_value"}
$variable_values->{$_}
$opvar->{"default_value"}
Truth table0%0/3
A // B
A= $variable_values->{$_}B= $opvar->{"default_value"}
|
| 263 |
214 |
| eval { $parsed_value = $opvar_type->graphql_to_perl($maybe_value) }; |
| 264 |
12 |
▶ | if ($@) { |
Branch: 1 branch
| Branch | True | False | Total |
| if ($@) |
226 |
0 |
226 |
|
| 265 |
12 |
| my $error = $@; |
| 266 |
1 |
| $error =~ s#\s+at.*line\s+\d+\.#.#; |
| 267 |
|
| # JSON cannot encode scalar references |
| 268 |
198 |
| my $jsonable = _coerce_for_error($maybe_value); |
| 269 |
198 |
| die "Variable '\$$_' got invalid value @{[$JSON->canonical->encode($jsonable)]}.\n$error"; |
| 270 |
|
| } |
| 271 |
198 |
| ($_ => { value => $parsed_value, type => $opvar_type }) |
| 272 |
|
| } keys %$operation_variables }; |
| 273 |
15 |
▶ | } |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 274 |
|
| |
| 275 |
226 |
▶ | fun _get_operation( |
|
Subroutine
_get_operation: called CC=8 SCAR=21.1
|
| 276 |
|
| Maybe[Str] $operation_name, |
| 277 |
|
| ArrayRef[HashRef] $operations, |
| 278 |
198 |
▶ | ) { |
Branch: 4 branches
| Branch | True | False | Total |
| @_ < 2 and Function::Parameters::_croak('Too few arguments for fun _get_operation (expected 2, got ' . @_ . ')') |
214 |
12 |
226 |
| @_ > 2 and Function::Parameters::_croak('Too many arguments for fun _get_operation (expected 2, got ' . @_ . ')') |
1 |
213 |
214 |
| Type::Tiny::XS::AUTO::TC15($operation_name) or Function::Parameters::_croak('In fun _get_operation: parameter 1 ($operation_name): ' . ${my $v = bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; my $value = shift(); return !0 unless defined $value; return $param->check($value);},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/x86_64-linux/Function/Parameters.pm","line" => 98,"package" => "Function::Parameters"},"deprecated" => !!0,"display_name" => "Maybe[Str]","inlined" => sub { package Types::Standard; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $param_check = $param->inline_check($v); "!defined($v) or $param_check";},"name" => "__ANON__","parameters" => [bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Str","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref \$_ eq 'SCALAR' or ref \(my $val = $_) eq 'SCALAR';},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 291,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Str","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; use warnings; use strict; $Type::Tiny::AvoidCallbacks ? goto $orig_inlined : "$xsubname($_[1])";},"library" => "Types::Standard","name" => "Str","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and not ref $_[0] or _failed_check(8, 'Value', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Value","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; not ref $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 276,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Value","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1]) and not ref($_[1])";},"library" => "Types::Standard","name" => "Value","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 8}, 'Type::Tiny' ),"sorter" => sub { package Types::Standard; no warnings; use strict; $_[0] cmp $_[1];},"type_default" => sub { package Types::Standard; no warnings; use strict; return '';},"uniq" => 9}, 'Type::Tiny' )],"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Maybe","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; return $param->coercion;},"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Maybe') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Maybe', \@_, 1); my $param = Types::TypeTiny::to_TypeTiny(shift()); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to Maybe[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my @xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); push @xsub, Type::Tiny::XS::get_coderef_for("Maybe[$paramname]") if $paramname }; return sub { my $value = shift(); return !0 unless defined $value; return $param->check($value); } , @xsub;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return [sprintf('%s is defined', Type::Tiny::_dd($value)), sprintf('"%s" constrains the value with "%s" if it is defined', $type, $param), @{$param->validate_explain($value, $varname);}];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 657,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Maybe","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $param = shift(); my $param_compiled_check = $param->compiled_check; my $xsubname; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("Maybe[$paramname]") }; return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $param_check = $param->inline_check($v); "!defined($v) or $param_check"; } ;},"library" => "Types::Standard","name" => "Maybe","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; $_[0]->type_default or $Type::Tiny::parameterize_type->type_default;},"uniq" => 25}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 116}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"coercion"}{"type_constraint"} = $v->{"parameters"}[0];$v->{"parameters"}[0]{"compiled_type_constraint"} = $v->{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"};$v->{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"type_default"} = $v->{"parameters"}[0]{"type_default"}; \$v}->get_message($operation_name)) |
11 |
1 |
12 |
| Type::Tiny::XS::AUTO::TC1($operations) or Function::Parameters::_croak('In fun _get_operation: parameter 2 ($operations): ' . ${my $v = bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 92,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "ArrayRef[HashRef]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}';},"name" => "__ANON__","parameters" => [bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' )],"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_arrayref($_[0]) or _failed_check(21, 'ArrayRef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_ArrayRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, @new) = ($_, 0);'; push @code, 'for (@$orig) {'; push @code, sprintf('++$return_orig && last unless (%s);', $coercable_item->inline_check('$_')); push @code, sprintf('push @new, (%s);', $param->coercion->inline_coercion('$_')); push @code, '}'; push @code, '$return_orig ? $orig : \\@new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my @new; foreach my $item (@$value) { return $value unless $coercable_item->check($item); push @new, $param->coerce($item); } return \@new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'ARRAY';},"constraint_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; return &Types::Standard::ArrayRef() unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'ArrayRef', \@_, 3); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to ArrayRef[`a] expected to be a type constraint; got $param"; my($min, $max) = (0, -1); $min = Types::Standard::assert_Int(shift()) if @_; $max = Types::Standard::assert_Int(shift()) if @_; my $param_compiled_check = $param->compiled_check; my $xsub; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("ArrayRef[$paramname]") if $paramname; } elsif (&Type::Tiny::_USE_MOUSE() and $param->_has_xsub and $min == 0 and $max == -1) { require Mouse::Util::TypeConstraints; my $maker = 'Mouse::Util::TypeConstraints'->can('_parameterize_ArrayRef_for'); $xsub = &$maker($param) if $maker; } return sub { my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0; } , $xsub if $min == 0 and $max == -1; return sub { my $array = shift(); return if @$array < $min; ($param->check($_) or return) foreach (@$array); return !0; } if $max == -1; return sub { my $array = shift(); return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } if $min == 0; return sub { my $array = shift(); return if @$array < $min; return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } ;},"deep_explanation" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; my($min, $max) = (0, -1); $min = $type->parameters->[1] if @{$type->parameters;} > 1; $max = $type->parameters->[2] if @{$type->parameters;} > 2; if ($min != 0 and @$value < $min) { return [sprintf('"%s" constrains array length at least %s', $type, $min), sprintf('@{%s} is %d', $varname, scalar @$value)]; } if ($max > 0 and @$value > $max) { return [sprintf('"%s" constrains array length at most %d', $type, $max), sprintf('@{%s} is %d', $varname, scalar @$value)]; } foreach my $i (0 .. $value->$#*) { my $item = $value->[$i]; next if $param->check($item); return [sprintf('"%s" constrains each value in the array with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->[%d]', $varname, $i));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 523,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "ArrayRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $param = shift(); my($min, $max) = (0, -1); $min = shift() if @_; $max = shift() if @_; my $param_compiled_check = $param->compiled_check; my $xsubname; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("ArrayRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_arrayref($_[1])" : "ref($_[1]) eq 'ARRAY'";},"library" => "Types::Standard","name" => "ArrayRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return [];},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 21}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 44}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"coercion"}{"type_constraint"} = $v->{"parameters"}[0];$v->{"parameters"}[0]{"compiled_type_constraint"} = $v->{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"};$v->{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"};$v->{"type_default"} = $v->{"parent"}{"type_default"}; \$v}->get_message($operations)) |
0 |
198 |
198 |
|
| 279 |
198 |
| DEBUG and _debug('_get_operation', @_); |
| 280 |
198 |
▶ | if (!$operation_name) { |
Branch: 1 branch
| Branch | True | False | Total |
| unless ($operation_name) |
0 |
198 |
198 |
|
| 281 |
198 |
▶ | die "Must provide operation name if query contains multiple operations.\n" |
Branch: 1 branch
| Branch | True | False | Total |
| if @$operations > 1 |
198 |
0 |
198 |
|
| 282 |
|
| if @$operations > 1; |
| 283 |
198 |
| return $operations->[0]; |
| 284 |
|
| } |
| 285 |
198 |
| my @matching = grep $_->{name} eq $operation_name, @$operations; |
| 286 |
198 |
▶ | return $matching[0] if @matching == 1; |
Branch: 1 branch
| Branch | True | False | Total |
| if @matching == 1 |
198 |
0 |
198 |
|
| 287 |
196 |
| die "No operations matching '$operation_name' found.\n"; |
| 288 |
|
| } |
| 289 |
|
| |
| 290 |
198 |
▶ | fun _execute_operation( |
|
Subroutine
_execute_operation: called CC=10 SCAR=24.0
|
| 291 |
|
| HashRef $context, |
| 292 |
|
| HashRef $operation, |
| 293 |
|
| Any $root_value, |
| 294 |
0 |
▶ | ) :ReturnType(ExecutionPartialResult | Promise) { |
Branch: 4 branches
| Branch | True | False | Total |
| @_ < 3 and Function::Parameters::_croak('Too few arguments for fun _execute_operation (expected 3, got ' . @_ . ')') |
0 |
198 |
198 |
| @_ > 3 and Function::Parameters::_croak('Too many arguments for fun _execute_operation (expected 3, got ' . @_ . ')') |
7 |
191 |
198 |
| Ref::Util::XS::is_plain_hashref($context) or Function::Parameters::_croak('In fun _execute_operation: parameter 1 ($context): ' . ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($context)) |
158 |
38 |
196 |
| Ref::Util::XS::is_plain_hashref($operation) or Function::Parameters::_croak('In fun _execute_operation: parameter 2 ($operation): ' . ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($operation)) |
2 |
196 |
198 |
|
| 295 |
784 |
▶ | my $op_type = $operation->{operationType} || 'query'; |
Condition33%1/3
$operation->{'operationType'} || 'query'
MC/DC0%0/1
$operation->{'operationType'} || 'query'
$operation->{'operationType'}
Truth table0%0/2
A
A= $operation->{'operationType'}
|
| 296 |
784 |
| my $type = $context->{schema}->$op_type; |
| 297 |
784 |
▶ | return _wrap_error("No $op_type in schema") if !$type; |
Branch: 1 branch
| Branch | True | False | Total |
| unless $type |
0 |
784 |
784 |
|
| 298 |
|
| my ($fields) = $type->_collect_fields( |
| 299 |
|
| $context, |
| 300 |
|
| $operation->{selections}, |
| 301 |
784 |
| [[], {}], |
| 302 |
|
| {}, |
| 303 |
|
| ); |
| 304 |
784 |
| DEBUG and _debug('_execute_operation(fields)', $fields, $root_value); |
| 305 |
784 |
| my $path = []; |
| 306 |
725 |
▶ | my $execute = $op_type eq 'mutation' |
Branch: 1 branch
| Branch | True | False | Total |
| $op_type eq 'mutation' ? : |
0 |
784 |
784 |
|
| 307 |
|
| ? \&_execute_fields_serially : \&_execute_fields; |
| 308 |
725 |
| my $result = eval { |
| 309 |
725 |
| my $result = $execute->($context, $type, $root_value, $path, $fields); |
| 310 |
725 |
▶ | return $result if !is_Promise($result); |
Branch: 1 branch
| Branch | True | False | Total |
| unless is_Promise($result) |
784 |
0 |
784 |
|
| 311 |
0 |
▶ | $result->then(undef, sub { |
|
Subroutine
__ANON__: not called CC=1 SCAR=0.0
|
| 312 |
|
| $context->{promise_code}{resolve}->( |
| 313 |
725 |
| +{ data => undef, %{_wrap_error($_[0])} } |
| 314 |
|
| ); |
| 315 |
725 |
| }); |
| 316 |
|
| }; |
| 317 |
725 |
▶ | return _wrap_error($@) if $@; |
Branch: 1 branch
| Branch | True | False | Total |
| if $@ |
784 |
0 |
784 |
|
| 318 |
725 |
| $result; |
| 319 |
15 |
▶ | } |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 320 |
|
| |
| 321 |
784 |
▶ | fun _execute_fields( |
|
Subroutine
_execute_fields: called CC=27 SCAR=33.8
|
| 322 |
|
| HashRef $context, |
| 323 |
|
| (InstanceOf['GraphQL::Type']) $parent_type, |
| 324 |
|
| Any $root_value, |
| 325 |
|
| ArrayRef $path, |
| 326 |
|
| FieldsGot $fields, |
| 327 |
2099 |
▶ | ) :ReturnType(ExecutionPartialResult | Promise) { |
Branch: 6 branches
| Branch | True | False | Total |
| @_ < 5 and Function::Parameters::_croak('Too few arguments for fun _execute_fields (expected 5, got ' . @_ . ')') |
784 |
0 |
784 |
| @_ > 5 and Function::Parameters::_croak('Too many arguments for fun _execute_fields (expected 5, got ' . @_ . ')') |
784 |
0 |
784 |
| Ref::Util::XS::is_plain_hashref($context) or Function::Parameters::_croak('In fun _execute_fields: parameter 1 ($context): ' . ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($context)) |
0 |
725 |
725 |
| Type::Tiny::XS::AUTO::TC9($parent_type) or Function::Parameters::_croak('In fun _execute_fields: parameter 2 ($parent_type): ' . ${my $v = bless( {"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"class" => "GraphQL::Type","coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 985,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "InstanceOf[\"GraphQL::Type\"]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Method/Generate/Accessor.pm","line" => 716,"package" => "Method::Generate::Accessor"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","name" => "__ANON__","type_constraints" => [bless( {"class" => "Moo::Object","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Method/Generate/Accessor.pm","line" => 716,"package" => "Method::Generate::Accessor"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_blessed_ref($_[0]) or _failed_check(24, 'Object', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Object","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; builtin::blessed($_);},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 578,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Object","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_blessed_ref($_[1])" : &$maybe_load_modules('Scalar::Util', "Scalar::Util::blessed($_[1])");},"is_object" => 1,"library" => "Types::Standard","name" => "Object","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"uniq" => 24}, 'Type::Tiny' ),"uniq" => 103}, 'Type::Tiny::Class' ),bless( {"class" => "GraphQL::MaybeTypeCheck","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Method/Generate/Accessor.pm","line" => 716,"package" => "Method::Generate::Accessor"},"deprecated" => !!0,"inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","uniq" => 104}, 'Type::Tiny::Class' )],"uniq" => 105,"xs_sub" => "Type::Tiny::XS::AUTO::TC12"}, 'Type::Tiny::Intersection' ),"uniq" => 101}, 'Type::Tiny::Class' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($parent_type)) |
0 |
725 |
725 |
| Ref::Util::XS::is_plain_arrayref($path) or Function::Parameters::_croak('In fun _execute_fields: parameter 4 ($path): ' . ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_arrayref($_[0]) or _failed_check(21, 'ArrayRef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_ArrayRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, @new) = ($_, 0);'; push @code, 'for (@$orig) {'; push @code, sprintf('++$return_orig && last unless (%s);', $coercable_item->inline_check('$_')); push @code, sprintf('push @new, (%s);', $param->coercion->inline_coercion('$_')); push @code, '}'; push @code, '$return_orig ? $orig : \\@new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my @new; foreach my $item (@$value) { return $value unless $coercable_item->check($item); push @new, $param->coerce($item); } return \@new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'ARRAY';},"constraint_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; return &Types::Standard::ArrayRef() unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'ArrayRef', \@_, 3); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to ArrayRef[`a] expected to be a type constraint; got $param"; my($min, $max) = (0, -1); $min = Types::Standard::assert_Int(shift()) if @_; $max = Types::Standard::assert_Int(shift()) if @_; my $param_compiled_check = $param->compiled_check; my $xsub; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("ArrayRef[$paramname]") if $paramname; } elsif (&Type::Tiny::_USE_MOUSE() and $param->_has_xsub and $min == 0 and $max == -1) { require Mouse::Util::TypeConstraints; my $maker = 'Mouse::Util::TypeConstraints'->can('_parameterize_ArrayRef_for'); $xsub = &$maker($param) if $maker; } return sub { my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0; } , $xsub if $min == 0 and $max == -1; return sub { my $array = shift(); return if @$array < $min; ($param->check($_) or return) foreach (@$array); return !0; } if $max == -1; return sub { my $array = shift(); return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } if $min == 0; return sub { my $array = shift(); return if @$array < $min; return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } ;},"deep_explanation" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; my($min, $max) = (0, -1); $min = $type->parameters->[1] if @{$type->parameters;} > 1; $max = $type->parameters->[2] if @{$type->parameters;} > 2; if ($min != 0 and @$value < $min) { return [sprintf('"%s" constrains array length at least %s', $type, $min), sprintf('@{%s} is %d', $varname, scalar @$value)]; } if ($max > 0 and @$value > $max) { return [sprintf('"%s" constrains array length at most %d', $type, $max), sprintf('@{%s} is %d', $varname, scalar @$value)]; } foreach my $i (0 .. $value->$#*) { my $item = $value->[$i]; next if $param->check($item); return [sprintf('"%s" constrains each value in the array with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->[%d]', $varname, $i));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 523,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "ArrayRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $param = shift(); my($min, $max) = (0, -1); $min = shift() if @_; $max = shift() if @_; my $param_compiled_check = $param->compiled_check; my $xsubname; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("ArrayRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_arrayref($_[1])" : "ref($_[1]) eq 'ARRAY'";},"library" => "Types::Standard","name" => "ArrayRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return [];},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 21}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($path)) |
725 |
0 |
725 |
| do {
package Type::Tiny;
Ref::Util::XS::is_plain_arrayref($fields) and @{$fields;} == 2 and do {
Ref::Util::XS::is_plain_arrayref($fields->[0]) and do {
my $ok = 1;
foreach my $i (@{$$fields[0];}) {
$ok = 0, last unless defined $i and not ref $i and not !($i =~ qr/(?^u:^[_a-zA-Z][_a-zA-Z0-9]*$)/u);
};
$ok
}
} and do {
Ref::Util::XS::is_plain_hashref($fields->[1]) and do {
my $ok = 1;
foreach my $v (values %{$$fields[1];}) {
$ok = 0, last unless Type::Tiny::XS::AUTO::TC1($v);
};
foreach my $k (keys %{$$fields[1];}) {
$ok = 0, last unless defined $k and not ref $k and not !($k =~ qr/(?^u:^[_a-zA-Z][_a-zA-Z0-9]*$)/u);
};
$ok
}
}
} or Function::Parameters::_croak('In fun _execute_fields: parameter 5 ($fields): ' . ${my $v = bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; do { Ref::Util::XS::is_plain_arrayref($_[0]) and @{$_[0];} == 2 and do { Ref::Util::XS::is_plain_arrayref($_[0][0]) and do { my $ok = 1; foreach my $i (@{$_[0][0];}) { $ok = 0, last unless defined $i and not ref $i and not !($i =~ qr/(?^u:^[_a-zA-Z][_a-zA-Z0-9]*$)/); } $ok } } and do { Ref::Util::XS::is_plain_hashref($_[0][1]) and do { my $ok = 1; foreach my $v (values %{$_[0][1];}) { $ok = 0, last unless Type::Tiny::XS::AUTO::TC1($v); } foreach my $k (keys %{$_[0][1];}) { $ok = 0, last unless defined $k and not ref $k and not !($k =~ qr/(?^u:^[_a-zA-Z][_a-zA-Z0-9]*$)/); } $ok } } } or _failed_check(47, 'FieldsGot', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"compiled_type_constraint" => sub ($) { package Eval::TypeTiny::Sandbox; use strict; do { package Type::Tiny; Ref::Util::XS::is_plain_arrayref($_[0]) and @{$_[0];} == 2 and do { Ref::Util::XS::is_plain_arrayref($_[0][0]) and do { my $ok = 1; foreach my $i (@{$_[0][0];}) { $ok = 0, last unless defined $i and not ref $i and not !($i =~ qr/(?^u:^[_a-zA-Z][_a-zA-Z0-9]*$)/); } $ok } } and do { Ref::Util::XS::is_plain_hashref($_[0][1]) and do { my $ok = 1; foreach my $v (values %{$_[0][1];}) { $ok = 0, last unless Type::Tiny::XS::AUTO::TC1($v); } foreach my $k (keys %{$_[0][1];}) { $ok = 0, last unless defined $k and not ref $k and not !($k =~ qr/(?^u:^[_a-zA-Z][_a-zA-Z0-9]*$)/); } $ok } } };},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 92,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "FieldsGot","exception_class" => "Error::TypeTiny::Assertion","library" => "GraphQL::Type::Library","name" => "FieldsGot","parent" => bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard::Tuple; no warnings; use strict; my $value = $_[0]; if ($#constraints < $value->$#*) { return !1 unless $slurpy; my $tmp; if ($slurp_hash) { ($value->$#* - $#constraints + 1) % 2 or return; $tmp = {@$value[$#constraints + 1 .. $value->$#*]}; $slurpy->check($tmp) or return; } elsif (not $slurp_any) { $tmp = [@$value[$#constraints + 1 .. $value->$#*]]; $slurpy->check($tmp) or return; } } foreach my $i (0 .. $#constraints) { $i > $value->$#* and return !!$is_optional[$i]; $constraints[$i]->check($value->[$i]) or return !1; } return !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 92,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "Tuple[ArrayRef[StrNameValid],Map[StrNameValid,ArrayRef[HashRef]]]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard::Tuple; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; join ' and ', &Types::Standard::ArrayRef()->inline_check($v), scalar @constraints == $min && !$slurpy ? "\@{$v} == $min" : sprintf("(\@{$v} == $min or (\@{$v} > $min and \@{$v} <= ${\(1 + $#constraints);}) or (\@{$v} > ${\(1 + $#constraints);} and %s))", $slurpy_any ? '!!1' : ($slurpy ? sprintf($tmpl, $v, $#constraints + 1, $v, $slurpy->inline_check('$tmp')) : sprintf("\@{$v} <= %d", scalar @constraints))), map({my $inline = $constraints[$_]->inline_check("$v->[$_]"); $inline eq '(!!1)' ? () : $is_optional[$_] ? sprintf('(@{%s} <= %d or %s)', $v, $_, $inline) : $inline;} 0 .. $#constraints);},"name" => "__ANON__","parameters" => [bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"compiled_type_constraint" => sub ($) { package Eval::TypeTiny::Sandbox; use strict; do { package Type::Tiny; Ref::Util::XS::is_plain_arrayref($_[0]) and do { my $ok = 1; foreach my $i (@{$_[0];}) { $ok = 0, last unless defined $i and not ref $i and not !($i =~ qr/(?^u:^[_a-zA-Z][_a-zA-Z0-9]*$)/); } $ok } };},"constraint" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 92,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "ArrayRef[StrNameValid]","inlined" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}';},"name" => "__ANON__","parameters" => [bless( {"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"compiled_type_constraint" => sub ($) { package Eval::TypeTiny::Sandbox; use strict; defined $_[0] and not ref $_[0] and not !($_[0] =~ qr/(?^u:^[_a-zA-Z][_a-zA-Z0-9]*$)/);},"constraint" => do{my $o},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 42,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "StrNameValid","exception_class" => "Error::TypeTiny::Assertion","library" => "GraphQL::Type::Library","name" => "StrNameValid","parent" => bless( {"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"frozen" => 1,"name" => "__ANON__","type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard::StrMatch; no warnings; use strict; my $value = shift(); defined $value and not ref $value and not !($value =~ /$regexp/);},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 42,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "StrMatch[(?^u:^[_a-zA-Z][_a-zA-Z0-9]*\$)]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard::StrMatch; no warnings; use strict; my $v = $_[1]; if ($Type::Tiny::AvoidCallbacks and $serialized_re =~ /Types::Standard::StrMatch::expressions/) { require Carp; Carp::carp('Cannot serialize regexp without callbacks; serializing using callbacks'); } "defined($v) and !ref($v) and !!( $v =~ $serialized_re )";},"name" => "__ANON__","parameters" => [qr/^[_a-zA-Z][_a-zA-Z0-9]*$/u],"parent" => bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Type::Tiny::XS::Str($_[0]) or _failed_check(33, 'StrMatch', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_StrMatch","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"constraint_generator" => sub { package Types::Standard::StrMatch; no warnings; use strict; return 'Types::Standard'->meta->get_type('StrMatch') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'StrMatch', \@_, 2, 1); my($regexp, $checker) = @_; &Types::Standard::is_RegexpRef($regexp) or _croak "First parameter to StrMatch[`a] expected to be a Regexp; got $regexp"; if (@_ > 1) { $checker = Types::TypeTiny::to_TypeTiny($checker); Types::TypeTiny::is_TypeTiny($checker) or _croak "Second parameter to StrMatch[`a] expected to be a type constraint; got $checker"; } $checker ? sub { my $value = shift(); return unless defined $value; return if ref $value; my(@m) = $value =~ /$regexp/; $checker->check(\@m); } : sub { my $value = shift(); defined $value and not ref $value and not !($value =~ /$regexp/); } ;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 902,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "StrMatch","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::StrMatch; no warnings; use strict; require B; my($regexp, $checker) = @_; my $serialized_re = $regexp->$serialize_regexp or return; if ($checker) { return unless $checker->can_be_inlined; return sub { my $v = $_[1]; if ($Type::Tiny::AvoidCallbacks and $serialized_re =~ /Types::Standard::StrMatch::expressions/) { require Carp; Carp::carp('Cannot serialize regexp without callbacks; serializing using callbacks'); } sprintf "defined($v) and !ref($v) and do { my \$m = [$v =~ %s]; %s }", $serialized_re, $checker->inline_check('$m'); } ; } else { my $regexp_string = "$regexp"; if ($regexp_string =~ /\A\(\?\^u?:\\A(\.+)\)\z/) { my $length = length $1; return sub { "defined($_) and !ref($_) and length($_)>=$length"; } ; } if ($regexp_string =~ /\A\(\?\^u?:\\A(\.+)\\z\)\z/) { my $length = length $1; return sub { "defined($_) and !ref($_) and length($_)==$length"; } ; } return sub { my $v = $_[1]; if ($Type::Tiny::AvoidCallbacks and $serialized_re =~ /Types::Standard::StrMatch::expressions/) { require Carp; Carp::carp('Cannot serialize regexp without callbacks; serializing using callbacks'); } "defined($v) and !ref($v) and !!( $v =~ $serialized_re )"; } ; }},"library" => "Types::Standard","name" => "StrMatch","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Str","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref \$_ eq 'SCALAR' or ref \(my $val = $_) eq 'SCALAR';},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 291,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Str","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; use warnings; use strict; $Type::Tiny::AvoidCallbacks ? goto $orig_inlined : "$xsubname($_[1])";},"library" => "Types::Standard","name" => "Str","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and not ref $_[0] or _failed_check(8, 'Value', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Value","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; not ref $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 276,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Value","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1]) and not ref($_[1])";},"library" => "Types::Standard","name" => "Value","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 8}, 'Type::Tiny' ),"sorter" => sub { package Types::Standard; no warnings; use strict; $_[0] cmp $_[1];},"type_default" => sub { package Types::Standard; no warnings; use strict; return '';},"uniq" => 9}, 'Type::Tiny' ),"uniq" => 33}, 'Type::Tiny' ),"uniq" => 40}, 'Type::Tiny' ),"uniq" => 41}, 'Type::Tiny' )],"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_arrayref($_[0]) or _failed_check(21, 'ArrayRef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_ArrayRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, @new) = ($_, 0);'; push @code, 'for (@$orig) {'; push @code, sprintf('++$return_orig && last unless (%s);', $coercable_item->inline_check('$_')); push @code, sprintf('push @new, (%s);', $param->coercion->inline_coercion('$_')); push @code, '}'; push @code, '$return_orig ? $orig : \\@new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my @new; foreach my $item (@$value) { return $value unless $coercable_item->check($item); push @new, $param->coerce($item); } return \@new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'ARRAY';},"constraint_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; return &Types::Standard::ArrayRef() unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'ArrayRef', \@_, 3); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to ArrayRef[`a] expected to be a type constraint; got $param"; my($min, $max) = (0, -1); $min = Types::Standard::assert_Int(shift()) if @_; $max = Types::Standard::assert_Int(shift()) if @_; my $param_compiled_check = $param->compiled_check; my $xsub; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("ArrayRef[$paramname]") if $paramname; } elsif (&Type::Tiny::_USE_MOUSE() and $param->_has_xsub and $min == 0 and $max == -1) { require Mouse::Util::TypeConstraints; my $maker = 'Mouse::Util::TypeConstraints'->can('_parameterize_ArrayRef_for'); $xsub = &$maker($param) if $maker; } return sub { my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0; } , $xsub if $min == 0 and $max == -1; return sub { my $array = shift(); return if @$array < $min; ($param->check($_) or return) foreach (@$array); return !0; } if $max == -1; return sub { my $array = shift(); return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } if $min == 0; return sub { my $array = shift(); return if @$array < $min; return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } ;},"deep_explanation" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; my($min, $max) = (0, -1); $min = $type->parameters->[1] if @{$type->parameters;} > 1; $max = $type->parameters->[2] if @{$type->parameters;} > 2; if ($min != 0 and @$value < $min) { return [sprintf('"%s" constrains array length at least %s', $type, $min), sprintf('@{%s} is %d', $varname, scalar @$value)]; } if ($max > 0 and @$value > $max) { return [sprintf('"%s" constrains array length at most %d', $type, $max), sprintf('@{%s} is %d', $varname, scalar @$value)]; } foreach my $i (0 .. $value->$#*) { my $item = $value->[$i]; next if $param->check($item); return [sprintf('"%s" constrains each value in the array with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->[%d]', $varname, $i));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 523,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "ArrayRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $param = shift(); my($min, $max) = (0, -1); $min = shift() if @_; $max = shift() if @_; my $param_compiled_check = $param->compiled_check; my $xsubname; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("ArrayRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_arrayref($_[1])" : "ref($_[1]) eq 'ARRAY'";},"library" => "Types::Standard","name" => "ArrayRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => {},"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return [];},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 21}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 43}, 'Type::Tiny' ),bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"compiled_type_constraint" => sub ($) { package Eval::TypeTiny::Sandbox; use strict; do { package Type::Tiny; Ref::Util::XS::is_plain_hashref($_[0]) and do { my $ok = 1; foreach my $v (values %{$_[0];}) { $ok = 0, last unless Type::Tiny::XS::AUTO::TC1($v); } foreach my $k (keys %{$_[0];}) { $ok = 0, last unless defined $k and not ref $k and not !($k =~ qr/(?^u:^[_a-zA-Z][_a-zA-Z0-9]*$)/); } $ok } };},"constraint" => sub { package Types::Standard::Map; no warnings; use strict; my $hash = shift(); ($keys->check($_) or return) foreach (keys %$hash); ($values->check($_) or return) foreach (values %$hash); return !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 92,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "Map[StrNameValid,ArrayRef[HashRef]]","inlined" => sub { package Types::Standard::Map; no warnings; use strict; my $h = $_[1]; return "$xsubname($h)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($h); my $k_check = $k->inline_check('$k'); my $v_check = $v->inline_check('$v'); "$p and do { " . 'my $ok = 1; ' . "for my \$v (values %{$h}) { " . "(\$ok = 0, last) unless $v_check " . '}; ' . "for my \$k (keys %{$h}) { " . "(\$ok = 0, last) unless $k_check " . '}; ' . '$ok ' . '}';},"name" => "__ANON__","parameters" => [{},bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 92,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "ArrayRef[HashRef]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}';},"name" => "__ANON__","parameters" => [bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' )],"parent" => {},"type_default" => do{my $o},"uniq" => 44}, 'Type::Tiny' )],"parent" => bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_hashref($_[0]) or _failed_check(26, 'Map', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Map","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::Map; no warnings; use strict; my($parent, $child, $kparam, $vparam) = @_; return unless $kparam->has_coercion or $vparam->has_coercion; my $kcoercable_item = $kparam->has_coercion ? $kparam->coercion->_source_type_union : $kparam; my $vcoercable_item = $vparam->has_coercion ? $vparam->coercion->_source_type_union : $vparam; my $C = 'Type::Coercion'->new('type_constraint', $child); if (!$kparam->has_coercion || $kparam->coercion->can_be_inlined and !$vparam->has_coercion || $vparam->coercion->can_be_inlined and $kcoercable_item->can_be_inlined and $vcoercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('++$return_orig && last unless (%s);', $kcoercable_item->inline_check('$_')); push @code, sprintf('++$return_orig && last unless (%s);', $vcoercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{(%s)} = (%s);', $kparam->has_coercion ? $kparam->coercion->inline_coercion('$_') : '$_', $vparam->has_coercion ? $vparam->coercion->inline_coercion('$orig->{$_}') : '$orig->{$_}'); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $kcoercable_item->check($k) and $vcoercable_item->check($value->{$k}); $new{$kparam->has_coercion ? $kparam->coerce($k) : $k} = $vparam->has_coercion ? $vparam->coerce($value->{$k}) : $value->{$k}; } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"constraint_generator" => sub { package Types::Standard::Map; no warnings; use strict; return $meta->get_type('Map') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Map', \@_, 2, 2); my($keys, $values) = @_; Types::TypeTiny::is_TypeTiny($keys) or _croak "First parameter to Map[`k,`v] expected to be a type constraint; got $keys"; Types::TypeTiny::is_TypeTiny($values) or _croak "Second parameter to Map[`k,`v] expected to be a type constraint; got $values"; my @xsub; do { my(@known) = map({my $known = Type::Tiny::XS::is_known($_->compiled_check); defined $known ? $known : ();} $keys, $values); if (@known == 2) { my $xsub = Type::Tiny::XS::get_coderef_for(sprintf('Map[%s,%s]', @known)); push @xsub, $xsub if $xsub; } }; sub { my $hash = shift(); ($keys->check($_) or return) foreach (keys %$hash); ($values->check($_) or return) foreach (values %$hash); return !0; } , @xsub;},"deep_explanation" => sub { package Types::Standard::Map; no warnings; use strict; require B; my($type, $value, $varname) = @_; my($kparam, $vparam) = @{$type->parameters;}; foreach my $k (sort keys %$value) { unless ($kparam->check($k)) { return [sprintf('"%s" constrains each key in the hash with "%s"', $type, $kparam), @{$kparam->validate_explain($k, sprintf('key %s->{%s}', $varname, B::perlstring($k)));}]; } unless ($vparam->check($value->{$k})) { return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $vparam), @{$vparam->validate_explain($value->{$k}, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 675,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Map","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::Map; no warnings; use strict; my($k, $v) = @_; return unless $k->can_be_inlined and $v->can_be_inlined; my $xsubname; do { my(@known) = map({my $known = Type::Tiny::XS::is_known($_->compiled_check); defined $known ? $known : ();} $k, $v); if (@known == 2) { $xsubname = Type::Tiny::XS::get_subname_for(sprintf('Map[%s,%s]', @known)); } }; return sub { my $h = $_[1]; return "$xsubname($h)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($h); my $k_check = $k->inline_check('$k'); my $v_check = $v->inline_check('$v'); "$p and do { " . 'my $ok = 1; ' . "for my \$v (values %{$h}) { " . "(\$ok = 0, last) unless $v_check " . '}; ' . "for my \$k (keys %{$h}) { " . "(\$ok = 0, last) unless $k_check " . '}; ' . '$ok ' . '}'; } ;},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::Map; no warnings; use strict; my $self = shift(); my($key) = @_; return Types::Standard::is_Str($key) if $self == &Types::Standard::Map(); my $map = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::Map(); } ); my($kcheck, $vcheck) = @{$map->parameters;}; ($kcheck || &Types::Standard::Any())->check($key);},"hashref_allows_value" => sub { package Types::Standard::Map; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::Map(); my $map = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::Map(); } ); my($kcheck, $vcheck) = @{$map->parameters;}; ($kcheck || &Types::Standard::Any())->check($key) and ($vcheck || &Types::Standard::Any())->check($value);}},"name" => "Map","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default;},"uniq" => 26}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 45}, 'Type::Tiny' )],"parent" => bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_arrayref($_[0]) or _failed_check(29, 'Tuple', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Tuple","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::Tuple; no warnings; use strict; my($parent, $child, @tuple) = @_; my $slurpy = @tuple && Types::TypeTiny::is_TypeTiny($tuple[-1]) && $tuple[-1]->is_strictly_a_type_of($_Slurpy) ? pop @tuple : undef; my $child_coercions_exist = 0; my $all_inlinable = 1; foreach my $tc (@tuple, $slurpy ? $slurpy : ()) { $all_inlinable = 0 unless $tc->can_be_inlined; $all_inlinable = 0 if $tc->has_coercion and not $tc->coercion->can_be_inlined; ++$child_coercions_exist if $tc->has_coercion; } return unless $child_coercions_exist; my $C = 'Type::Coercion'->new('type_constraint', $child); my $slurpy_is_hashref = $slurpy && $slurpy->my_slurp_into eq 'HASH'; if ($all_inlinable) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my $label = sprintf('TUPLELABEL%d', ++$label_counter); my @code; push @code, 'do { my ($orig, $return_orig, $tmp, @new) = ($_, 0);'; push @code, "${label}: {"; push @code, sprintf('(($return_orig = 1), last %s) if @$orig > %d;', $label, scalar @tuple) unless $slurpy; foreach my $i (0 .. $#tuple) { my $ct = $tuple[$i]; my $ct_coerce = $ct->has_coercion; my $ct_optional = $ct->is_a_type_of(&Types::Standard::Optional()); push @code, sprintf('if (@$orig > %d) { $tmp = %s; (%s) ? ($new[%d]=$tmp) : (($return_orig=1), last %s) }', $i, $ct_coerce ? $ct->coercion->inline_coercion("\$orig->[$i]") : "\$orig->[$i]", $ct->inline_check('$tmp'), $i, $label); } if ($slurpy) { my $size = @tuple; push @code, sprintf('if (@$orig > %d) {', $size); push @code, sprintf($slurpy_is_hashref ? 'my $tail = do { no warnings; +{ @{$orig}[%d .. $#$orig]} };' : 'my $tail = [ @{$orig}[%d .. $#$orig] ];', $size); push @code, $slurpy->has_coercion ? sprintf('$tail = %s;', $slurpy->coercion->inline_coercion('$tail')) : ''; push @code, sprintf('(%s) ? push(@new, %s$tail) : ($return_orig++);', $slurpy->inline_check('$tail'), $slurpy_is_hashref ? '%' : '@'); push @code, '}'; } push @code, '}'; push @code, '$return_orig ? $orig : \\@new'; push @code, '}'; join $", @code; } )); } else { my(@is_optional) = map((!!$_->is_strictly_a_type_of($_Optional)), @tuple); $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; if (not $slurpy and @$value > @tuple) { return $value; } my @new; foreach my $i (0 .. $#tuple) { return \@new if $i > $value->$#* and $is_optional[$i]; my $ct = $tuple[$i]; my $x = $ct->has_coercion ? $ct->coerce($value->[$i]) : $value->[$i]; return $value unless $ct->check($x); $new[$i] = $x; } if ($slurpy and @$value > @tuple) { my $tmp = $slurpy_is_hashref ? {@{$value;}[@tuple .. $value->$#*]} : [@{$value;}[@tuple .. $value->$#*]]; $tmp = $slurpy->coerce($tmp) if $slurpy->has_coercion; $slurpy->check($tmp) ? push(@new, $slurpy_is_hashref ? %$tmp : @$tmp) : (return $value); } return \@new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"constraint_generator" => sub { package Types::Standard::Tuple; no warnings; use strict; my $slurpy = @_ && Types::TypeTiny::is_TypeTiny($_[-1]) && $_[-1]->is_strictly_a_type_of($_Slurpy) ? pop() : undef; my(@constraints) = @_; foreach $_ (@constraints) { Types::TypeTiny::is_TypeTiny($_) or _croak "Parameters to Tuple[...] expected to be type constraints; got $_"; } my @xsub; unless ($slurpy) { my(@known) = map({my $known; $known = Type::Tiny::XS::is_known($_->compiled_check) unless $_->is_strictly_a_type_of($_Optional); defined $known ? $known : ();} @constraints); if (@known == @constraints) { my $xsub = Type::Tiny::XS::get_coderef_for(sprintf('Tuple[%s]', join(',', @known))); push @xsub, $xsub if $xsub; } } my(@is_optional) = map((!!$_->is_strictly_a_type_of($_Optional)), @constraints); my $slurp_hash = $slurpy && $slurpy->my_slurp_into eq 'HASH'; my $slurp_any = $slurpy && $slurpy->my_unslurpy->equals(&Types::Standard::Any()); my(@sorted_is_optional) = sort(@is_optional); join('|', @sorted_is_optional) eq join('|', @is_optional) or _croak 'Optional parameters to Tuple[...] cannot precede required parameters'; sub { my $value = $_[0]; if ($#constraints < $value->$#*) { return !1 unless $slurpy; my $tmp; if ($slurp_hash) { ($value->$#* - $#constraints + 1) % 2 or return; $tmp = {@$value[$#constraints + 1 .. $value->$#*]}; $slurpy->check($tmp) or return; } elsif (not $slurp_any) { $tmp = [@$value[$#constraints + 1 .. $value->$#*]]; $slurpy->check($tmp) or return; } } foreach my $i (0 .. $#constraints) { $i > $value->$#* and return !!$is_optional[$i]; $constraints[$i]->check($value->[$i]) or return !1; } return !0; } , @xsub;},"deep_explanation" => sub { package Types::Standard::Tuple; no warnings; use strict; my($type, $value, $varname) = @_; my(@constraints) = @{$type->parameters;}; my $slurpy = @constraints && Types::TypeTiny::is_TypeTiny($constraints[-1]) && $constraints[-1]->is_strictly_a_type_of($_Slurpy) ? pop @constraints : undef; @constraints = map(Types::TypeTiny::to_TypeTiny($_), @constraints); if (@constraints < @$value and not $slurpy) { return [sprintf('"%s" expects at most %d values in the array', $type, scalar @constraints), sprintf('%d values found; too many', scalar @$value)]; } foreach my $i (0 .. $#constraints) { next if $constraints[$i]->is_strictly_a_type_of(&Types::Standard::Optional()) and $i > $value->$#*; next if $constraints[$i]->check($value->[$i]); return [sprintf('"%s" constrains value at index %d of array with "%s"', $type, $i, $constraints[$i]), @{$constraints[$i]->validate_explain($value->[$i], sprintf('%s->[%s]', $varname, $i));}]; } if (defined $slurpy) { my $tmp = $slurpy->my_slurp_into eq 'HASH' ? {@$value[$#constraints + 1 .. $value->$#*]} : [@$value[$#constraints + 1 .. $value->$#*]]; $slurpy->check($tmp) or return [sprintf('Array elements from index %d are slurped into a %s which is constrained with "%s"', $#constraints + 1, $slurpy->my_slurp_into eq 'HASH' ? 'hashref' : 'arrayref', $slurpy->my_unslurpy || $slurpy), @{($slurpy->my_unslurpy || $slurpy)->validate_explain($tmp, '$SLURPY');}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 802,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Tuple","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::Tuple; no warnings; use strict; my $slurpy = @_ && Types::TypeTiny::is_TypeTiny($_[-1]) && $_[-1]->is_strictly_a_type_of($_Slurpy) ? pop() : undef; my(@constraints) = @_; return if grep {not $_->can_be_inlined;} @constraints; return if defined $slurpy and not $slurpy->can_be_inlined; my $xsubname; unless ($slurpy) { my(@known) = map({my $known; $known = Type::Tiny::XS::is_known($_->compiled_check) unless $_->is_strictly_a_type_of($_Optional); defined $known ? $known : ();} @constraints); if (@known == @constraints) { $xsubname = Type::Tiny::XS::get_subname_for(sprintf('Tuple[%s]', join(',', @known))); } } my $tmpl = 'do { my $tmp = +[@{%s}[%d..$#{%s}]]; %s }'; my $slurpy_any; if (defined $slurpy) { $tmpl = 'do { my ($orig, $from, $to) = (%s, %d, $#{%s});(($to-$from) %% 2) and do { my $tmp = +{@{$orig}[$from..$to]}; %s }}' if $slurpy->my_slurp_into eq 'HASH'; $slurpy_any = 1 if $slurpy->my_unslurpy->equals(&Types::Standard::Any()); } my(@is_optional) = map((!!$_->is_strictly_a_type_of($_Optional)), @constraints); my $min = 0 + grep((!$_), @is_optional); return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; join ' and ', &Types::Standard::ArrayRef()->inline_check($v), scalar @constraints == $min && !$slurpy ? "\@{$v} == $min" : sprintf("(\@{$v} == $min or (\@{$v} > $min and \@{$v} <= ${\(1 + $#constraints);}) or (\@{$v} > ${\(1 + $#constraints);} and %s))", $slurpy_any ? '!!1' : ($slurpy ? sprintf($tmpl, $v, $#constraints + 1, $v, $slurpy->inline_check('$tmp')) : sprintf("\@{$v} <= %d", scalar @constraints))), map({my $inline = $constraints[$_]->inline_check("$v->[$_]"); $inline eq '(!!1)' ? () : $is_optional[$_] ? sprintf('(@{%s} <= %d or %s)', $v, $_, $inline) : $inline;} 0 .. $#constraints); } ;},"library" => "Types::Standard","name" => "Tuple","name_generator" => sub { package Types::Standard; no warnings; use strict; my($s, @a) = @_; sprintf '%s[%s]', $s, join(',', @a);},"parent" => {},"uniq" => 29}, 'Type::Tiny' ),"uniq" => 46}, 'Type::Tiny' ),"uniq" => 47}, 'Type::Tiny' );$v->{"parent"}{"compiled_type_constraint"} = $v->{"compiled_type_constraint"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"constraint"} = $v->{"constraint"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"compiled_type_constraint"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"compiled_type_constraint"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"constraint"} = $v->{"constraint"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"} = $v->{"constraint"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"constraint"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parameters"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parent"};$v->{"parent"}{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parent"}{"parent"};$v->{"parent"}{"parameters"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[0]{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"};$v->{"parent"}{"parameters"}[0]{"type_default"} = $v->{"parent"}{"parameters"}[0]{"parent"}{"type_default"};$v->{"parent"}{"parameters"}[1]{"parameters"}[0] = $v->{"parent"}{"parameters"}[0]{"parameters"}[0];$v->{"parent"}{"parameters"}[1]{"parameters"}[1]{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[1]{"parameters"}[1];$v->{"parent"}{"parameters"}[1]{"parameters"}[1]{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[1]{"parameters"}[1]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[1]{"parameters"}[1]{"parameters"}[0]{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[1]{"parameters"}[1]{"parameters"}[0];$v->{"parent"}{"parameters"}[1]{"parameters"}[1]{"parameters"}[0]{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[1]{"parameters"}[1]{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[1]{"parameters"}[1]{"parameters"}[0]{"parent"} = $v->{"parent"}{"parameters"}[0]{"parent"}{"parent"};$v->{"parent"}{"parameters"}[1]{"parameters"}[1]{"parent"} = $v->{"parent"}{"parameters"}[0]{"parent"};$v->{"parent"}{"parameters"}[1]{"parameters"}[1]{"type_default"} = $v->{"parent"}{"parameters"}[0]{"parent"}{"type_default"};$v->{"parent"}{"parameters"}[1]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[1]{"parent"};$v->{"parent"}{"parameters"}[1]{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[1]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[1]{"parent"}{"constraint"} = $v->{"constraint"};$v->{"parent"}{"parameters"}[1]{"parent"}{"parent"} = $v->{"parent"}{"parameters"}[1]{"parameters"}[1]{"parameters"}[0];$v->{"parent"}{"parameters"}[1]{"type_default"} = $v->{"parent"}{"parameters"}[1]{"parameters"}[1]{"parameters"}[0]{"type_default"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"constraint"} = $v->{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parameters"}[0]{"parent"}; \$v}->get_message($fields)) |
725 |
0 |
725 |
|
| 328 |
114 |
| my (%name2executionresult, @errors); |
| 329 |
114 |
| my $promise_present; |
| 330 |
114 |
| DEBUG and _debug('_execute_fields', $parent_type->to_string, $fields, $root_value); |
| 331 |
114 |
| my ($field_names, $nodes_defs) = @$fields; |
| 332 |
114 |
| for my $result_name (@$field_names) { |
| 333 |
114 |
| my $nodes = $nodes_defs->{$result_name}; |
| 334 |
114 |
| my $field_node = $nodes->[0]; |
| 335 |
114 |
| my $field_name = $field_node->{name}; |
| 336 |
71 |
| my $field_def = _get_field_def($context->{schema}, $parent_type, $field_name); |
| 337 |
71 |
| DEBUG and _debug('_execute_fields(resolve)', $parent_type->to_string, $nodes, $root_value, $field_def); |
| 338 |
7 |
▶ | next if !$field_def; |
Branch: 1 branch
| Branch | True | False | Total |
| unless $field_def |
725 |
0 |
725 |
|
| 339 |
7 |
▶ | my $resolve = $field_def->{resolve} || $context->{field_resolver}; |
Condition66%2/3
$field_def->{'resolve'} || $context->{'field_resolver'}
MC/DC0%0/2
$field_def->{'resolve'} || $context->{'field_resolver'}
$field_def->{'resolve'}
$context->{'field_resolver'}
Truth table0%0/3
A || B
A= $field_def->{'resolve'}B= $context->{'field_resolver'}
|
| 340 |
7 |
| my $info = _build_resolve_info( |
| 341 |
|
| $context, |
| 342 |
|
| $parent_type, |
| 343 |
|
| $field_def, |
| 344 |
|
| [ @$path, $result_name ], |
| 345 |
|
| $nodes, |
| 346 |
|
| ); |
| 347 |
7 |
| my $result = _resolve_field_value_or_error( |
| 348 |
|
| $context, |
| 349 |
|
| $field_def, |
| 350 |
|
| $nodes, |
| 351 |
|
| $resolve, |
| 352 |
|
| $root_value, |
| 353 |
|
| $info, |
| 354 |
|
| ); |
| 355 |
7 |
| DEBUG and _debug('_execute_fields(resolved)', $parent_type->to_string, $result); |
| 356 |
|
| $result = _complete_value_catching_error( |
| 357 |
|
| $context, |
| 358 |
|
| $field_def->{type}, |
| 359 |
7 |
| $nodes, |
| 360 |
|
| $info, |
| 361 |
|
| [ @$path, $result_name ], |
| 362 |
|
| $result, |
| 363 |
|
| ); |
| 364 |
7 |
▶ | $promise_present ||= is_Promise($result); |
Condition100%3/3
$promise_present ||= is_Promise($result)
MC/DC100%2/2
$promise_present ||= is_Promise($result)
$promise_present
is_Promise($result)
Truth table100%3/3
A ||= B
A= $promise_presentB= is_Promise($result)
|
| 365 |
7 |
| DEBUG and _debug("_execute_fields(complete)($result_name)", $result); |
| 366 |
2169 |
| $name2executionresult{$result_name} = $result; |
| 367 |
|
| } |
| 368 |
2169 |
| DEBUG and _debug('_execute_fields(done)', \%name2executionresult, \@errors, $promise_present); |
| 369 |
2169 |
▶ | return _promise_for_hash($context, \%name2executionresult, \@errors) |
Branch: 1 branch
| Branch | True | False | Total |
| if $promise_present |
2099 |
725 |
2824 |
|
| 370 |
|
| if $promise_present; |
| 371 |
2169 |
| _merge_hash( |
| 372 |
|
| [ keys %name2executionresult ], |
| 373 |
|
| [ values %name2executionresult ], |
| 374 |
|
| \@errors, |
| 375 |
|
| ); |
| 376 |
15 |
▶ | } |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 377 |
|
| |
| 378 |
725 |
▶ | fun _merge_hash( |
|
Subroutine
_merge_hash: called CC=10 SCAR=23.6
|
| 379 |
|
| ArrayRef[Str] $keys, |
| 380 |
|
| ArrayRef[ExecutionPartialResult] $values, |
| 381 |
|
| (ArrayRef[InstanceOf['GraphQL::Error']]) $errors, |
| 382 |
2169 |
▶ | ) :ReturnType(ExecutionPartialResult) { |
Branch: 5 branches
| Branch | True | False | Total |
| @_ < 3 and Function::Parameters::_croak('Too few arguments for fun _merge_hash (expected 3, got ' . @_ . ')') |
724 |
1 |
725 |
| @_ > 3 and Function::Parameters::_croak('Too many arguments for fun _merge_hash (expected 3, got ' . @_ . ')') |
66 |
659 |
725 |
| Type::Tiny::XS::AUTO::TC3($keys) or Function::Parameters::_croak('In fun _merge_hash: parameter 1 ($keys): ' . ${my $v = bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 368,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "ArrayRef[Str]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}';},"name" => "__ANON__","parameters" => [bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Str","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref \$_ eq 'SCALAR' or ref \(my $val = $_) eq 'SCALAR';},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 291,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Str","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; use warnings; use strict; $Type::Tiny::AvoidCallbacks ? goto $orig_inlined : "$xsubname($_[1])";},"library" => "Types::Standard","name" => "Str","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and not ref $_[0] or _failed_check(8, 'Value', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Value","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; not ref $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 276,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Value","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1]) and not ref($_[1])";},"library" => "Types::Standard","name" => "Value","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 8}, 'Type::Tiny' ),"sorter" => sub { package Types::Standard; no warnings; use strict; $_[0] cmp $_[1];},"type_default" => sub { package Types::Standard; no warnings; use strict; return '';},"uniq" => 9}, 'Type::Tiny' )],"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_arrayref($_[0]) or _failed_check(21, 'ArrayRef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_ArrayRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, @new) = ($_, 0);'; push @code, 'for (@$orig) {'; push @code, sprintf('++$return_orig && last unless (%s);', $coercable_item->inline_check('$_')); push @code, sprintf('push @new, (%s);', $param->coercion->inline_coercion('$_')); push @code, '}'; push @code, '$return_orig ? $orig : \\@new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my @new; foreach my $item (@$value) { return $value unless $coercable_item->check($item); push @new, $param->coerce($item); } return \@new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'ARRAY';},"constraint_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; return &Types::Standard::ArrayRef() unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'ArrayRef', \@_, 3); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to ArrayRef[`a] expected to be a type constraint; got $param"; my($min, $max) = (0, -1); $min = Types::Standard::assert_Int(shift()) if @_; $max = Types::Standard::assert_Int(shift()) if @_; my $param_compiled_check = $param->compiled_check; my $xsub; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("ArrayRef[$paramname]") if $paramname; } elsif (&Type::Tiny::_USE_MOUSE() and $param->_has_xsub and $min == 0 and $max == -1) { require Mouse::Util::TypeConstraints; my $maker = 'Mouse::Util::TypeConstraints'->can('_parameterize_ArrayRef_for'); $xsub = &$maker($param) if $maker; } return sub { my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0; } , $xsub if $min == 0 and $max == -1; return sub { my $array = shift(); return if @$array < $min; ($param->check($_) or return) foreach (@$array); return !0; } if $max == -1; return sub { my $array = shift(); return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } if $min == 0; return sub { my $array = shift(); return if @$array < $min; return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } ;},"deep_explanation" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; my($min, $max) = (0, -1); $min = $type->parameters->[1] if @{$type->parameters;} > 1; $max = $type->parameters->[2] if @{$type->parameters;} > 2; if ($min != 0 and @$value < $min) { return [sprintf('"%s" constrains array length at least %s', $type, $min), sprintf('@{%s} is %d', $varname, scalar @$value)]; } if ($max > 0 and @$value > $max) { return [sprintf('"%s" constrains array length at most %d', $type, $max), sprintf('@{%s} is %d', $varname, scalar @$value)]; } foreach my $i (0 .. $value->$#*) { my $item = $value->[$i]; next if $param->check($item); return [sprintf('"%s" constrains each value in the array with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->[%d]', $varname, $i));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 523,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "ArrayRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $param = shift(); my($min, $max) = (0, -1); $min = shift() if @_; $max = shift() if @_; my $param_compiled_check = $param->compiled_check; my $xsubname; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("ArrayRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_arrayref($_[1])" : "ref($_[1]) eq 'ARRAY'";},"library" => "Types::Standard","name" => "ArrayRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => {},"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return [];},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 21}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 74}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"coercion"}{"type_constraint"} = $v->{"parameters"}[0];$v->{"parameters"}[0]{"compiled_type_constraint"} = $v->{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"};$v->{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"type_default"} = $v->{"parent"}{"type_default"}; \$v}->get_message($keys)) |
0 |
114 |
114 |
| ${my $v = bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ($) { package Type::Tiny; use warnings; use strict; local $_ = $_[0]; foreach my $c (@constraints) { return unless &$c(@_); } return !0;},"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/x86_64-linux/Function/Parameters.pm","line" => 98,"package" => "Function::Parameters"},"deprecated" => !!0,"display_name" => "ArrayRef[ExecutionPartialResult]","name" => "__ANON__","parameters" => [bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; $type->check($_[0]) or _failed_check($type, 'ExecutionPartialResult', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"compiled_type_constraint" => sub ($) { package Type::Tiny; use warnings; use strict; local $_ = $_[0]; foreach my $c (@constraints) { return unless &$c(@_); } return !0;},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 402,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "ExecutionPartialResult","exception_class" => "Error::TypeTiny::Assertion","library" => "GraphQL::Type::Library","name" => "ExecutionPartialResult","parent" => bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard::Dict; no warnings; use strict; my $value = $_[0]; if ($slurpy) { my(%tmp) = map((exists $constraints{$_} ? () : ($_, $value->{$_})), keys %$value); return unless $slurpy->check(\%tmp); } else { (exists $constraints{$_} or return) foreach (sort keys %$value); } foreach my $k (@keys) { exists $value->{$k} or $is_optional{$k} ? next : (return); $constraints{$k}->check($value->{$k}) or return; } return !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 402,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "Dict[data=>Optional[JSONable],errors=>Optional[ArrayRef[InstanceOf[\"GraphQL::Error\"]]]]","exception_class" => "Error::TypeTiny::Assertion","name" => "__ANON__","parameters" => ["data",bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"compiled_type_constraint" => sub ($) { package Type::Tiny; use warnings; use strict; local $_ = $_[0]; foreach my $c (@constraints) { return unless &$c(@_); } return !0;},"constraint" => sub { package Types::Standard; no warnings; use strict; $param->check($_[0]);},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 388,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "Optional[JSONable]","name" => "__ANON__","parameters" => [bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; $type->check($_[0]) or _failed_check($type, 'JSONable', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"compiled_type_constraint" => sub ($) { package Type::Tiny; use warnings; use strict; local $_ = $_[0]; foreach my $c (@constraints) { return unless &$c(@_); } return !0;},"constraint" => sub { package GraphQL::Type::Library; use warnings; use strict; no feature ':all'; use feature ':5.12'; $JSON->encode($_); 1;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 360,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "JSONable","exception_class" => "Error::TypeTiny::Assertion","library" => "GraphQL::Type::Library","name" => "JSONable","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 73}, 'Type::Tiny' )],"parent" => bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Optional","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; return $param->coercion;},"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Optional') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Optional', \@_, 1); my $param = Types::TypeTiny::to_TypeTiny(shift()); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to Optional[`a] expected to be a type constraint; got $param"; sub { $param->check($_[0]); } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return [sprintf('%s exists', $varname), sprintf('"%s" constrains %s with "%s" if it exists', $type, $varname, $param), @{$param->validate_explain($value, $varname);}];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 719,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Optional","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $param = shift(); return unless $param->can_be_inlined; return sub { my $v = $_[1]; $param->inline_check($v); } ;},"library" => "Types::Standard","name" => "Optional","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => {},"uniq" => 2}, 'Type::Tiny' ),"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $_[0]->type_default;},"uniq" => 27}, 'Type::Tiny' ),"uniq" => 82}, 'Type::Tiny' ),"errors",bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"compiled_type_constraint" => sub ($) { package Eval::TypeTiny::Sandbox; use strict; Type::Tiny::XS::AUTO::TC5($_[0]);},"constraint" => sub { package Types::Standard; no warnings; use strict; $param->check($_[0]);},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 402,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "Optional[ArrayRef[InstanceOf[\"GraphQL::Error\"]]]","inlined" => sub { package Types::Standard; no warnings; use strict; my $v = $_[1]; $param->inline_check($v);},"name" => "__ANON__","parameters" => [bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 402,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "ArrayRef[InstanceOf[\"GraphQL::Error\"]]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}';},"name" => "__ANON__","parameters" => [bless( {"class" => "GraphQL::Error","coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 985,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "InstanceOf[\"GraphQL::Error\"]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","name" => "__ANON__","type_constraints" => [bless( {"class" => "Moo::Object","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_blessed_ref($_[0]) or _failed_check(24, 'Object', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Object","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; builtin::blessed($_);},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 578,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Object","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_blessed_ref($_[1])" : &$maybe_load_modules('Scalar::Util', "Scalar::Util::blessed($_[1])");},"is_object" => 1,"library" => "Types::Standard","name" => "Object","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"uniq" => 24}, 'Type::Tiny' ),"uniq" => 178}, 'Type::Tiny::Class' ),bless( {"class" => "GraphQL::MaybeTypeCheck","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","uniq" => 179}, 'Type::Tiny::Class' )],"uniq" => 180,"xs_sub" => "Type::Tiny::XS::AUTO::TC12"}, 'Type::Tiny::Intersection' ),"uniq" => 87}, 'Type::Tiny::Class' )],"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_arrayref($_[0]) or _failed_check(21, 'ArrayRef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_ArrayRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, @new) = ($_, 0);'; push @code, 'for (@$orig) {'; push @code, sprintf('++$return_orig && last unless (%s);', $coercable_item->inline_check('$_')); push @code, sprintf('push @new, (%s);', $param->coercion->inline_coercion('$_')); push @code, '}'; push @code, '$return_orig ? $orig : \\@new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my @new; foreach my $item (@$value) { return $value unless $coercable_item->check($item); push @new, $param->coerce($item); } return \@new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'ARRAY';},"constraint_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; return &Types::Standard::ArrayRef() unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'ArrayRef', \@_, 3); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to ArrayRef[`a] expected to be a type constraint; got $param"; my($min, $max) = (0, -1); $min = Types::Standard::assert_Int(shift()) if @_; $max = Types::Standard::assert_Int(shift()) if @_; my $param_compiled_check = $param->compiled_check; my $xsub; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("ArrayRef[$paramname]") if $paramname; } elsif (&Type::Tiny::_USE_MOUSE() and $param->_has_xsub and $min == 0 and $max == -1) { require Mouse::Util::TypeConstraints; my $maker = 'Mouse::Util::TypeConstraints'->can('_parameterize_ArrayRef_for'); $xsub = &$maker($param) if $maker; } return sub { my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0; } , $xsub if $min == 0 and $max == -1; return sub { my $array = shift(); return if @$array < $min; ($param->check($_) or return) foreach (@$array); return !0; } if $max == -1; return sub { my $array = shift(); return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } if $min == 0; return sub { my $array = shift(); return if @$array < $min; return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } ;},"deep_explanation" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; my($min, $max) = (0, -1); $min = $type->parameters->[1] if @{$type->parameters;} > 1; $max = $type->parameters->[2] if @{$type->parameters;} > 2; if ($min != 0 and @$value < $min) { return [sprintf('"%s" constrains array length at least %s', $type, $min), sprintf('@{%s} is %d', $varname, scalar @$value)]; } if ($max > 0 and @$value > $max) { return [sprintf('"%s" constrains array length at most %d', $type, $max), sprintf('@{%s} is %d', $varname, scalar @$value)]; } foreach my $i (0 .. $value->$#*) { my $item = $value->[$i]; next if $param->check($item); return [sprintf('"%s" constrains each value in the array with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->[%d]', $varname, $i));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 523,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "ArrayRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $param = shift(); my($min, $max) = (0, -1); $min = shift() if @_; $max = shift() if @_; my $param_compiled_check = $param->compiled_check; my $xsubname; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("ArrayRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_arrayref($_[1])" : "ref($_[1]) eq 'ARRAY'";},"library" => "Types::Standard","name" => "ArrayRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return [];},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 21}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 88}, 'Type::Tiny' )],"parent" => {},"type_default" => do{my $o},"uniq" => 89}, 'Type::Tiny' )],"parent" => bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_hashref($_[0]) or _failed_check(31, 'Dict', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Dict","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::Dict; no warnings; use strict; my $slurpy = @_ && Types::TypeTiny::is_TypeTiny($_[-1]) && $_[-1]->is_strictly_a_type_of($_Slurpy) ? (pop())->my_unslurpy : undef; my($parent, $child, %dict) = @_; my $C = 'Type::Coercion'->new('type_constraint', $child); my $all_inlinable = 1; my $child_coercions_exist = 0; foreach my $tc (values %dict) { $all_inlinable = 0 unless $tc->can_be_inlined; $all_inlinable = 0 if $tc->has_coercion and not $tc->coercion->can_be_inlined; ++$child_coercions_exist if $tc->has_coercion; } $all_inlinable = 0 if $slurpy and not $slurpy->can_be_inlined; $all_inlinable = 0 if $slurpy and $slurpy->has_coercion and not $slurpy->coercion->can_be_inlined; ++$child_coercions_exist if $slurpy and $slurpy->has_coercion; return unless $child_coercions_exist; if ($all_inlinable) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { require B; my $keycheck = join('|', map(quotemeta($_), (sort {length $b <=> length $a or $a cmp $b;} keys %dict))); $keycheck = ($KEYCHECK[++$keycheck_counter] = qr/^($keycheck)$/ms); my $label = sprintf('DICTLABEL%d', ++$label_counter); my @code; push @code, 'do { my ($orig, $return_orig, $tmp, %new) = ($_, 0);'; push @code, "${label}: {"; if ($slurpy) { push @code, sprintf('my $slurped = +{ map +($_=~$%s::KEYCHECK[%d])?():($_=>$orig->{$_}), keys %%$orig };', __PACKAGE__, $keycheck_counter); if ($slurpy->has_coercion) { push @code, sprintf('my $coerced = %s;', $slurpy->coercion->inline_coercion('$slurped')); push @code, sprintf('((%s)&&(%s))?(%%new=%%$coerced):(($return_orig = 1), last %s);', $_hash->inline_check('$coerced'), $slurpy->inline_check('$coerced'), $label); } else { push @code, sprintf('(%s)?(%%new=%%$slurped):(($return_orig = 1), last %s);', $slurpy->inline_check('$slurped'), $label); } } else { push @code, sprintf('($_ =~ $%s::KEYCHECK[%d])||(($return_orig = 1), last %s) for sort keys %%$orig;', __PACKAGE__, $keycheck_counter, $label); } foreach my $k (keys %dict) { my $ct = $dict{$k}; my $ct_coerce = $ct->has_coercion; my $ct_optional = $ct->is_a_type_of($_optional); my $K = B::perlstring($k); push @code, sprintf('if (exists $orig->{%s}) { $tmp = %s; (%s) ? ($new{%s}=$tmp) : (($return_orig=1), last %s) }', $K, $ct_coerce ? $ct->coercion->inline_coercion("\$orig->{$K}") : "\$orig->{$K}", $ct->inline_check('$tmp'), $K, $label); } push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { my(%is_optional) = map({$_, !!$dict{$_}->is_strictly_a_type_of($_optional);} sort(keys %dict)); $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; if ($slurpy) { my(%slurped) = map((exists $dict{$_} ? () : ($_, $value->{$_})), keys %$value); if ($slurpy->check(\%slurped)) { %new = %slurped; } elsif ($slurpy->has_coercion) { my $coerced = $slurpy->coerce(\%slurped); $slurpy->check($coerced) ? %new = %$coerced : (return $value); } else { return $value; } } else { foreach my $k (keys %$value) { return $value unless exists $dict{$k}; } } foreach my $k (keys %dict) { next if $is_optional{$k} and not exists $value->{$k}; my $ct = $dict{$k}; my $x = $ct->has_coercion ? $ct->coerce($value->{$k}) : $value->{$k}; return $value unless $ct->check($x); $new{$k} = $x; } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"constraint_generator" => sub { package Types::Standard::Dict; no warnings; use strict; my $slurpy = @_ && Types::TypeTiny::is_TypeTiny($_[-1]) && $_[-1]->is_strictly_a_type_of($_Slurpy) ? (pop())->my_unslurpy : undef; my $iterator = pair_iterator(@_); my(%constraints, %is_optional); my @keys; while (my($k, $v) = &$iterator()) { do { $constraints{$k} = $v; Types::TypeTiny::is_TypeTiny($v) or _croak "Parameter for Dict[...] with key '${k}' expected to be a type constraint; got $v"; Types::TypeTiny::is_StringLike($k) or _croak "Key for Dict[...] expected to be string; got $k"; push @keys, $k; $is_optional{$k} = !!$constraints{$k}->is_strictly_a_type_of($_optional) }; } return sub { my $value = $_[0]; if ($slurpy) { my(%tmp) = map((exists $constraints{$_} ? () : ($_, $value->{$_})), keys %$value); return unless $slurpy->check(\%tmp); } else { (exists $constraints{$_} or return) foreach (sort keys %$value); } foreach my $k (@keys) { exists $value->{$k} or $is_optional{$k} ? next : (return); $constraints{$k}->check($value->{$k}) or return; } return !0; } ;},"deep_explanation" => sub { package Types::Standard::Dict; no warnings; use strict; require B; my($type, $value, $varname) = @_; my(@params) = @{$type->parameters;}; my $slurpy = @params && Types::TypeTiny::is_TypeTiny($params[-1]) && $params[-1]->is_strictly_a_type_of($_Slurpy) ? pop(@params)->my_unslurpy : undef; my $iterator = pair_iterator(@params); my(%constraints, @keys); while (my($k, $c) = &$iterator()) { do { push @keys, $k; $constraints{$k} = $c }; } foreach my $k (@keys) { next if $constraints{$k}->has_parent and $constraints{$k}->parent == &Types::Standard::Optional() and not exists $value->{$k}; next if $constraints{$k}->check($value->{$k}); return [sprintf('"%s" requires key %s to appear in hash', $type, B::perlstring($k))] unless exists $value->{$k}; return [sprintf('"%s" constrains value at key %s of hash with "%s"', $type, B::perlstring($k), $constraints{$k}), @{$constraints{$k}->validate_explain($value->{$k}, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } if ($slurpy) { my(%tmp) = map({exists $constraints{$_} ? () : ($_, $value->{$_});} keys %$value); my $explain = $slurpy->validate_explain(\%tmp, '$slurpy'); return [sprintf('"%s" requires the hashref of additional key/value pairs to conform to "%s"', $type, $slurpy), @$explain] if $explain; } else { foreach my $k (sort keys %$value) { return [sprintf('"%s" does not allow key %s to appear in hash', $type, B::perlstring($k))] unless exists $constraints{$k}; } } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 842,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Dict","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::Dict; no warnings; use strict; my $slurpy = @_ && Types::TypeTiny::is_TypeTiny($_[-1]) && $_[-1]->is_strictly_a_type_of($_Slurpy) ? (pop())->my_unslurpy : undef; return if $slurpy and not $slurpy->can_be_inlined; my $slurpy_is_any = $slurpy && $_hash->is_a_type_of($slurpy); my $slurpy_is_map = $slurpy && $slurpy->is_parameterized && ($slurpy->parent->strictly_equals($_map) && $slurpy->parameters || $slurpy->parent->strictly_equals($_hash) && [$_any, $slurpy->parameters->[0]]); my $iterator = pair_iterator(@_); my(%constraints, @keys); while (my($k, $c) = &$iterator()) { do { return unless $c->can_be_inlined; $constraints{$k} = $c; push @keys, $k }; } my $regexp = join('|', map(quotemeta($_), @keys)); return sub { require B; my $h = $_[1]; join ' and ', &Types::Standard::HashRef()->inline_check($h), $slurpy_is_any ? () : $slurpy_is_map ? do { '(not grep {' . "my \$v = ($h)->{\$_};" . sprintf('not((/\\A(?:%s)\\z/) or ((%s) and (%s)))', $regexp, $slurpy_is_map->[0]->inline_check('$_'), $slurpy_is_map->[1]->inline_check('$v')) . "} keys %{$h})" } : ($slurpy ? do { 'do {' . "my \$slurpy_tmp = +{ map /\\A(?:$regexp)\\z/ ? () : (\$_ => ($h)->{\$_}), keys %{$h} };" . $slurpy->inline_check('$slurpy_tmp') . '}' } : "not(grep !/\\A(?:$regexp)\\z/, keys %{$h})"), map({my $k = B::perlstring($_); $constraints{$_}->is_strictly_a_type_of($_optional) ? sprintf('(!exists %s->{%s} or %s)', $h, $k, $constraints{$_}->inline_check("$h->{$k}")) : ("exists($h->{$k})", $constraints{$_}->inline_check("$h->{$k}"));} @keys); } ;},"library" => "Types::Standard","my_methods" => {"dict_is_slurpy" => sub { package Types::Standard::Dict; no warnings; use strict; my $self = shift(); return !1 if $self == &Types::Standard::Dict(); my $dict = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::Dict(); } ); my $slurpy = @{$dict->parameters;} && Types::TypeTiny::is_TypeTiny($dict->parameters->[-1]) && $dict->parameters->[-1]->is_strictly_a_type_of($_Slurpy) ? $dict->parameters->[-1] : undef;},"hashref_allows_key" => sub { package Types::Standard::Dict; no warnings; use strict; my $self = shift(); my($key) = @_; return Types::Standard::is_Str($key) if $self == &Types::Standard::Dict(); my $dict = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::Dict(); } ); my %params; my $slurpy = $dict->my_dict_is_slurpy; if ($slurpy) { my(@args) = @{$dict->parameters;}; pop @args; %params = @args; $slurpy = $slurpy->my_unslurpy; } else { %params = @{$dict->parameters;}; } return !0 if exists $params{$key}; return !1 unless $slurpy; return Types::Standard::is_Str($key) if $slurpy == &Types::Standard::Any() or $slurpy == &Types::Standard::Item() or $slurpy == &Types::Standard::Defined() or $slurpy == &Types::Standard::Ref(); return $slurpy->my_hashref_allows_key($key) if $slurpy->is_a_type_of(&Types::Standard::HashRef()); return !1;},"hashref_allows_value" => sub { package Types::Standard::Dict; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::Dict(); my $dict = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::Dict(); } ); my %params; my $slurpy = $dict->my_dict_is_slurpy; if ($slurpy) { my(@args) = @{$dict->parameters;}; pop @args; %params = @args; $slurpy = $slurpy->my_unslurpy; } else { %params = @{$dict->parameters;}; } return !0 if exists $params{$key} and $params{$key}->check($value); return !1 unless $slurpy; return !0 if $slurpy == &Types::Standard::Any() or $slurpy == &Types::Standard::Item() or $slurpy == &Types::Standard::Defined() or $slurpy == &Types::Standard::Ref(); return $slurpy->my_hashref_allows_value($key, $value) if $slurpy->is_a_type_of(&Types::Standard::HashRef()); return !1;}},"name" => "Dict","name_generator" => sub { package Types::Standard; no warnings; use strict; my($s, @p) = @_; my $l = @p && Types::TypeTiny::is_TypeTiny($p[-1]) && $p[-1]->is_strictly_a_type_of(Slurpy) ? pop @p : undef; my(%a) = @p; sprintf '%s[%s%s]', $s, join(',', map((sprintf('%s=>%s', $_, $a{$_})), sort(keys %a))), $l ? ",$l" : '';},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' ),"uniq" => 31}, 'Type::Tiny' ),"uniq" => 90}, 'Type::Tiny' ),"uniq" => 91}, 'Type::Tiny' )],"parent" => {},"type_default" => do{my $o},"uniq" => 102}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"compiled_type_constraint"};$v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parameters"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parameters"}[0]{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parameters"}[0]{"parent"}{"constraint"} = $v->{"parameters"}[0]{"constraint"};$v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parent"}{"constraint"} = $v->{"parameters"}[0]{"constraint"};$v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"constraint"};$v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parent"}{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parameters"}[0]{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0];$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0];$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"type_default"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"}{"type_default"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parent"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"type_default"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"}{"type_default"};$v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"constraint"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"};$v->{"parent"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"};$v->{"type_default"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"}{"type_default"}; \$v}->check($values) or Function::Parameters::_croak('In fun _merge_hash: parameter 2 ($values): ' . ${my $v = bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ($) { package Type::Tiny; use warnings; use strict; local $_ = $_[0]; foreach my $c (@constraints) { return unless &$c(@_); } return !0;},"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/x86_64-linux/Function/Parameters.pm","line" => 98,"package" => "Function::Parameters"},"deprecated" => !!0,"display_name" => "ArrayRef[ExecutionPartialResult]","name" => "__ANON__","parameters" => [bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; $type->check($_[0]) or _failed_check($type, 'ExecutionPartialResult', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"compiled_type_constraint" => sub ($) { package Type::Tiny; use warnings; use strict; local $_ = $_[0]; foreach my $c (@constraints) { return unless &$c(@_); } return !0;},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 402,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "ExecutionPartialResult","exception_class" => "Error::TypeTiny::Assertion","library" => "GraphQL::Type::Library","name" => "ExecutionPartialResult","parent" => bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard::Dict; no warnings; use strict; my $value = $_[0]; if ($slurpy) { my(%tmp) = map((exists $constraints{$_} ? () : ($_, $value->{$_})), keys %$value); return unless $slurpy->check(\%tmp); } else { (exists $constraints{$_} or return) foreach (sort keys %$value); } foreach my $k (@keys) { exists $value->{$k} or $is_optional{$k} ? next : (return); $constraints{$k}->check($value->{$k}) or return; } return !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 402,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "Dict[data=>Optional[JSONable],errors=>Optional[ArrayRef[InstanceOf[\"GraphQL::Error\"]]]]","exception_class" => "Error::TypeTiny::Assertion","name" => "__ANON__","parameters" => ["data",bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"compiled_type_constraint" => sub ($) { package Type::Tiny; use warnings; use strict; local $_ = $_[0]; foreach my $c (@constraints) { return unless &$c(@_); } return !0;},"constraint" => sub { package Types::Standard; no warnings; use strict; $param->check($_[0]);},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 388,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "Optional[JSONable]","name" => "__ANON__","parameters" => [bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; $type->check($_[0]) or _failed_check($type, 'JSONable', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"compiled_type_constraint" => sub ($) { package Type::Tiny; use warnings; use strict; local $_ = $_[0]; foreach my $c (@constraints) { return unless &$c(@_); } return !0;},"constraint" => sub { package GraphQL::Type::Library; use warnings; use strict; no feature ':all'; use feature ':5.12'; $JSON->encode($_); 1;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 360,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "JSONable","exception_class" => "Error::TypeTiny::Assertion","library" => "GraphQL::Type::Library","name" => "JSONable","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 73}, 'Type::Tiny' )],"parent" => bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Optional","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; return $param->coercion;},"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Optional') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Optional', \@_, 1); my $param = Types::TypeTiny::to_TypeTiny(shift()); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to Optional[`a] expected to be a type constraint; got $param"; sub { $param->check($_[0]); } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return [sprintf('%s exists', $varname), sprintf('"%s" constrains %s with "%s" if it exists', $type, $varname, $param), @{$param->validate_explain($value, $varname);}];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 719,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Optional","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $param = shift(); return unless $param->can_be_inlined; return sub { my $v = $_[1]; $param->inline_check($v); } ;},"library" => "Types::Standard","name" => "Optional","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => {},"uniq" => 2}, 'Type::Tiny' ),"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $_[0]->type_default;},"uniq" => 27}, 'Type::Tiny' ),"uniq" => 82}, 'Type::Tiny' ),"errors",bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"compiled_type_constraint" => sub ($) { package Eval::TypeTiny::Sandbox; use strict; Type::Tiny::XS::AUTO::TC5($_[0]);},"constraint" => sub { package Types::Standard; no warnings; use strict; $param->check($_[0]);},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 402,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "Optional[ArrayRef[InstanceOf[\"GraphQL::Error\"]]]","inlined" => sub { package Types::Standard; no warnings; use strict; my $v = $_[1]; $param->inline_check($v);},"name" => "__ANON__","parameters" => [bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 402,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "ArrayRef[InstanceOf[\"GraphQL::Error\"]]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}';},"name" => "__ANON__","parameters" => [bless( {"class" => "GraphQL::Error","coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 985,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "InstanceOf[\"GraphQL::Error\"]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","name" => "__ANON__","type_constraints" => [bless( {"class" => "Moo::Object","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_blessed_ref($_[0]) or _failed_check(24, 'Object', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Object","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; builtin::blessed($_);},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 578,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Object","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_blessed_ref($_[1])" : &$maybe_load_modules('Scalar::Util', "Scalar::Util::blessed($_[1])");},"is_object" => 1,"library" => "Types::Standard","name" => "Object","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"uniq" => 24}, 'Type::Tiny' ),"uniq" => 178}, 'Type::Tiny::Class' ),bless( {"class" => "GraphQL::MaybeTypeCheck","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","uniq" => 179}, 'Type::Tiny::Class' )],"uniq" => 180,"xs_sub" => "Type::Tiny::XS::AUTO::TC12"}, 'Type::Tiny::Intersection' ),"uniq" => 87}, 'Type::Tiny::Class' )],"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_arrayref($_[0]) or _failed_check(21, 'ArrayRef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_ArrayRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, @new) = ($_, 0);'; push @code, 'for (@$orig) {'; push @code, sprintf('++$return_orig && last unless (%s);', $coercable_item->inline_check('$_')); push @code, sprintf('push @new, (%s);', $param->coercion->inline_coercion('$_')); push @code, '}'; push @code, '$return_orig ? $orig : \\@new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my @new; foreach my $item (@$value) { return $value unless $coercable_item->check($item); push @new, $param->coerce($item); } return \@new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'ARRAY';},"constraint_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; return &Types::Standard::ArrayRef() unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'ArrayRef', \@_, 3); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to ArrayRef[`a] expected to be a type constraint; got $param"; my($min, $max) = (0, -1); $min = Types::Standard::assert_Int(shift()) if @_; $max = Types::Standard::assert_Int(shift()) if @_; my $param_compiled_check = $param->compiled_check; my $xsub; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("ArrayRef[$paramname]") if $paramname; } elsif (&Type::Tiny::_USE_MOUSE() and $param->_has_xsub and $min == 0 and $max == -1) { require Mouse::Util::TypeConstraints; my $maker = 'Mouse::Util::TypeConstraints'->can('_parameterize_ArrayRef_for'); $xsub = &$maker($param) if $maker; } return sub { my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0; } , $xsub if $min == 0 and $max == -1; return sub { my $array = shift(); return if @$array < $min; ($param->check($_) or return) foreach (@$array); return !0; } if $max == -1; return sub { my $array = shift(); return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } if $min == 0; return sub { my $array = shift(); return if @$array < $min; return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } ;},"deep_explanation" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; my($min, $max) = (0, -1); $min = $type->parameters->[1] if @{$type->parameters;} > 1; $max = $type->parameters->[2] if @{$type->parameters;} > 2; if ($min != 0 and @$value < $min) { return [sprintf('"%s" constrains array length at least %s', $type, $min), sprintf('@{%s} is %d', $varname, scalar @$value)]; } if ($max > 0 and @$value > $max) { return [sprintf('"%s" constrains array length at most %d', $type, $max), sprintf('@{%s} is %d', $varname, scalar @$value)]; } foreach my $i (0 .. $value->$#*) { my $item = $value->[$i]; next if $param->check($item); return [sprintf('"%s" constrains each value in the array with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->[%d]', $varname, $i));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 523,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "ArrayRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $param = shift(); my($min, $max) = (0, -1); $min = shift() if @_; $max = shift() if @_; my $param_compiled_check = $param->compiled_check; my $xsubname; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("ArrayRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_arrayref($_[1])" : "ref($_[1]) eq 'ARRAY'";},"library" => "Types::Standard","name" => "ArrayRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return [];},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 21}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 88}, 'Type::Tiny' )],"parent" => {},"type_default" => do{my $o},"uniq" => 89}, 'Type::Tiny' )],"parent" => bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_hashref($_[0]) or _failed_check(31, 'Dict', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Dict","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::Dict; no warnings; use strict; my $slurpy = @_ && Types::TypeTiny::is_TypeTiny($_[-1]) && $_[-1]->is_strictly_a_type_of($_Slurpy) ? (pop())->my_unslurpy : undef; my($parent, $child, %dict) = @_; my $C = 'Type::Coercion'->new('type_constraint', $child); my $all_inlinable = 1; my $child_coercions_exist = 0; foreach my $tc (values %dict) { $all_inlinable = 0 unless $tc->can_be_inlined; $all_inlinable = 0 if $tc->has_coercion and not $tc->coercion->can_be_inlined; ++$child_coercions_exist if $tc->has_coercion; } $all_inlinable = 0 if $slurpy and not $slurpy->can_be_inlined; $all_inlinable = 0 if $slurpy and $slurpy->has_coercion and not $slurpy->coercion->can_be_inlined; ++$child_coercions_exist if $slurpy and $slurpy->has_coercion; return unless $child_coercions_exist; if ($all_inlinable) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { require B; my $keycheck = join('|', map(quotemeta($_), (sort {length $b <=> length $a or $a cmp $b;} keys %dict))); $keycheck = ($KEYCHECK[++$keycheck_counter] = qr/^($keycheck)$/ms); my $label = sprintf('DICTLABEL%d', ++$label_counter); my @code; push @code, 'do { my ($orig, $return_orig, $tmp, %new) = ($_, 0);'; push @code, "${label}: {"; if ($slurpy) { push @code, sprintf('my $slurped = +{ map +($_=~$%s::KEYCHECK[%d])?():($_=>$orig->{$_}), keys %%$orig };', __PACKAGE__, $keycheck_counter); if ($slurpy->has_coercion) { push @code, sprintf('my $coerced = %s;', $slurpy->coercion->inline_coercion('$slurped')); push @code, sprintf('((%s)&&(%s))?(%%new=%%$coerced):(($return_orig = 1), last %s);', $_hash->inline_check('$coerced'), $slurpy->inline_check('$coerced'), $label); } else { push @code, sprintf('(%s)?(%%new=%%$slurped):(($return_orig = 1), last %s);', $slurpy->inline_check('$slurped'), $label); } } else { push @code, sprintf('($_ =~ $%s::KEYCHECK[%d])||(($return_orig = 1), last %s) for sort keys %%$orig;', __PACKAGE__, $keycheck_counter, $label); } foreach my $k (keys %dict) { my $ct = $dict{$k}; my $ct_coerce = $ct->has_coercion; my $ct_optional = $ct->is_a_type_of($_optional); my $K = B::perlstring($k); push @code, sprintf('if (exists $orig->{%s}) { $tmp = %s; (%s) ? ($new{%s}=$tmp) : (($return_orig=1), last %s) }', $K, $ct_coerce ? $ct->coercion->inline_coercion("\$orig->{$K}") : "\$orig->{$K}", $ct->inline_check('$tmp'), $K, $label); } push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { my(%is_optional) = map({$_, !!$dict{$_}->is_strictly_a_type_of($_optional);} sort(keys %dict)); $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; if ($slurpy) { my(%slurped) = map((exists $dict{$_} ? () : ($_, $value->{$_})), keys %$value); if ($slurpy->check(\%slurped)) { %new = %slurped; } elsif ($slurpy->has_coercion) { my $coerced = $slurpy->coerce(\%slurped); $slurpy->check($coerced) ? %new = %$coerced : (return $value); } else { return $value; } } else { foreach my $k (keys %$value) { return $value unless exists $dict{$k}; } } foreach my $k (keys %dict) { next if $is_optional{$k} and not exists $value->{$k}; my $ct = $dict{$k}; my $x = $ct->has_coercion ? $ct->coerce($value->{$k}) : $value->{$k}; return $value unless $ct->check($x); $new{$k} = $x; } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"constraint_generator" => sub { package Types::Standard::Dict; no warnings; use strict; my $slurpy = @_ && Types::TypeTiny::is_TypeTiny($_[-1]) && $_[-1]->is_strictly_a_type_of($_Slurpy) ? (pop())->my_unslurpy : undef; my $iterator = pair_iterator(@_); my(%constraints, %is_optional); my @keys; while (my($k, $v) = &$iterator()) { do { $constraints{$k} = $v; Types::TypeTiny::is_TypeTiny($v) or _croak "Parameter for Dict[...] with key '${k}' expected to be a type constraint; got $v"; Types::TypeTiny::is_StringLike($k) or _croak "Key for Dict[...] expected to be string; got $k"; push @keys, $k; $is_optional{$k} = !!$constraints{$k}->is_strictly_a_type_of($_optional) }; } return sub { my $value = $_[0]; if ($slurpy) { my(%tmp) = map((exists $constraints{$_} ? () : ($_, $value->{$_})), keys %$value); return unless $slurpy->check(\%tmp); } else { (exists $constraints{$_} or return) foreach (sort keys %$value); } foreach my $k (@keys) { exists $value->{$k} or $is_optional{$k} ? next : (return); $constraints{$k}->check($value->{$k}) or return; } return !0; } ;},"deep_explanation" => sub { package Types::Standard::Dict; no warnings; use strict; require B; my($type, $value, $varname) = @_; my(@params) = @{$type->parameters;}; my $slurpy = @params && Types::TypeTiny::is_TypeTiny($params[-1]) && $params[-1]->is_strictly_a_type_of($_Slurpy) ? pop(@params)->my_unslurpy : undef; my $iterator = pair_iterator(@params); my(%constraints, @keys); while (my($k, $c) = &$iterator()) { do { push @keys, $k; $constraints{$k} = $c }; } foreach my $k (@keys) { next if $constraints{$k}->has_parent and $constraints{$k}->parent == &Types::Standard::Optional() and not exists $value->{$k}; next if $constraints{$k}->check($value->{$k}); return [sprintf('"%s" requires key %s to appear in hash', $type, B::perlstring($k))] unless exists $value->{$k}; return [sprintf('"%s" constrains value at key %s of hash with "%s"', $type, B::perlstring($k), $constraints{$k}), @{$constraints{$k}->validate_explain($value->{$k}, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } if ($slurpy) { my(%tmp) = map({exists $constraints{$_} ? () : ($_, $value->{$_});} keys %$value); my $explain = $slurpy->validate_explain(\%tmp, '$slurpy'); return [sprintf('"%s" requires the hashref of additional key/value pairs to conform to "%s"', $type, $slurpy), @$explain] if $explain; } else { foreach my $k (sort keys %$value) { return [sprintf('"%s" does not allow key %s to appear in hash', $type, B::perlstring($k))] unless exists $constraints{$k}; } } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 842,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Dict","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::Dict; no warnings; use strict; my $slurpy = @_ && Types::TypeTiny::is_TypeTiny($_[-1]) && $_[-1]->is_strictly_a_type_of($_Slurpy) ? (pop())->my_unslurpy : undef; return if $slurpy and not $slurpy->can_be_inlined; my $slurpy_is_any = $slurpy && $_hash->is_a_type_of($slurpy); my $slurpy_is_map = $slurpy && $slurpy->is_parameterized && ($slurpy->parent->strictly_equals($_map) && $slurpy->parameters || $slurpy->parent->strictly_equals($_hash) && [$_any, $slurpy->parameters->[0]]); my $iterator = pair_iterator(@_); my(%constraints, @keys); while (my($k, $c) = &$iterator()) { do { return unless $c->can_be_inlined; $constraints{$k} = $c; push @keys, $k }; } my $regexp = join('|', map(quotemeta($_), @keys)); return sub { require B; my $h = $_[1]; join ' and ', &Types::Standard::HashRef()->inline_check($h), $slurpy_is_any ? () : $slurpy_is_map ? do { '(not grep {' . "my \$v = ($h)->{\$_};" . sprintf('not((/\\A(?:%s)\\z/) or ((%s) and (%s)))', $regexp, $slurpy_is_map->[0]->inline_check('$_'), $slurpy_is_map->[1]->inline_check('$v')) . "} keys %{$h})" } : ($slurpy ? do { 'do {' . "my \$slurpy_tmp = +{ map /\\A(?:$regexp)\\z/ ? () : (\$_ => ($h)->{\$_}), keys %{$h} };" . $slurpy->inline_check('$slurpy_tmp') . '}' } : "not(grep !/\\A(?:$regexp)\\z/, keys %{$h})"), map({my $k = B::perlstring($_); $constraints{$_}->is_strictly_a_type_of($_optional) ? sprintf('(!exists %s->{%s} or %s)', $h, $k, $constraints{$_}->inline_check("$h->{$k}")) : ("exists($h->{$k})", $constraints{$_}->inline_check("$h->{$k}"));} @keys); } ;},"library" => "Types::Standard","my_methods" => {"dict_is_slurpy" => sub { package Types::Standard::Dict; no warnings; use strict; my $self = shift(); return !1 if $self == &Types::Standard::Dict(); my $dict = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::Dict(); } ); my $slurpy = @{$dict->parameters;} && Types::TypeTiny::is_TypeTiny($dict->parameters->[-1]) && $dict->parameters->[-1]->is_strictly_a_type_of($_Slurpy) ? $dict->parameters->[-1] : undef;},"hashref_allows_key" => sub { package Types::Standard::Dict; no warnings; use strict; my $self = shift(); my($key) = @_; return Types::Standard::is_Str($key) if $self == &Types::Standard::Dict(); my $dict = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::Dict(); } ); my %params; my $slurpy = $dict->my_dict_is_slurpy; if ($slurpy) { my(@args) = @{$dict->parameters;}; pop @args; %params = @args; $slurpy = $slurpy->my_unslurpy; } else { %params = @{$dict->parameters;}; } return !0 if exists $params{$key}; return !1 unless $slurpy; return Types::Standard::is_Str($key) if $slurpy == &Types::Standard::Any() or $slurpy == &Types::Standard::Item() or $slurpy == &Types::Standard::Defined() or $slurpy == &Types::Standard::Ref(); return $slurpy->my_hashref_allows_key($key) if $slurpy->is_a_type_of(&Types::Standard::HashRef()); return !1;},"hashref_allows_value" => sub { package Types::Standard::Dict; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::Dict(); my $dict = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::Dict(); } ); my %params; my $slurpy = $dict->my_dict_is_slurpy; if ($slurpy) { my(@args) = @{$dict->parameters;}; pop @args; %params = @args; $slurpy = $slurpy->my_unslurpy; } else { %params = @{$dict->parameters;}; } return !0 if exists $params{$key} and $params{$key}->check($value); return !1 unless $slurpy; return !0 if $slurpy == &Types::Standard::Any() or $slurpy == &Types::Standard::Item() or $slurpy == &Types::Standard::Defined() or $slurpy == &Types::Standard::Ref(); return $slurpy->my_hashref_allows_value($key, $value) if $slurpy->is_a_type_of(&Types::Standard::HashRef()); return !1;}},"name" => "Dict","name_generator" => sub { package Types::Standard; no warnings; use strict; my($s, @p) = @_; my $l = @p && Types::TypeTiny::is_TypeTiny($p[-1]) && $p[-1]->is_strictly_a_type_of(Slurpy) ? pop @p : undef; my(%a) = @p; sprintf '%s[%s%s]', $s, join(',', map((sprintf('%s=>%s', $_, $a{$_})), sort(keys %a))), $l ? ",$l" : '';},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' ),"uniq" => 31}, 'Type::Tiny' ),"uniq" => 90}, 'Type::Tiny' ),"uniq" => 91}, 'Type::Tiny' )],"parent" => {},"type_default" => do{my $o},"uniq" => 102}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"compiled_type_constraint"};$v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parameters"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parameters"}[0]{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parameters"}[0]{"parent"}{"constraint"} = $v->{"parameters"}[0]{"constraint"};$v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parent"}{"constraint"} = $v->{"parameters"}[0]{"constraint"};$v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"constraint"};$v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parent"}{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parameters"}[0]{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0];$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0];$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"type_default"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"}{"type_default"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parent"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[1]{"parent"};$v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"type_default"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"}{"type_default"};$v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"constraint"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"};$v->{"parent"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"};$v->{"type_default"} = $v->{"parameters"}[0]{"parent"}{"parameters"}[3]{"parameters"}[0]{"parent"}{"type_default"}; \$v}->get_message($values)) |
0 |
114 |
114 |
| Type::Tiny::XS::AUTO::TC5($errors) or Function::Parameters::_croak('In fun _merge_hash: parameter 3 ($errors): ' . ${my $v = bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 402,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "ArrayRef[InstanceOf[\"GraphQL::Error\"]]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}';},"name" => "__ANON__","parameters" => [bless( {"class" => "GraphQL::Error","coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 985,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "InstanceOf[\"GraphQL::Error\"]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","name" => "__ANON__","type_constraints" => [bless( {"class" => "Moo::Object","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_blessed_ref($_[0]) or _failed_check(24, 'Object', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Object","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; builtin::blessed($_);},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 578,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Object","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_blessed_ref($_[1])" : &$maybe_load_modules('Scalar::Util', "Scalar::Util::blessed($_[1])");},"is_object" => 1,"library" => "Types::Standard","name" => "Object","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"uniq" => 24}, 'Type::Tiny' ),"uniq" => 178}, 'Type::Tiny::Class' ),bless( {"class" => "GraphQL::MaybeTypeCheck","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","uniq" => 179}, 'Type::Tiny::Class' )],"uniq" => 180,"xs_sub" => "Type::Tiny::XS::AUTO::TC12"}, 'Type::Tiny::Intersection' ),"uniq" => 87}, 'Type::Tiny::Class' )],"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_arrayref($_[0]) or _failed_check(21, 'ArrayRef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_ArrayRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, @new) = ($_, 0);'; push @code, 'for (@$orig) {'; push @code, sprintf('++$return_orig && last unless (%s);', $coercable_item->inline_check('$_')); push @code, sprintf('push @new, (%s);', $param->coercion->inline_coercion('$_')); push @code, '}'; push @code, '$return_orig ? $orig : \\@new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my @new; foreach my $item (@$value) { return $value unless $coercable_item->check($item); push @new, $param->coerce($item); } return \@new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'ARRAY';},"constraint_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; return &Types::Standard::ArrayRef() unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'ArrayRef', \@_, 3); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to ArrayRef[`a] expected to be a type constraint; got $param"; my($min, $max) = (0, -1); $min = Types::Standard::assert_Int(shift()) if @_; $max = Types::Standard::assert_Int(shift()) if @_; my $param_compiled_check = $param->compiled_check; my $xsub; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("ArrayRef[$paramname]") if $paramname; } elsif (&Type::Tiny::_USE_MOUSE() and $param->_has_xsub and $min == 0 and $max == -1) { require Mouse::Util::TypeConstraints; my $maker = 'Mouse::Util::TypeConstraints'->can('_parameterize_ArrayRef_for'); $xsub = &$maker($param) if $maker; } return sub { my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0; } , $xsub if $min == 0 and $max == -1; return sub { my $array = shift(); return if @$array < $min; ($param->check($_) or return) foreach (@$array); return !0; } if $max == -1; return sub { my $array = shift(); return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } if $min == 0; return sub { my $array = shift(); return if @$array < $min; return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } ;},"deep_explanation" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; my($min, $max) = (0, -1); $min = $type->parameters->[1] if @{$type->parameters;} > 1; $max = $type->parameters->[2] if @{$type->parameters;} > 2; if ($min != 0 and @$value < $min) { return [sprintf('"%s" constrains array length at least %s', $type, $min), sprintf('@{%s} is %d', $varname, scalar @$value)]; } if ($max > 0 and @$value > $max) { return [sprintf('"%s" constrains array length at most %d', $type, $max), sprintf('@{%s} is %d', $varname, scalar @$value)]; } foreach my $i (0 .. $value->$#*) { my $item = $value->[$i]; next if $param->check($item); return [sprintf('"%s" constrains each value in the array with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->[%d]', $varname, $i));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 523,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "ArrayRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $param = shift(); my($min, $max) = (0, -1); $min = shift() if @_; $max = shift() if @_; my $param_compiled_check = $param->compiled_check; my $xsubname; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("ArrayRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_arrayref($_[1])" : "ref($_[1]) eq 'ARRAY'";},"library" => "Types::Standard","name" => "ArrayRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return [];},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 21}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 88}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"coercion"}{"type_constraint"} = $v->{"parameters"}[0];$v->{"parameters"}[0]{"compiled_type_constraint"} = $v->{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"};$v->{"type_default"} = $v->{"parent"}{"type_default"}; \$v}->get_message($errors)) |
114 |
0 |
114 |
|
| 383 |
2167 |
| DEBUG and _debug('_merge_hash', $keys, $values, $errors); |
| 384 |
2167 |
▶ | my @errors = (@$errors, map @{$_->{errors} || []}, @$values); |
MC/DC100%1/1
$_->{'errors'} || []
$_->{'errors'}
|
| 385 |
2167 |
| my %name2data; |
| 386 |
2167 |
▶ | for (my $i = @$values - 1; $i >= 0; $i--) { |
Branch: 1 branch
| Branch | True | False | Total |
| if ($i >= 0) |
114 |
0 |
114 |
|
| 387 |
2167 |
| $name2data{$keys->[$i]} = $values->[$i]{data}; |
| 388 |
|
| } |
| 389 |
2167 |
| DEBUG and _debug('_merge_hash(after)', \%name2data, \@errors); |
| 390 |
|
| +{ |
| 391 |
2167 |
▶ | %name2data ? (data => \%name2data) : (), |
Branch: 2 branches
| Branch | True | False | Total |
| %name2data ? : |
114 |
0 |
114 |
| @errors ? : |
0 |
114 |
114 |
|
| 392 |
|
| @errors ? (errors => \@errors) : () |
| 393 |
|
| }; |
| 394 |
15 |
▶ | } |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 395 |
|
| |
| 396 |
114 |
▶ | fun _promise_for_hash( |
|
Subroutine
_promise_for_hash: called CC=7 SCAR=20.4
|
| 397 |
|
| HashRef $context, |
| 398 |
|
| HashRef $hash, |
| 399 |
|
| (ArrayRef[InstanceOf['GraphQL::Error']]) $errors, |
| 400 |
2167 |
▶ | ) :ReturnType(Promise) { |
Branch: 5 branches
| Branch | True | False | Total |
| @_ < 3 and Function::Parameters::_croak('Too few arguments for fun _promise_for_hash (expected 3, got ' . @_ . ')') |
0 |
7 |
7 |
| @_ > 3 and Function::Parameters::_croak('Too many arguments for fun _promise_for_hash (expected 3, got ' . @_ . ')') |
0 |
7 |
7 |
| Ref::Util::XS::is_plain_hashref($context) or Function::Parameters::_croak('In fun _promise_for_hash: parameter 1 ($context): ' . ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($context)) |
7 |
0 |
7 |
| Ref::Util::XS::is_plain_hashref($hash) or Function::Parameters::_croak('In fun _promise_for_hash: parameter 2 ($hash): ' . ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($hash)) |
7 |
0 |
7 |
| Type::Tiny::XS::AUTO::TC5($errors) or Function::Parameters::_croak('In fun _promise_for_hash: parameter 3 ($errors): ' . ${my $v = bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 402,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "ArrayRef[InstanceOf[\"GraphQL::Error\"]]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}';},"name" => "__ANON__","parameters" => [bless( {"class" => "GraphQL::Error","coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 985,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "InstanceOf[\"GraphQL::Error\"]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","name" => "__ANON__","type_constraints" => [bless( {"class" => "Moo::Object","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_blessed_ref($_[0]) or _failed_check(24, 'Object', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Object","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; builtin::blessed($_);},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 578,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Object","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_blessed_ref($_[1])" : &$maybe_load_modules('Scalar::Util', "Scalar::Util::blessed($_[1])");},"is_object" => 1,"library" => "Types::Standard","name" => "Object","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"uniq" => 24}, 'Type::Tiny' ),"uniq" => 178}, 'Type::Tiny::Class' ),bless( {"class" => "GraphQL::MaybeTypeCheck","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","uniq" => 179}, 'Type::Tiny::Class' )],"uniq" => 180,"xs_sub" => "Type::Tiny::XS::AUTO::TC12"}, 'Type::Tiny::Intersection' ),"uniq" => 87}, 'Type::Tiny::Class' )],"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_arrayref($_[0]) or _failed_check(21, 'ArrayRef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_ArrayRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, @new) = ($_, 0);'; push @code, 'for (@$orig) {'; push @code, sprintf('++$return_orig && last unless (%s);', $coercable_item->inline_check('$_')); push @code, sprintf('push @new, (%s);', $param->coercion->inline_coercion('$_')); push @code, '}'; push @code, '$return_orig ? $orig : \\@new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my @new; foreach my $item (@$value) { return $value unless $coercable_item->check($item); push @new, $param->coerce($item); } return \@new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'ARRAY';},"constraint_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; return &Types::Standard::ArrayRef() unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'ArrayRef', \@_, 3); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to ArrayRef[`a] expected to be a type constraint; got $param"; my($min, $max) = (0, -1); $min = Types::Standard::assert_Int(shift()) if @_; $max = Types::Standard::assert_Int(shift()) if @_; my $param_compiled_check = $param->compiled_check; my $xsub; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("ArrayRef[$paramname]") if $paramname; } elsif (&Type::Tiny::_USE_MOUSE() and $param->_has_xsub and $min == 0 and $max == -1) { require Mouse::Util::TypeConstraints; my $maker = 'Mouse::Util::TypeConstraints'->can('_parameterize_ArrayRef_for'); $xsub = &$maker($param) if $maker; } return sub { my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0; } , $xsub if $min == 0 and $max == -1; return sub { my $array = shift(); return if @$array < $min; ($param->check($_) or return) foreach (@$array); return !0; } if $max == -1; return sub { my $array = shift(); return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } if $min == 0; return sub { my $array = shift(); return if @$array < $min; return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } ;},"deep_explanation" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; my($min, $max) = (0, -1); $min = $type->parameters->[1] if @{$type->parameters;} > 1; $max = $type->parameters->[2] if @{$type->parameters;} > 2; if ($min != 0 and @$value < $min) { return [sprintf('"%s" constrains array length at least %s', $type, $min), sprintf('@{%s} is %d', $varname, scalar @$value)]; } if ($max > 0 and @$value > $max) { return [sprintf('"%s" constrains array length at most %d', $type, $max), sprintf('@{%s} is %d', $varname, scalar @$value)]; } foreach my $i (0 .. $value->$#*) { my $item = $value->[$i]; next if $param->check($item); return [sprintf('"%s" constrains each value in the array with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->[%d]', $varname, $i));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 523,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "ArrayRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $param = shift(); my($min, $max) = (0, -1); $min = shift() if @_; $max = shift() if @_; my $param_compiled_check = $param->compiled_check; my $xsubname; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("ArrayRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_arrayref($_[1])" : "ref($_[1]) eq 'ARRAY'";},"library" => "Types::Standard","name" => "ArrayRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return [];},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 21}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 88}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"coercion"}{"type_constraint"} = $v->{"parameters"}[0];$v->{"parameters"}[0]{"compiled_type_constraint"} = $v->{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"};$v->{"type_default"} = $v->{"parent"}{"type_default"}; \$v}->get_message($errors)) |
7 |
0 |
7 |
|
| 401 |
2167 |
| my ($keys, $values) = ([ keys %$hash ], [ values %$hash ]); |
| 402 |
2167 |
| DEBUG and _debug('_promise_for_hash', $keys); |
| 403 |
|
| die "Given a promise in object but no PromiseCode given\n" |
| 404 |
2167 |
▶ | if !$context->{promise_code}; |
Branch: 1 branch
| Branch | True | False | Total |
| unless $context->{"promise_code"} |
7 |
0 |
7 |
|
| 405 |
71 |
▶ | $context->{promise_code}{all}->(@$values)->then(sub { |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
|
| 406 |
2167 |
| DEBUG and _debug('_promise_for_hash(all)', \@_); |
| 407 |
2167 |
| _merge_hash($keys, [ map $_->[0], @_ ], $errors); |
| 408 |
2167 |
| }); |
| 409 |
15 |
▶ | } |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 410 |
|
| |
| 411 |
7 |
▶ | fun _execute_fields_serially( |
|
Subroutine
_execute_fields_serially: called CC=22 SCAR=34.2
|
| 412 |
|
| HashRef $context, |
| 413 |
|
| (InstanceOf['GraphQL::Type']) $parent_type, |
| 414 |
|
| Any $root_value, |
| 415 |
|
| ArrayRef $path, |
| 416 |
|
| FieldsGot $fields, |
| 417 |
2167 |
▶ | ) { |
Branch: 6 branches
| Branch | True | False | Total |
| @_ < 5 and Function::Parameters::_croak('Too few arguments for fun _execute_fields_serially (expected 5, got ' . @_ . ')') |
0 |
2169 |
2169 |
| @_ > 5 and Function::Parameters::_croak('Too many arguments for fun _execute_fields_serially (expected 5, got ' . @_ . ')') |
0 |
2169 |
2169 |
| Ref::Util::XS::is_plain_hashref($context) or Function::Parameters::_croak('In fun _execute_fields_serially: parameter 1 ($context): ' . ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($context)) |
2169 |
0 |
2169 |
| Type::Tiny::XS::AUTO::TC9($parent_type) or Function::Parameters::_croak('In fun _execute_fields_serially: parameter 2 ($parent_type): ' . ${my $v = bless( {"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"class" => "GraphQL::Type","coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 985,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "InstanceOf[\"GraphQL::Type\"]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Method/Generate/Accessor.pm","line" => 716,"package" => "Method::Generate::Accessor"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","name" => "__ANON__","type_constraints" => [bless( {"class" => "Moo::Object","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Method/Generate/Accessor.pm","line" => 716,"package" => "Method::Generate::Accessor"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_blessed_ref($_[0]) or _failed_check(24, 'Object', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Object","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; builtin::blessed($_);},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 578,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Object","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_blessed_ref($_[1])" : &$maybe_load_modules('Scalar::Util', "Scalar::Util::blessed($_[1])");},"is_object" => 1,"library" => "Types::Standard","name" => "Object","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"uniq" => 24}, 'Type::Tiny' ),"uniq" => 103}, 'Type::Tiny::Class' ),bless( {"class" => "GraphQL::MaybeTypeCheck","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Method/Generate/Accessor.pm","line" => 716,"package" => "Method::Generate::Accessor"},"deprecated" => !!0,"inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","uniq" => 104}, 'Type::Tiny::Class' )],"uniq" => 105,"xs_sub" => "Type::Tiny::XS::AUTO::TC12"}, 'Type::Tiny::Intersection' ),"uniq" => 101}, 'Type::Tiny::Class' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($parent_type)) |
2169 |
0 |
2169 |
| Ref::Util::XS::is_plain_arrayref($path) or Function::Parameters::_croak('In fun _execute_fields_serially: parameter 4 ($path): ' . ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_arrayref($_[0]) or _failed_check(21, 'ArrayRef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_ArrayRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, @new) = ($_, 0);'; push @code, 'for (@$orig) {'; push @code, sprintf('++$return_orig && last unless (%s);', $coercable_item->inline_check('$_')); push @code, sprintf('push @new, (%s);', $param->coercion->inline_coercion('$_')); push @code, '}'; push @code, '$return_orig ? $orig : \\@new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my @new; foreach my $item (@$value) { return $value unless $coercable_item->check($item); push @new, $param->coerce($item); } return \@new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'ARRAY';},"constraint_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; return &Types::Standard::ArrayRef() unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'ArrayRef', \@_, 3); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to ArrayRef[`a] expected to be a type constraint; got $param"; my($min, $max) = (0, -1); $min = Types::Standard::assert_Int(shift()) if @_; $max = Types::Standard::assert_Int(shift()) if @_; my $param_compiled_check = $param->compiled_check; my $xsub; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("ArrayRef[$paramname]") if $paramname; } elsif (&Type::Tiny::_USE_MOUSE() and $param->_has_xsub and $min == 0 and $max == -1) { require Mouse::Util::TypeConstraints; my $maker = 'Mouse::Util::TypeConstraints'->can('_parameterize_ArrayRef_for'); $xsub = &$maker($param) if $maker; } return sub { my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0; } , $xsub if $min == 0 and $max == -1; return sub { my $array = shift(); return if @$array < $min; ($param->check($_) or return) foreach (@$array); return !0; } if $max == -1; return sub { my $array = shift(); return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } if $min == 0; return sub { my $array = shift(); return if @$array < $min; return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } ;},"deep_explanation" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; my($min, $max) = (0, -1); $min = $type->parameters->[1] if @{$type->parameters;} > 1; $max = $type->parameters->[2] if @{$type->parameters;} > 2; if ($min != 0 and @$value < $min) { return [sprintf('"%s" constrains array length at least %s', $type, $min), sprintf('@{%s} is %d', $varname, scalar @$value)]; } if ($max > 0 and @$value > $max) { return [sprintf('"%s" constrains array length at most %d', $type, $max), sprintf('@{%s} is %d', $varname, scalar @$value)]; } foreach my $i (0 .. $value->$#*) { my $item = $value->[$i]; next if $param->check($item); return [sprintf('"%s" constrains each value in the array with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->[%d]', $varname, $i));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 523,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "ArrayRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $param = shift(); my($min, $max) = (0, -1); $min = shift() if @_; $max = shift() if @_; my $param_compiled_check = $param->compiled_check; my $xsubname; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("ArrayRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_arrayref($_[1])" : "ref($_[1]) eq 'ARRAY'";},"library" => "Types::Standard","name" => "ArrayRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return [];},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 21}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($path)) |
2169 |
0 |
2169 |
| do {
package Type::Tiny;
Ref::Util::XS::is_plain_arrayref($fields) and @{$fields;} == 2 and do {
Ref::Util::XS::is_plain_arrayref($fields->[0]) and do {
my $ok = 1;
foreach my $i (@{$$fields[0];}) {
$ok = 0, last unless defined $i and not ref $i and not !($i =~ qr/(?^u:^[_a-zA-Z][_a-zA-Z0-9]*$)/u);
};
$ok
}
} and do {
Ref::Util::XS::is_plain_hashref($fields->[1]) and do {
my $ok = 1;
foreach my $v (values %{$$fields[1];}) {
$ok = 0, last unless Type::Tiny::XS::AUTO::TC1($v);
};
foreach my $k (keys %{$$fields[1];}) {
$ok = 0, last unless defined $k and not ref $k and not !($k =~ qr/(?^u:^[_a-zA-Z][_a-zA-Z0-9]*$)/u);
};
$ok
}
}
} or Function::Parameters::_croak('In fun _execute_fields_serially: parameter 5 ($fields): ' . ${my $v = bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; do { Ref::Util::XS::is_plain_arrayref($_[0]) and @{$_[0];} == 2 and do { Ref::Util::XS::is_plain_arrayref($_[0][0]) and do { my $ok = 1; foreach my $i (@{$_[0][0];}) { $ok = 0, last unless defined $i and not ref $i and not !($i =~ qr/(?^u:^[_a-zA-Z][_a-zA-Z0-9]*$)/); } $ok } } and do { Ref::Util::XS::is_plain_hashref($_[0][1]) and do { my $ok = 1; foreach my $v (values %{$_[0][1];}) { $ok = 0, last unless Type::Tiny::XS::AUTO::TC1($v); } foreach my $k (keys %{$_[0][1];}) { $ok = 0, last unless defined $k and not ref $k and not !($k =~ qr/(?^u:^[_a-zA-Z][_a-zA-Z0-9]*$)/); } $ok } } } or _failed_check(47, 'FieldsGot', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"compiled_type_constraint" => sub ($) { package Eval::TypeTiny::Sandbox; use strict; do { package Type::Tiny; Ref::Util::XS::is_plain_arrayref($_[0]) and @{$_[0];} == 2 and do { Ref::Util::XS::is_plain_arrayref($_[0][0]) and do { my $ok = 1; foreach my $i (@{$_[0][0];}) { $ok = 0, last unless defined $i and not ref $i and not !($i =~ qr/(?^u:^[_a-zA-Z][_a-zA-Z0-9]*$)/); } $ok } } and do { Ref::Util::XS::is_plain_hashref($_[0][1]) and do { my $ok = 1; foreach my $v (values %{$_[0][1];}) { $ok = 0, last unless Type::Tiny::XS::AUTO::TC1($v); } foreach my $k (keys %{$_[0][1];}) { $ok = 0, last unless defined $k and not ref $k and not !($k =~ qr/(?^u:^[_a-zA-Z][_a-zA-Z0-9]*$)/); } $ok } } };},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 92,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "FieldsGot","exception_class" => "Error::TypeTiny::Assertion","library" => "GraphQL::Type::Library","name" => "FieldsGot","parent" => bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard::Tuple; no warnings; use strict; my $value = $_[0]; if ($#constraints < $value->$#*) { return !1 unless $slurpy; my $tmp; if ($slurp_hash) { ($value->$#* - $#constraints + 1) % 2 or return; $tmp = {@$value[$#constraints + 1 .. $value->$#*]}; $slurpy->check($tmp) or return; } elsif (not $slurp_any) { $tmp = [@$value[$#constraints + 1 .. $value->$#*]]; $slurpy->check($tmp) or return; } } foreach my $i (0 .. $#constraints) { $i > $value->$#* and return !!$is_optional[$i]; $constraints[$i]->check($value->[$i]) or return !1; } return !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 92,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "Tuple[ArrayRef[StrNameValid],Map[StrNameValid,ArrayRef[HashRef]]]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard::Tuple; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; join ' and ', &Types::Standard::ArrayRef()->inline_check($v), scalar @constraints == $min && !$slurpy ? "\@{$v} == $min" : sprintf("(\@{$v} == $min or (\@{$v} > $min and \@{$v} <= ${\(1 + $#constraints);}) or (\@{$v} > ${\(1 + $#constraints);} and %s))", $slurpy_any ? '!!1' : ($slurpy ? sprintf($tmpl, $v, $#constraints + 1, $v, $slurpy->inline_check('$tmp')) : sprintf("\@{$v} <= %d", scalar @constraints))), map({my $inline = $constraints[$_]->inline_check("$v->[$_]"); $inline eq '(!!1)' ? () : $is_optional[$_] ? sprintf('(@{%s} <= %d or %s)', $v, $_, $inline) : $inline;} 0 .. $#constraints);},"name" => "__ANON__","parameters" => [bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"compiled_type_constraint" => sub ($) { package Eval::TypeTiny::Sandbox; use strict; do { package Type::Tiny; Ref::Util::XS::is_plain_arrayref($_[0]) and do { my $ok = 1; foreach my $i (@{$_[0];}) { $ok = 0, last unless defined $i and not ref $i and not !($i =~ qr/(?^u:^[_a-zA-Z][_a-zA-Z0-9]*$)/); } $ok } };},"constraint" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 92,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "ArrayRef[StrNameValid]","inlined" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}';},"name" => "__ANON__","parameters" => [bless( {"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"compiled_type_constraint" => sub ($) { package Eval::TypeTiny::Sandbox; use strict; defined $_[0] and not ref $_[0] and not !($_[0] =~ qr/(?^u:^[_a-zA-Z][_a-zA-Z0-9]*$)/);},"constraint" => do{my $o},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 42,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "StrNameValid","exception_class" => "Error::TypeTiny::Assertion","library" => "GraphQL::Type::Library","name" => "StrNameValid","parent" => bless( {"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"frozen" => 1,"name" => "__ANON__","type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard::StrMatch; no warnings; use strict; my $value = shift(); defined $value and not ref $value and not !($value =~ /$regexp/);},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 42,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "StrMatch[(?^u:^[_a-zA-Z][_a-zA-Z0-9]*\$)]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard::StrMatch; no warnings; use strict; my $v = $_[1]; if ($Type::Tiny::AvoidCallbacks and $serialized_re =~ /Types::Standard::StrMatch::expressions/) { require Carp; Carp::carp('Cannot serialize regexp without callbacks; serializing using callbacks'); } "defined($v) and !ref($v) and !!( $v =~ $serialized_re )";},"name" => "__ANON__","parameters" => [qr/^[_a-zA-Z][_a-zA-Z0-9]*$/u],"parent" => bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Type::Tiny::XS::Str($_[0]) or _failed_check(33, 'StrMatch', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_StrMatch","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"constraint_generator" => sub { package Types::Standard::StrMatch; no warnings; use strict; return 'Types::Standard'->meta->get_type('StrMatch') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'StrMatch', \@_, 2, 1); my($regexp, $checker) = @_; &Types::Standard::is_RegexpRef($regexp) or _croak "First parameter to StrMatch[`a] expected to be a Regexp; got $regexp"; if (@_ > 1) { $checker = Types::TypeTiny::to_TypeTiny($checker); Types::TypeTiny::is_TypeTiny($checker) or _croak "Second parameter to StrMatch[`a] expected to be a type constraint; got $checker"; } $checker ? sub { my $value = shift(); return unless defined $value; return if ref $value; my(@m) = $value =~ /$regexp/; $checker->check(\@m); } : sub { my $value = shift(); defined $value and not ref $value and not !($value =~ /$regexp/); } ;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 902,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "StrMatch","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::StrMatch; no warnings; use strict; require B; my($regexp, $checker) = @_; my $serialized_re = $regexp->$serialize_regexp or return; if ($checker) { return unless $checker->can_be_inlined; return sub { my $v = $_[1]; if ($Type::Tiny::AvoidCallbacks and $serialized_re =~ /Types::Standard::StrMatch::expressions/) { require Carp; Carp::carp('Cannot serialize regexp without callbacks; serializing using callbacks'); } sprintf "defined($v) and !ref($v) and do { my \$m = [$v =~ %s]; %s }", $serialized_re, $checker->inline_check('$m'); } ; } else { my $regexp_string = "$regexp"; if ($regexp_string =~ /\A\(\?\^u?:\\A(\.+)\)\z/) { my $length = length $1; return sub { "defined($_) and !ref($_) and length($_)>=$length"; } ; } if ($regexp_string =~ /\A\(\?\^u?:\\A(\.+)\\z\)\z/) { my $length = length $1; return sub { "defined($_) and !ref($_) and length($_)==$length"; } ; } return sub { my $v = $_[1]; if ($Type::Tiny::AvoidCallbacks and $serialized_re =~ /Types::Standard::StrMatch::expressions/) { require Carp; Carp::carp('Cannot serialize regexp without callbacks; serializing using callbacks'); } "defined($v) and !ref($v) and !!( $v =~ $serialized_re )"; } ; }},"library" => "Types::Standard","name" => "StrMatch","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Str","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref \$_ eq 'SCALAR' or ref \(my $val = $_) eq 'SCALAR';},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 291,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Str","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; use warnings; use strict; $Type::Tiny::AvoidCallbacks ? goto $orig_inlined : "$xsubname($_[1])";},"library" => "Types::Standard","name" => "Str","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and not ref $_[0] or _failed_check(8, 'Value', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Value","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; not ref $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 276,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Value","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1]) and not ref($_[1])";},"library" => "Types::Standard","name" => "Value","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 8}, 'Type::Tiny' ),"sorter" => sub { package Types::Standard; no warnings; use strict; $_[0] cmp $_[1];},"type_default" => sub { package Types::Standard; no warnings; use strict; return '';},"uniq" => 9}, 'Type::Tiny' ),"uniq" => 33}, 'Type::Tiny' ),"uniq" => 40}, 'Type::Tiny' ),"uniq" => 41}, 'Type::Tiny' )],"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_arrayref($_[0]) or _failed_check(21, 'ArrayRef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_ArrayRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, @new) = ($_, 0);'; push @code, 'for (@$orig) {'; push @code, sprintf('++$return_orig && last unless (%s);', $coercable_item->inline_check('$_')); push @code, sprintf('push @new, (%s);', $param->coercion->inline_coercion('$_')); push @code, '}'; push @code, '$return_orig ? $orig : \\@new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my @new; foreach my $item (@$value) { return $value unless $coercable_item->check($item); push @new, $param->coerce($item); } return \@new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'ARRAY';},"constraint_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; return &Types::Standard::ArrayRef() unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'ArrayRef', \@_, 3); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to ArrayRef[`a] expected to be a type constraint; got $param"; my($min, $max) = (0, -1); $min = Types::Standard::assert_Int(shift()) if @_; $max = Types::Standard::assert_Int(shift()) if @_; my $param_compiled_check = $param->compiled_check; my $xsub; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("ArrayRef[$paramname]") if $paramname; } elsif (&Type::Tiny::_USE_MOUSE() and $param->_has_xsub and $min == 0 and $max == -1) { require Mouse::Util::TypeConstraints; my $maker = 'Mouse::Util::TypeConstraints'->can('_parameterize_ArrayRef_for'); $xsub = &$maker($param) if $maker; } return sub { my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0; } , $xsub if $min == 0 and $max == -1; return sub { my $array = shift(); return if @$array < $min; ($param->check($_) or return) foreach (@$array); return !0; } if $max == -1; return sub { my $array = shift(); return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } if $min == 0; return sub { my $array = shift(); return if @$array < $min; return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } ;},"deep_explanation" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; my($min, $max) = (0, -1); $min = $type->parameters->[1] if @{$type->parameters;} > 1; $max = $type->parameters->[2] if @{$type->parameters;} > 2; if ($min != 0 and @$value < $min) { return [sprintf('"%s" constrains array length at least %s', $type, $min), sprintf('@{%s} is %d', $varname, scalar @$value)]; } if ($max > 0 and @$value > $max) { return [sprintf('"%s" constrains array length at most %d', $type, $max), sprintf('@{%s} is %d', $varname, scalar @$value)]; } foreach my $i (0 .. $value->$#*) { my $item = $value->[$i]; next if $param->check($item); return [sprintf('"%s" constrains each value in the array with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->[%d]', $varname, $i));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 523,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "ArrayRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $param = shift(); my($min, $max) = (0, -1); $min = shift() if @_; $max = shift() if @_; my $param_compiled_check = $param->compiled_check; my $xsubname; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("ArrayRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_arrayref($_[1])" : "ref($_[1]) eq 'ARRAY'";},"library" => "Types::Standard","name" => "ArrayRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => {},"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return [];},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 21}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 43}, 'Type::Tiny' ),bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"compiled_type_constraint" => sub ($) { package Eval::TypeTiny::Sandbox; use strict; do { package Type::Tiny; Ref::Util::XS::is_plain_hashref($_[0]) and do { my $ok = 1; foreach my $v (values %{$_[0];}) { $ok = 0, last unless Type::Tiny::XS::AUTO::TC1($v); } foreach my $k (keys %{$_[0];}) { $ok = 0, last unless defined $k and not ref $k and not !($k =~ qr/(?^u:^[_a-zA-Z][_a-zA-Z0-9]*$)/); } $ok } };},"constraint" => sub { package Types::Standard::Map; no warnings; use strict; my $hash = shift(); ($keys->check($_) or return) foreach (keys %$hash); ($values->check($_) or return) foreach (values %$hash); return !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 92,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "Map[StrNameValid,ArrayRef[HashRef]]","inlined" => sub { package Types::Standard::Map; no warnings; use strict; my $h = $_[1]; return "$xsubname($h)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($h); my $k_check = $k->inline_check('$k'); my $v_check = $v->inline_check('$v'); "$p and do { " . 'my $ok = 1; ' . "for my \$v (values %{$h}) { " . "(\$ok = 0, last) unless $v_check " . '}; ' . "for my \$k (keys %{$h}) { " . "(\$ok = 0, last) unless $k_check " . '}; ' . '$ok ' . '}';},"name" => "__ANON__","parameters" => [{},bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 92,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "ArrayRef[HashRef]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}';},"name" => "__ANON__","parameters" => [bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' )],"parent" => {},"type_default" => do{my $o},"uniq" => 44}, 'Type::Tiny' )],"parent" => bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_hashref($_[0]) or _failed_check(26, 'Map', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Map","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::Map; no warnings; use strict; my($parent, $child, $kparam, $vparam) = @_; return unless $kparam->has_coercion or $vparam->has_coercion; my $kcoercable_item = $kparam->has_coercion ? $kparam->coercion->_source_type_union : $kparam; my $vcoercable_item = $vparam->has_coercion ? $vparam->coercion->_source_type_union : $vparam; my $C = 'Type::Coercion'->new('type_constraint', $child); if (!$kparam->has_coercion || $kparam->coercion->can_be_inlined and !$vparam->has_coercion || $vparam->coercion->can_be_inlined and $kcoercable_item->can_be_inlined and $vcoercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('++$return_orig && last unless (%s);', $kcoercable_item->inline_check('$_')); push @code, sprintf('++$return_orig && last unless (%s);', $vcoercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{(%s)} = (%s);', $kparam->has_coercion ? $kparam->coercion->inline_coercion('$_') : '$_', $vparam->has_coercion ? $vparam->coercion->inline_coercion('$orig->{$_}') : '$orig->{$_}'); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $kcoercable_item->check($k) and $vcoercable_item->check($value->{$k}); $new{$kparam->has_coercion ? $kparam->coerce($k) : $k} = $vparam->has_coercion ? $vparam->coerce($value->{$k}) : $value->{$k}; } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"constraint_generator" => sub { package Types::Standard::Map; no warnings; use strict; return $meta->get_type('Map') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Map', \@_, 2, 2); my($keys, $values) = @_; Types::TypeTiny::is_TypeTiny($keys) or _croak "First parameter to Map[`k,`v] expected to be a type constraint; got $keys"; Types::TypeTiny::is_TypeTiny($values) or _croak "Second parameter to Map[`k,`v] expected to be a type constraint; got $values"; my @xsub; do { my(@known) = map({my $known = Type::Tiny::XS::is_known($_->compiled_check); defined $known ? $known : ();} $keys, $values); if (@known == 2) { my $xsub = Type::Tiny::XS::get_coderef_for(sprintf('Map[%s,%s]', @known)); push @xsub, $xsub if $xsub; } }; sub { my $hash = shift(); ($keys->check($_) or return) foreach (keys %$hash); ($values->check($_) or return) foreach (values %$hash); return !0; } , @xsub;},"deep_explanation" => sub { package Types::Standard::Map; no warnings; use strict; require B; my($type, $value, $varname) = @_; my($kparam, $vparam) = @{$type->parameters;}; foreach my $k (sort keys %$value) { unless ($kparam->check($k)) { return [sprintf('"%s" constrains each key in the hash with "%s"', $type, $kparam), @{$kparam->validate_explain($k, sprintf('key %s->{%s}', $varname, B::perlstring($k)));}]; } unless ($vparam->check($value->{$k})) { return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $vparam), @{$vparam->validate_explain($value->{$k}, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 675,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Map","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::Map; no warnings; use strict; my($k, $v) = @_; return unless $k->can_be_inlined and $v->can_be_inlined; my $xsubname; do { my(@known) = map({my $known = Type::Tiny::XS::is_known($_->compiled_check); defined $known ? $known : ();} $k, $v); if (@known == 2) { $xsubname = Type::Tiny::XS::get_subname_for(sprintf('Map[%s,%s]', @known)); } }; return sub { my $h = $_[1]; return "$xsubname($h)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($h); my $k_check = $k->inline_check('$k'); my $v_check = $v->inline_check('$v'); "$p and do { " . 'my $ok = 1; ' . "for my \$v (values %{$h}) { " . "(\$ok = 0, last) unless $v_check " . '}; ' . "for my \$k (keys %{$h}) { " . "(\$ok = 0, last) unless $k_check " . '}; ' . '$ok ' . '}'; } ;},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::Map; no warnings; use strict; my $self = shift(); my($key) = @_; return Types::Standard::is_Str($key) if $self == &Types::Standard::Map(); my $map = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::Map(); } ); my($kcheck, $vcheck) = @{$map->parameters;}; ($kcheck || &Types::Standard::Any())->check($key);},"hashref_allows_value" => sub { package Types::Standard::Map; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::Map(); my $map = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::Map(); } ); my($kcheck, $vcheck) = @{$map->parameters;}; ($kcheck || &Types::Standard::Any())->check($key) and ($vcheck || &Types::Standard::Any())->check($value);}},"name" => "Map","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default;},"uniq" => 26}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 45}, 'Type::Tiny' )],"parent" => bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_arrayref($_[0]) or _failed_check(29, 'Tuple', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Tuple","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::Tuple; no warnings; use strict; my($parent, $child, @tuple) = @_; my $slurpy = @tuple && Types::TypeTiny::is_TypeTiny($tuple[-1]) && $tuple[-1]->is_strictly_a_type_of($_Slurpy) ? pop @tuple : undef; my $child_coercions_exist = 0; my $all_inlinable = 1; foreach my $tc (@tuple, $slurpy ? $slurpy : ()) { $all_inlinable = 0 unless $tc->can_be_inlined; $all_inlinable = 0 if $tc->has_coercion and not $tc->coercion->can_be_inlined; ++$child_coercions_exist if $tc->has_coercion; } return unless $child_coercions_exist; my $C = 'Type::Coercion'->new('type_constraint', $child); my $slurpy_is_hashref = $slurpy && $slurpy->my_slurp_into eq 'HASH'; if ($all_inlinable) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my $label = sprintf('TUPLELABEL%d', ++$label_counter); my @code; push @code, 'do { my ($orig, $return_orig, $tmp, @new) = ($_, 0);'; push @code, "${label}: {"; push @code, sprintf('(($return_orig = 1), last %s) if @$orig > %d;', $label, scalar @tuple) unless $slurpy; foreach my $i (0 .. $#tuple) { my $ct = $tuple[$i]; my $ct_coerce = $ct->has_coercion; my $ct_optional = $ct->is_a_type_of(&Types::Standard::Optional()); push @code, sprintf('if (@$orig > %d) { $tmp = %s; (%s) ? ($new[%d]=$tmp) : (($return_orig=1), last %s) }', $i, $ct_coerce ? $ct->coercion->inline_coercion("\$orig->[$i]") : "\$orig->[$i]", $ct->inline_check('$tmp'), $i, $label); } if ($slurpy) { my $size = @tuple; push @code, sprintf('if (@$orig > %d) {', $size); push @code, sprintf($slurpy_is_hashref ? 'my $tail = do { no warnings; +{ @{$orig}[%d .. $#$orig]} };' : 'my $tail = [ @{$orig}[%d .. $#$orig] ];', $size); push @code, $slurpy->has_coercion ? sprintf('$tail = %s;', $slurpy->coercion->inline_coercion('$tail')) : ''; push @code, sprintf('(%s) ? push(@new, %s$tail) : ($return_orig++);', $slurpy->inline_check('$tail'), $slurpy_is_hashref ? '%' : '@'); push @code, '}'; } push @code, '}'; push @code, '$return_orig ? $orig : \\@new'; push @code, '}'; join $", @code; } )); } else { my(@is_optional) = map((!!$_->is_strictly_a_type_of($_Optional)), @tuple); $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; if (not $slurpy and @$value > @tuple) { return $value; } my @new; foreach my $i (0 .. $#tuple) { return \@new if $i > $value->$#* and $is_optional[$i]; my $ct = $tuple[$i]; my $x = $ct->has_coercion ? $ct->coerce($value->[$i]) : $value->[$i]; return $value unless $ct->check($x); $new[$i] = $x; } if ($slurpy and @$value > @tuple) { my $tmp = $slurpy_is_hashref ? {@{$value;}[@tuple .. $value->$#*]} : [@{$value;}[@tuple .. $value->$#*]]; $tmp = $slurpy->coerce($tmp) if $slurpy->has_coercion; $slurpy->check($tmp) ? push(@new, $slurpy_is_hashref ? %$tmp : @$tmp) : (return $value); } return \@new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"constraint_generator" => sub { package Types::Standard::Tuple; no warnings; use strict; my $slurpy = @_ && Types::TypeTiny::is_TypeTiny($_[-1]) && $_[-1]->is_strictly_a_type_of($_Slurpy) ? pop() : undef; my(@constraints) = @_; foreach $_ (@constraints) { Types::TypeTiny::is_TypeTiny($_) or _croak "Parameters to Tuple[...] expected to be type constraints; got $_"; } my @xsub; unless ($slurpy) { my(@known) = map({my $known; $known = Type::Tiny::XS::is_known($_->compiled_check) unless $_->is_strictly_a_type_of($_Optional); defined $known ? $known : ();} @constraints); if (@known == @constraints) { my $xsub = Type::Tiny::XS::get_coderef_for(sprintf('Tuple[%s]', join(',', @known))); push @xsub, $xsub if $xsub; } } my(@is_optional) = map((!!$_->is_strictly_a_type_of($_Optional)), @constraints); my $slurp_hash = $slurpy && $slurpy->my_slurp_into eq 'HASH'; my $slurp_any = $slurpy && $slurpy->my_unslurpy->equals(&Types::Standard::Any()); my(@sorted_is_optional) = sort(@is_optional); join('|', @sorted_is_optional) eq join('|', @is_optional) or _croak 'Optional parameters to Tuple[...] cannot precede required parameters'; sub { my $value = $_[0]; if ($#constraints < $value->$#*) { return !1 unless $slurpy; my $tmp; if ($slurp_hash) { ($value->$#* - $#constraints + 1) % 2 or return; $tmp = {@$value[$#constraints + 1 .. $value->$#*]}; $slurpy->check($tmp) or return; } elsif (not $slurp_any) { $tmp = [@$value[$#constraints + 1 .. $value->$#*]]; $slurpy->check($tmp) or return; } } foreach my $i (0 .. $#constraints) { $i > $value->$#* and return !!$is_optional[$i]; $constraints[$i]->check($value->[$i]) or return !1; } return !0; } , @xsub;},"deep_explanation" => sub { package Types::Standard::Tuple; no warnings; use strict; my($type, $value, $varname) = @_; my(@constraints) = @{$type->parameters;}; my $slurpy = @constraints && Types::TypeTiny::is_TypeTiny($constraints[-1]) && $constraints[-1]->is_strictly_a_type_of($_Slurpy) ? pop @constraints : undef; @constraints = map(Types::TypeTiny::to_TypeTiny($_), @constraints); if (@constraints < @$value and not $slurpy) { return [sprintf('"%s" expects at most %d values in the array', $type, scalar @constraints), sprintf('%d values found; too many', scalar @$value)]; } foreach my $i (0 .. $#constraints) { next if $constraints[$i]->is_strictly_a_type_of(&Types::Standard::Optional()) and $i > $value->$#*; next if $constraints[$i]->check($value->[$i]); return [sprintf('"%s" constrains value at index %d of array with "%s"', $type, $i, $constraints[$i]), @{$constraints[$i]->validate_explain($value->[$i], sprintf('%s->[%s]', $varname, $i));}]; } if (defined $slurpy) { my $tmp = $slurpy->my_slurp_into eq 'HASH' ? {@$value[$#constraints + 1 .. $value->$#*]} : [@$value[$#constraints + 1 .. $value->$#*]]; $slurpy->check($tmp) or return [sprintf('Array elements from index %d are slurped into a %s which is constrained with "%s"', $#constraints + 1, $slurpy->my_slurp_into eq 'HASH' ? 'hashref' : 'arrayref', $slurpy->my_unslurpy || $slurpy), @{($slurpy->my_unslurpy || $slurpy)->validate_explain($tmp, '$SLURPY');}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 802,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Tuple","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::Tuple; no warnings; use strict; my $slurpy = @_ && Types::TypeTiny::is_TypeTiny($_[-1]) && $_[-1]->is_strictly_a_type_of($_Slurpy) ? pop() : undef; my(@constraints) = @_; return if grep {not $_->can_be_inlined;} @constraints; return if defined $slurpy and not $slurpy->can_be_inlined; my $xsubname; unless ($slurpy) { my(@known) = map({my $known; $known = Type::Tiny::XS::is_known($_->compiled_check) unless $_->is_strictly_a_type_of($_Optional); defined $known ? $known : ();} @constraints); if (@known == @constraints) { $xsubname = Type::Tiny::XS::get_subname_for(sprintf('Tuple[%s]', join(',', @known))); } } my $tmpl = 'do { my $tmp = +[@{%s}[%d..$#{%s}]]; %s }'; my $slurpy_any; if (defined $slurpy) { $tmpl = 'do { my ($orig, $from, $to) = (%s, %d, $#{%s});(($to-$from) %% 2) and do { my $tmp = +{@{$orig}[$from..$to]}; %s }}' if $slurpy->my_slurp_into eq 'HASH'; $slurpy_any = 1 if $slurpy->my_unslurpy->equals(&Types::Standard::Any()); } my(@is_optional) = map((!!$_->is_strictly_a_type_of($_Optional)), @constraints); my $min = 0 + grep((!$_), @is_optional); return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; join ' and ', &Types::Standard::ArrayRef()->inline_check($v), scalar @constraints == $min && !$slurpy ? "\@{$v} == $min" : sprintf("(\@{$v} == $min or (\@{$v} > $min and \@{$v} <= ${\(1 + $#constraints);}) or (\@{$v} > ${\(1 + $#constraints);} and %s))", $slurpy_any ? '!!1' : ($slurpy ? sprintf($tmpl, $v, $#constraints + 1, $v, $slurpy->inline_check('$tmp')) : sprintf("\@{$v} <= %d", scalar @constraints))), map({my $inline = $constraints[$_]->inline_check("$v->[$_]"); $inline eq '(!!1)' ? () : $is_optional[$_] ? sprintf('(@{%s} <= %d or %s)', $v, $_, $inline) : $inline;} 0 .. $#constraints); } ;},"library" => "Types::Standard","name" => "Tuple","name_generator" => sub { package Types::Standard; no warnings; use strict; my($s, @a) = @_; sprintf '%s[%s]', $s, join(',', @a);},"parent" => {},"uniq" => 29}, 'Type::Tiny' ),"uniq" => 46}, 'Type::Tiny' ),"uniq" => 47}, 'Type::Tiny' );$v->{"parent"}{"compiled_type_constraint"} = $v->{"compiled_type_constraint"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"constraint"} = $v->{"constraint"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"compiled_type_constraint"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"compiled_type_constraint"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"constraint"} = $v->{"constraint"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"} = $v->{"constraint"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"constraint"};$v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parameters"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parent"};$v->{"parent"}{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parent"}{"parent"};$v->{"parent"}{"parameters"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[0]{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parameters"}[0]{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"}{"parent"};$v->{"parent"}{"parameters"}[0]{"type_default"} = $v->{"parent"}{"parameters"}[0]{"parent"}{"type_default"};$v->{"parent"}{"parameters"}[1]{"parameters"}[0] = $v->{"parent"}{"parameters"}[0]{"parameters"}[0];$v->{"parent"}{"parameters"}[1]{"parameters"}[1]{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[1]{"parameters"}[1];$v->{"parent"}{"parameters"}[1]{"parameters"}[1]{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[1]{"parameters"}[1]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[1]{"parameters"}[1]{"parameters"}[0]{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[1]{"parameters"}[1]{"parameters"}[0];$v->{"parent"}{"parameters"}[1]{"parameters"}[1]{"parameters"}[0]{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[1]{"parameters"}[1]{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[1]{"parameters"}[1]{"parameters"}[0]{"parent"} = $v->{"parent"}{"parameters"}[0]{"parent"}{"parent"};$v->{"parent"}{"parameters"}[1]{"parameters"}[1]{"parent"} = $v->{"parent"}{"parameters"}[0]{"parent"};$v->{"parent"}{"parameters"}[1]{"parameters"}[1]{"type_default"} = $v->{"parent"}{"parameters"}[0]{"parent"}{"type_default"};$v->{"parent"}{"parameters"}[1]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[1]{"parent"};$v->{"parent"}{"parameters"}[1]{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[1]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[1]{"parent"}{"constraint"} = $v->{"constraint"};$v->{"parent"}{"parameters"}[1]{"parent"}{"parent"} = $v->{"parent"}{"parameters"}[1]{"parameters"}[1]{"parameters"}[0];$v->{"parent"}{"parameters"}[1]{"type_default"} = $v->{"parent"}{"parameters"}[1]{"parameters"}[1]{"parameters"}[0]{"type_default"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"constraint"} = $v->{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parameters"}[0]{"parent"}; \$v}->get_message($fields)) |
0 |
2169 |
2169 |
|
| 418 |
2522 |
| DEBUG and _debug('_execute_fields_serially', $parent_type->to_string, $fields, $root_value); |
| 419 |
|
| # TODO implement |
| 420 |
2522 |
| goto &_execute_fields; |
| 421 |
|
| } |
| 422 |
|
| |
| 423 |
15 |
▶ | use constant FIELDNAME2SPECIAL => { |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 424 |
15 |
| map { ($_->{name} => $_) } $SCHEMA_META_FIELD_DEF, $TYPE_META_FIELD_DEF |
| 425 |
15 |
| }; |
| 426 |
2169 |
▶ | fun _get_field_def( |
|
Subroutine
_get_field_def: called CC=11 SCAR=24.6
|
| 427 |
|
| (InstanceOf['GraphQL::Schema']) $schema, |
| 428 |
|
| (InstanceOf['GraphQL::Type']) $parent_type, |
| 429 |
|
| StrNameValid $field_name, |
| 430 |
2522 |
▶ | ) :ReturnType(Maybe[HashRef]) { |
Branch: 5 branches
| Branch | True | False | Total |
| @_ < 3 and Function::Parameters::_croak('Too few arguments for fun _get_field_def (expected 3, got ' . @_ . ')') |
13 |
2156 |
2169 |
| @_ > 3 and Function::Parameters::_croak('Too many arguments for fun _get_field_def (expected 3, got ' . @_ . ')') |
0 |
2167 |
2167 |
| Type::Tiny::XS::AUTO::TC28($schema) or Function::Parameters::_croak('In fun _get_field_def: parameter 1 ($schema): ' . ${my $v = bless( {"class" => "GraphQL::Schema","coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 985,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "InstanceOf[\"GraphQL::Schema\"]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","name" => "__ANON__","type_constraints" => [bless( {"class" => "Moo::Object","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_blessed_ref($_[0]) or _failed_check(24, 'Object', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Object","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; builtin::blessed($_);},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 578,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Object","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_blessed_ref($_[1])" : &$maybe_load_modules('Scalar::Util', "Scalar::Util::blessed($_[1])");},"is_object" => 1,"library" => "Types::Standard","name" => "Object","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"uniq" => 24}, 'Type::Tiny' ),"uniq" => 184}, 'Type::Tiny::Class' ),bless( {"class" => "GraphQL::MaybeTypeCheck","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","uniq" => 185}, 'Type::Tiny::Class' )],"uniq" => 186,"xs_sub" => "Type::Tiny::XS::AUTO::TC12"}, 'Type::Tiny::Intersection' ),"uniq" => 150}, 'Type::Tiny::Class' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($schema)) |
0 |
2167 |
2167 |
| Type::Tiny::XS::AUTO::TC9($parent_type) or Function::Parameters::_croak('In fun _get_field_def: parameter 2 ($parent_type): ' . ${my $v = bless( {"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"class" => "GraphQL::Type","coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 985,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "InstanceOf[\"GraphQL::Type\"]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Method/Generate/Accessor.pm","line" => 716,"package" => "Method::Generate::Accessor"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","name" => "__ANON__","type_constraints" => [bless( {"class" => "Moo::Object","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Method/Generate/Accessor.pm","line" => 716,"package" => "Method::Generate::Accessor"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_blessed_ref($_[0]) or _failed_check(24, 'Object', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Object","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; builtin::blessed($_);},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 578,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Object","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_blessed_ref($_[1])" : &$maybe_load_modules('Scalar::Util', "Scalar::Util::blessed($_[1])");},"is_object" => 1,"library" => "Types::Standard","name" => "Object","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"uniq" => 24}, 'Type::Tiny' ),"uniq" => 103}, 'Type::Tiny::Class' ),bless( {"class" => "GraphQL::MaybeTypeCheck","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Method/Generate/Accessor.pm","line" => 716,"package" => "Method::Generate::Accessor"},"deprecated" => !!0,"inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","uniq" => 104}, 'Type::Tiny::Class' )],"uniq" => 105,"xs_sub" => "Type::Tiny::XS::AUTO::TC12"}, 'Type::Tiny::Intersection' ),"uniq" => 101}, 'Type::Tiny::Class' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($parent_type)) |
2167 |
0 |
2167 |
| defined $field_name and not ref $field_name and not !($field_name =~ qr/(?^u:^[_a-zA-Z][_a-zA-Z0-9]*$)/u) or Function::Parameters::_croak('In fun _get_field_def: parameter 3 ($field_name): ' . ${my $v = bless( {"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"compiled_type_constraint" => sub ($) { package Eval::TypeTiny::Sandbox; use strict; defined $_[0] and not ref $_[0] and not !($_[0] =~ qr/(?^u:^[_a-zA-Z][_a-zA-Z0-9]*$)/);},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 42,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "StrNameValid","exception_class" => "Error::TypeTiny::Assertion","library" => "GraphQL::Type::Library","name" => "StrNameValid","parent" => bless( {"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"frozen" => 1,"name" => "__ANON__","type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard::StrMatch; no warnings; use strict; my $value = shift(); defined $value and not ref $value and not !($value =~ /$regexp/);},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 42,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "StrMatch[(?^u:^[_a-zA-Z][_a-zA-Z0-9]*\$)]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard::StrMatch; no warnings; use strict; my $v = $_[1]; if ($Type::Tiny::AvoidCallbacks and $serialized_re =~ /Types::Standard::StrMatch::expressions/) { require Carp; Carp::carp('Cannot serialize regexp without callbacks; serializing using callbacks'); } "defined($v) and !ref($v) and !!( $v =~ $serialized_re )";},"name" => "__ANON__","parameters" => [qr/^[_a-zA-Z][_a-zA-Z0-9]*$/u],"parent" => bless( {"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Type::Tiny::XS::Str($_[0]) or _failed_check(33, 'StrMatch', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_StrMatch","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"constraint_generator" => sub { package Types::Standard::StrMatch; no warnings; use strict; return 'Types::Standard'->meta->get_type('StrMatch') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'StrMatch', \@_, 2, 1); my($regexp, $checker) = @_; &Types::Standard::is_RegexpRef($regexp) or _croak "First parameter to StrMatch[`a] expected to be a Regexp; got $regexp"; if (@_ > 1) { $checker = Types::TypeTiny::to_TypeTiny($checker); Types::TypeTiny::is_TypeTiny($checker) or _croak "Second parameter to StrMatch[`a] expected to be a type constraint; got $checker"; } $checker ? sub { my $value = shift(); return unless defined $value; return if ref $value; my(@m) = $value =~ /$regexp/; $checker->check(\@m); } : sub { my $value = shift(); defined $value and not ref $value and not !($value =~ /$regexp/); } ;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 902,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "StrMatch","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::StrMatch; no warnings; use strict; require B; my($regexp, $checker) = @_; my $serialized_re = $regexp->$serialize_regexp or return; if ($checker) { return unless $checker->can_be_inlined; return sub { my $v = $_[1]; if ($Type::Tiny::AvoidCallbacks and $serialized_re =~ /Types::Standard::StrMatch::expressions/) { require Carp; Carp::carp('Cannot serialize regexp without callbacks; serializing using callbacks'); } sprintf "defined($v) and !ref($v) and do { my \$m = [$v =~ %s]; %s }", $serialized_re, $checker->inline_check('$m'); } ; } else { my $regexp_string = "$regexp"; if ($regexp_string =~ /\A\(\?\^u?:\\A(\.+)\)\z/) { my $length = length $1; return sub { "defined($_) and !ref($_) and length($_)>=$length"; } ; } if ($regexp_string =~ /\A\(\?\^u?:\\A(\.+)\\z\)\z/) { my $length = length $1; return sub { "defined($_) and !ref($_) and length($_)==$length"; } ; } return sub { my $v = $_[1]; if ($Type::Tiny::AvoidCallbacks and $serialized_re =~ /Types::Standard::StrMatch::expressions/) { require Carp; Carp::carp('Cannot serialize regexp without callbacks; serializing using callbacks'); } "defined($v) and !ref($v) and !!( $v =~ $serialized_re )"; } ; }},"library" => "Types::Standard","name" => "StrMatch","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Str","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref \$_ eq 'SCALAR' or ref \(my $val = $_) eq 'SCALAR';},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 291,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Str","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; use warnings; use strict; $Type::Tiny::AvoidCallbacks ? goto $orig_inlined : "$xsubname($_[1])";},"library" => "Types::Standard","name" => "Str","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and not ref $_[0] or _failed_check(8, 'Value', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Value","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; not ref $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 276,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Value","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1]) and not ref($_[1])";},"library" => "Types::Standard","name" => "Value","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 8}, 'Type::Tiny' ),"sorter" => sub { package Types::Standard; no warnings; use strict; $_[0] cmp $_[1];},"type_default" => sub { package Types::Standard; no warnings; use strict; return '';},"uniq" => 9}, 'Type::Tiny' ),"uniq" => 33}, 'Type::Tiny' ),"uniq" => 40}, 'Type::Tiny' ),"uniq" => 41}, 'Type::Tiny' );$v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"compiled_type_constraint"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"compiled_type_constraint"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"constraint"} = $v->{"constraint"};$v->{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"parent"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parent"}{"parent"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"} = $v->{"constraint"};$v->{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"constraint"};$v->{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($field_name)) |
2167 |
0 |
2167 |
Condition100%6/6
defined $field_name and not ref $field_name and not !($field_name =~ qr/(?^u:^[_a-zA-Z][_a-zA-Z0-9]*$)/u)
defined $field_name and not ref $field_name
MC/DC0%0/3
defined $field_name and not ref $field_name and not !($field_name =~ qr/(?^u:^[_a-zA-Z][_a-zA-Z0-9]*$)/u)
defined $field_name
not ref $field_name
not !($field_name =~ qr/(?^u:^[_a-zA-Z][_a-zA-Z0-9]*$)/u)
Truth table0%0/4
A and not(B) and C
A= defined $field_nameB= not ref $field_nameC= not !($field_name =~ qr/(?^u:^[_a-zA-Z][_a-zA-Z0-9]*$)/u)
| A | B | C | result |
| 0 | X | X | 0 |
| 1 | 0 | X | 0 |
| 1 | 1 | 0 | 0 |
| 1 | 1 | 1 | 1 |
|
| 431 |
|
| return $TYPE_NAME_META_FIELD_DEF |
| 432 |
1425 |
▶ | if $field_name eq $TYPE_NAME_META_FIELD_DEF->{name}; |
Branch: 1 branch
| Branch | True | False | Total |
| if $field_name eq $GraphQL::Execution::TYPE_NAME_META_FIELD_DEF->{"name"} |
2167 |
0 |
2167 |
|
| 433 |
|
| return FIELDNAME2SPECIAL->{$field_name} |
| 434 |
1425 |
▶ | if FIELDNAME2SPECIAL->{$field_name} and $parent_type == $schema->query; |
Branch: 1 branch
| Branch | True | False | Total |
| if ${my $v = {"__schema" => {"description" => "Access the current type schema of this server.","name" => "__schema","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; $_[3]{'schema'};},"type" => bless( {"of" => bless( {"_fields_deprecation_applied" => 1,"_fields_resolved" => 1,"_interfaces_resolved" => 1,"description" => "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.","fields" => {"directives" => {"description" => "A list of all directives supported by this server.","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; $_[0]->directives;},"type" => bless( {"of" => bless( {"non_null" => {},"of" => bless( {"list" => {},"of" => bless( {"_fields_deprecation_applied" => 1,"_fields_resolved" => 1,"_interfaces_resolved" => 1,"description" => "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.","fields" => {"args" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; _hash2array($_[0]->args);},"type" => bless( {"of" => bless( {"non_null" => {},"of" => bless( {"list" => {},"of" => bless( {"_fields_deprecation_applied" => 1,"_fields_resolved" => 1,"_interfaces_resolved" => 1,"description" => "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.","fields" => {"defaultValue" => {"description" => "A GraphQL-formatted string representing the default value for this input value.","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; '???'; return unless defined(my $value = $_[0]{'default_value'}); my $gql = $_[0]{'type'}->perl_to_graphql($value); return $gql if $_[0]{'type'}->isa('GraphQL::Type::Enum'); $JSON_noutf8->encode($gql);},"type" => bless( {"description" => "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.","name" => "String","non_null" => bless( {"of" => {}}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Input__AND__GraphQL::Role::Output' ),"parse_value" => sub { package GraphQL::Type::Scalar; use warnings; use strict; no feature ':all'; use feature ':5.12'; BEGIN { $^H{'Function::Parameters/config'} = 'HASH(0x5cbbe49dddc0)'; } return undef unless defined $_[0]; goto \&$closure;},"serialize" => sub { package GraphQL::Type::Scalar; use warnings; use strict; no feature ':all'; use feature ':5.12'; BEGIN { $^H{'Function::Parameters/config'} = 'HASH(0x5cbbe49dddc0)'; } return undef unless defined $_[0]; goto \&$closure;}}, 'GraphQL::Type::Scalar' )},"description" => {"type" => {}},"name" => {"type" => {}},"type" => {"type" => bless( {"list" => bless( {"non_null" => bless( {"of" => {}}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' ),"of" => {}}, 'GraphQL::Type::List__WITH__GraphQL::Role::Output' ),"of" => bless( {"_fields_deprecation_applied" => 1,"_fields_resolved" => 1,"_interfaces_resolved" => 1,"description" => "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.","fields" => {"description" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; return undef unless $root_value->can($field_name); my(@passon) = %$args ? $args : (); $root_value->$field_name(@passon);},"type" => {}},"enumValues" => {"args" => {"includeDeprecated" => {"default_value" => 0,"type" => bless( {"description" => "The `Boolean` scalar type represents `true` or `false`.","name" => "Boolean","non_null" => bless( {"of" => {}}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Input__AND__GraphQL::Role::Output' ),"parse_value" => sub { package GraphQL::Type::Scalar; use warnings; use strict; no feature ':all'; use feature ':5.12'; BEGIN { $^H{'Function::Parameters/config'} = 'HASH(0x5cbbe49dddc0)'; } return undef unless defined $_[0]; goto \&$closure;},"serialize" => sub { package GraphQL::Type::Scalar; use warnings; use strict; no feature ':all'; use feature ':5.12'; BEGIN { $^H{'Function::Parameters/config'} = 'HASH(0x5cbbe49dddc0)'; } return undef unless defined $_[0]; goto \&$closure;}}, 'GraphQL::Type::Scalar' )}},"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($type, $args) = @_; return unless $type->isa('GraphQL::Type::Enum'); my $values = $type->values; '???'; $values = {map({$_, $values->{$_};} grep((!$values->{$_}{'is_deprecated'}), keys %$values))} unless $args->{'includeDeprecated'}; [map({+{'name', $_, 'description', $values->{$_}{'description'}, 'isDeprecated', $values->{$_}{'is_deprecated'}, 'deprecationReason', $values->{$_}{'deprecation_reason'}};} sort(keys %{$values;}))];},"type" => bless( {"of" => bless( {"list" => {},"of" => bless( {"_fields_deprecation_applied" => 1,"_fields_resolved" => 1,"_interfaces_resolved" => 1,"description" => "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.","fields" => {"deprecationReason" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; $root_value->{$real};},"type" => {}},"description" => {"type" => {}},"isDeprecated" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; not !$root_value->{$real};},"type" => {}},"name" => {"type" => {}}},"name" => "__EnumValue","non_null" => {}}, 'GraphQL::Type::Object' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )}, 'GraphQL::Type::List__WITH__GraphQL::Role::Output' )},"fields" => {"args" => {"includeDeprecated" => {"default_value" => 0,"type" => {}}},"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($type, $args) = @_; return undef unless $type->DOES('GraphQL::Role::FieldsOutput'); my $map = $type->fields; $map = {map({$_, $map->{$_};} grep((!$map->{$_}{'deprecation_reason'}), keys %$map))} unless $args->{'includeDeprecated'}; [map({+{'name', $_, 'description', $map->{$_}{'description'}, 'args', $map->{$_}{'args'}, 'type', $map->{$_}{'type'}, 'isDeprecated', $map->{$_}{'is_deprecated'}, 'deprecationReason', $map->{$_}{'deprecation_reason'}};} sort(keys %{$map;}))];},"type" => bless( {"of" => bless( {"list" => {},"of" => bless( {"_fields_deprecation_applied" => 1,"_fields_resolved" => 1,"_interfaces_resolved" => 1,"description" => "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.","fields" => {"args" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; _hash2array($_[0]{'args'} || {});},"type" => {}},"deprecationReason" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; $root_value->{$real};},"type" => {}},"description" => {"type" => {}},"isDeprecated" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; not !$root_value->{$real};},"type" => {}},"name" => {"type" => {}},"type" => {"type" => {}}},"name" => "__Field","non_null" => {}}, 'GraphQL::Type::Object' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )}, 'GraphQL::Type::List__WITH__GraphQL::Role::Output' )},"inputFields" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($type) = @_; return unless $type->isa('GraphQL::Type::InputObject'); _hash2array($type->fields || {});},"type" => {}},"interfaces" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($type) = @_; return unless $type->isa('GraphQL::Type::Object'); $type->interfaces or [];},"type" => {}},"kind" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my $c = ref $_[0]; $c =~ s/__.*//u; {GraphQL::Type::Enum => 'ENUM', GraphQL::Type::InputObject => 'INPUT_OBJECT', GraphQL::Type::Interface => 'INTERFACE', GraphQL::Type::List => 'LIST', GraphQL::Type::NonNull => 'NON_NULL', GraphQL::Type::Object => 'OBJECT', GraphQL::Type::Scalar => 'SCALAR', GraphQL::Type::Union => 'UNION'}->{$c} // die('Unknown kind of type => ' . ref($_[0]));},"type" => bless( {"of" => bless( {"_fields_deprecation_applied" => 1,"description" => "An enum describing what kind of type a given `__Type` is.","name" => "__TypeKind","non_null" => {},"values" => {"ENUM" => {"description" => "Indicates this type is an enum. `enumValues` is a valid field.","value" => "ENUM"},"INPUT_OBJECT" => {"description" => "Indicates this type is an input object. `inputFields` is a valid field.","value" => "INPUT_OBJECT"},"INTERFACE" => {"description" => "Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.","value" => "INTERFACE"},"LIST" => {"description" => "Indicates this type is a list. `ofType` is a valid field.","value" => "LIST"},"NON_NULL" => {"description" => "Indicates this type is a non-null. `ofType` is a valid field.","value" => "NON_NULL"},"OBJECT" => {"description" => "Indicates this type is an object. `fields` and `interfaces` are valid fields.","value" => "OBJECT"},"SCALAR" => {"description" => "Indicates this type is a scalar.","value" => "SCALAR"},"UNION" => {"description" => "Indicates this type is a union. `possibleTypes` is a valid field.","value" => "UNION"}}}, 'GraphQL::Type::Enum' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Input__AND__GraphQL::Role::Output' )},"name" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; return undef if $root_value->can('of'); my(@passon) = %$args ? $args : (); $root_value->name(@passon);},"type" => {}},"ofType" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; return unless $_[0]->can('of'); $_[0]->of;},"type" => {}},"possibleTypes" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; return unless $_[0]->DOES('GraphQL::Role::Abstract'); $_[3]{'schema'}->get_possible_types($_[0]);},"type" => {}}},"name" => "__Type","non_null" => {}}, 'GraphQL::Type::Object' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )}},"name" => "__InputValue","non_null" => {}}, 'GraphQL::Type::Object' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )}, 'GraphQL::Type::List__WITH__GraphQL::Role::Output' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )},"description" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; return undef unless $root_value->can($field_name); my(@passon) = %$args ? $args : (); $root_value->$field_name(@passon);},"type" => {}},"locations" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; return undef unless $root_value->can($field_name); my(@passon) = %$args ? $args : (); $root_value->$field_name(@passon);},"type" => bless( {"of" => bless( {"non_null" => {},"of" => bless( {"list" => {},"of" => bless( {"_fields_deprecation_applied" => 1,"description" => "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.","name" => "__DirectiveLocation","non_null" => {},"values" => {"ARGUMENT_DEFINITION" => {"description" => "Location adjacent to an argument definition.","value" => "ARGUMENT_DEFINITION"},"ENUM" => {"description" => "Location adjacent to an enum definition.","value" => "ENUM"},"ENUM_VALUE" => {"description" => "Location adjacent to an enum value definition.","value" => "ENUM_VALUE"},"FIELD" => {"description" => "Location adjacent to a field.","value" => "FIELD"},"FIELD_DEFINITION" => {"description" => "Location adjacent to a field definition.","value" => "FIELD_DEFINITION"},"FRAGMENT_DEFINITION" => {"description" => "Location adjacent to a fragment definition.","value" => "FRAGMENT_DEFINITION"},"FRAGMENT_SPREAD" => {"description" => "Location adjacent to a fragment spread.","value" => "FRAGMENT_SPREAD"},"INLINE_FRAGMENT" => {"description" => "Location adjacent to an inline fragment.","value" => "INLINE_FRAGMENT"},"INPUT_FIELD_DEFINITION" => {"description" => "Location adjacent to an input object field definition.","value" => "INPUT_FIELD_DEFINITION"},"INPUT_OBJECT" => {"description" => "Location adjacent to an input object type definition.","value" => "INPUT_OBJECT"},"INTERFACE" => {"description" => "Location adjacent to an interface definition.","value" => "INTERFACE"},"MUTATION" => {"description" => "Location adjacent to a mutation operation.","value" => "MUTATION"},"OBJECT" => {"description" => "Location adjacent to an object type definition.","value" => "OBJECT"},"QUERY" => {"description" => "Location adjacent to a query operation.","value" => "QUERY"},"SCALAR" => {"description" => "Location adjacent to a scalar definition.","value" => "SCALAR"},"SCHEMA" => {"description" => "Location adjacent to a schema definition.","value" => "SCHEMA"},"SUBSCRIPTION" => {"description" => "Location adjacent to a subscription operation.","value" => "SUBSCRIPTION"},"UNION" => {"description" => "Location adjacent to a union definition.","value" => "UNION"}}}, 'GraphQL::Type::Enum' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Input__AND__GraphQL::Role::Output' )}, 'GraphQL::Type::List__WITH__GraphQL::Role::Input__AND__GraphQL::Role::Output' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Input__AND__GraphQL::Role::Output' )},"name" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; return undef unless $root_value->can($field_name); my(@passon) = %$args ? $args : (); $root_value->$field_name(@passon);},"type" => {}}},"name" => "__Directive","non_null" => {}}, 'GraphQL::Type::Object' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )}, 'GraphQL::Type::List__WITH__GraphQL::Role::Output' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )},"mutationType" => {"description" => "If this server supports mutation, the type that mutation operations will be rooted at.","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; $_[0]->mutation;},"type" => {}},"queryType" => {"description" => "The type that query operations will be rooted at.","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; $_[0]->query;},"type" => {}},"subscriptionType" => {"description" => "If this server support subscription, the type that subscription operations will be rooted at.","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; $_[0]->subscription;},"type" => {}},"types" => {"description" => "A list of all types supported by this server.","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; [(sort {$a->name cmp $b->name;} values %{$_[0]->name2type;})];},"type" => {}}},"name" => "__Schema","non_null" => {}}, 'GraphQL::Type::Object' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )},"__type" => {"args" => {"name" => {"type" => {}}},"description" => "Request the type information of a single type.","name" => "__type","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; $_[3]{'schema'}->name2type->{$_[1]{'name'}};},"type" => {}}};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"list"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"list"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"}{"non_null"}{"of"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"description"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"name"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"list"}{"non_null"}{"of"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"list"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"list"}{"of"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"description"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"args"}{"includeDeprecated"}{"type"}{"non_null"}{"of"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"args"}{"includeDeprecated"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"}{"list"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"}{"of"}{"fields"}{"deprecationReason"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"}{"of"}{"fields"}{"description"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"}{"of"}{"fields"}{"isDeprecated"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"args"}{"includeDeprecated"}{"type"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"}{"of"}{"fields"}{"name"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"args"}{"includeDeprecated"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"args"}{"includeDeprecated"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"list"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"fields"}{"args"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"fields"}{"deprecationReason"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"fields"}{"description"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"fields"}{"isDeprecated"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"args"}{"includeDeprecated"}{"type"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"fields"}{"name"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"fields"}{"type"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"inputFields"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"interfaces"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"list"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"kind"}{"type"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"kind"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"name"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"ofType"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"possibleTypes"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"list"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"description"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"locations"}{"type"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"locations"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"locations"}{"type"}{"of"}{"of"}{"list"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"locations"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"locations"}{"type"}{"of"}{"of"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"locations"}{"type"}{"of"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"name"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"mutationType"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"queryType"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"subscriptionType"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"types"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"list"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"non_null"} = $v->{"__schema"}{"type"};$v->{"__type"}{"args"}{"name"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"}{"non_null"};$v->{"__type"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}; \$v}->{$field_name} and $parent_type == $schema->query |
2167 |
0 |
2167 |
Condition100%3/3
${my $v = {"__schema" => {"description" => "Access the current type schema of this server.","name" => "__schema","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; $_[3]{'schema'};},"type" => bless( {"of" => bless( {"_fields_deprecation_applied" => 1,"_fields_resolved" => 1,"_interfaces_resolved" => 1,"description" => "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.","fields" => {"directives" => {"description" => "A list of all directives supported by this server.","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; $_[0]->directives;},"type" => bless( {"of" => bless( {"non_null" => {},"of" => bless( {"list" => {},"of" => bless( {"_fields_deprecation_applied" => 1,"_fields_resolved" => 1,"_interfaces_resolved" => 1,"description" => "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.","fields" => {"args" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; _hash2array($_[0]->args);},"type" => bless( {"of" => bless( {"non_null" => {},"of" => bless( {"list" => {},"of" => bless( {"_fields_deprecation_applied" => 1,"_fields_resolved" => 1,"_interfaces_resolved" => 1,"description" => "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.","fields" => {"defaultValue" => {"description" => "A GraphQL-formatted string representing the default value for this input value.","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; '???'; return unless defined(my $value = $_[0]{'default_value'}); my $gql = $_[0]{'type'}->perl_to_graphql($value); return $gql if $_[0]{'type'}->isa('GraphQL::Type::Enum'); $JSON_noutf8->encode($gql);},"type" => bless( {"description" => "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.","name" => "String","non_null" => bless( {"of" => {}}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Input__AND__GraphQL::Role::Output' ),"parse_value" => sub { package GraphQL::Type::Scalar; use warnings; use strict; no feature ':all'; use feature ':5.12'; BEGIN { $^H{'Function::Parameters/config'} = 'HASH(0x5cbbe49dddc0)'; } return undef unless defined $_[0]; goto \&$closure;},"serialize" => sub { package GraphQL::Type::Scalar; use warnings; use strict; no feature ':all'; use feature ':5.12'; BEGIN { $^H{'Function::Parameters/config'} = 'HASH(0x5cbbe49dddc0)'; } return undef unless defined $_[0]; goto \&$closure;}}, 'GraphQL::Type::Scalar' )},"description" => {"type" => {}},"name" => {"type" => {}},"type" => {"type" => bless( {"list" => bless( {"non_null" => bless( {"of" => {}}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' ),"of" => {}}, 'GraphQL::Type::List__WITH__GraphQL::Role::Output' ),"of" => bless( {"_fields_deprecation_applied" => 1,"_fields_resolved" => 1,"_interfaces_resolved" => 1,"description" => "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.","fields" => {"description" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; return undef unless $root_value->can($field_name); my(@passon) = %$args ? $args : (); $root_value->$field_name(@passon);},"type" => {}},"enumValues" => {"args" => {"includeDeprecated" => {"default_value" => 0,"type" => bless( {"description" => "The `Boolean` scalar type represents `true` or `false`.","name" => "Boolean","non_null" => bless( {"of" => {}}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Input__AND__GraphQL::Role::Output' ),"parse_value" => sub { package GraphQL::Type::Scalar; use warnings; use strict; no feature ':all'; use feature ':5.12'; BEGIN { $^H{'Function::Parameters/config'} = 'HASH(0x5cbbe49dddc0)'; } return undef unless defined $_[0]; goto \&$closure;},"serialize" => sub { package GraphQL::Type::Scalar; use warnings; use strict; no feature ':all'; use feature ':5.12'; BEGIN { $^H{'Function::Parameters/config'} = 'HASH(0x5cbbe49dddc0)'; } return undef unless defined $_[0]; goto \&$closure;}}, 'GraphQL::Type::Scalar' )}},"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($type, $args) = @_; return unless $type->isa('GraphQL::Type::Enum'); my $values = $type->values; '???'; $values = {map({$_, $values->{$_};} grep((!$values->{$_}{'is_deprecated'}), keys %$values))} unless $args->{'includeDeprecated'}; [map({+{'name', $_, 'description', $values->{$_}{'description'}, 'isDeprecated', $values->{$_}{'is_deprecated'}, 'deprecationReason', $values->{$_}{'deprecation_reason'}};} sort(keys %{$values;}))];},"type" => bless( {"of" => bless( {"list" => {},"of" => bless( {"_fields_deprecation_applied" => 1,"_fields_resolved" => 1,"_interfaces_resolved" => 1,"description" => "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.","fields" => {"deprecationReason" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; $root_value->{$real};},"type" => {}},"description" => {"type" => {}},"isDeprecated" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; not !$root_value->{$real};},"type" => {}},"name" => {"type" => {}}},"name" => "__EnumValue","non_null" => {}}, 'GraphQL::Type::Object' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )}, 'GraphQL::Type::List__WITH__GraphQL::Role::Output' )},"fields" => {"args" => {"includeDeprecated" => {"default_value" => 0,"type" => {}}},"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($type, $args) = @_; return undef unless $type->DOES('GraphQL::Role::FieldsOutput'); my $map = $type->fields; $map = {map({$_, $map->{$_};} grep((!$map->{$_}{'deprecation_reason'}), keys %$map))} unless $args->{'includeDeprecated'}; [map({+{'name', $_, 'description', $map->{$_}{'description'}, 'args', $map->{$_}{'args'}, 'type', $map->{$_}{'type'}, 'isDeprecated', $map->{$_}{'is_deprecated'}, 'deprecationReason', $map->{$_}{'deprecation_reason'}};} sort(keys %{$map;}))];},"type" => bless( {"of" => bless( {"list" => {},"of" => bless( {"_fields_deprecation_applied" => 1,"_fields_resolved" => 1,"_interfaces_resolved" => 1,"description" => "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.","fields" => {"args" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; _hash2array($_[0]{'args'} || {});},"type" => {}},"deprecationReason" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; $root_value->{$real};},"type" => {}},"description" => {"type" => {}},"isDeprecated" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; not !$root_value->{$real};},"type" => {}},"name" => {"type" => {}},"type" => {"type" => {}}},"name" => "__Field","non_null" => {}}, 'GraphQL::Type::Object' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )}, 'GraphQL::Type::List__WITH__GraphQL::Role::Output' )},"inputFields" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($type) = @_; return unless $type->isa('GraphQL::Type::InputObject'); _hash2array($type->fields || {});},"type" => {}},"interfaces" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($type) = @_; return unless $type->isa('GraphQL::Type::Object'); $type->interfaces or [];},"type" => {}},"kind" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my $c = ref $_[0]; $c =~ s/__.*//u; {GraphQL::Type::Enum => 'ENUM', GraphQL::Type::InputObject => 'INPUT_OBJECT', GraphQL::Type::Interface => 'INTERFACE', GraphQL::Type::List => 'LIST', GraphQL::Type::NonNull => 'NON_NULL', GraphQL::Type::Object => 'OBJECT', GraphQL::Type::Scalar => 'SCALAR', GraphQL::Type::Union => 'UNION'}->{$c} // die('Unknown kind of type => ' . ref($_[0]));},"type" => bless( {"of" => bless( {"_fields_deprecation_applied" => 1,"description" => "An enum describing what kind of type a given `__Type` is.","name" => "__TypeKind","non_null" => {},"values" => {"ENUM" => {"description" => "Indicates this type is an enum. `enumValues` is a valid field.","value" => "ENUM"},"INPUT_OBJECT" => {"description" => "Indicates this type is an input object. `inputFields` is a valid field.","value" => "INPUT_OBJECT"},"INTERFACE" => {"description" => "Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.","value" => "INTERFACE"},"LIST" => {"description" => "Indicates this type is a list. `ofType` is a valid field.","value" => "LIST"},"NON_NULL" => {"description" => "Indicates this type is a non-null. `ofType` is a valid field.","value" => "NON_NULL"},"OBJECT" => {"description" => "Indicates this type is an object. `fields` and `interfaces` are valid fields.","value" => "OBJECT"},"SCALAR" => {"description" => "Indicates this type is a scalar.","value" => "SCALAR"},"UNION" => {"description" => "Indicates this type is a union. `possibleTypes` is a valid field.","value" => "UNION"}}}, 'GraphQL::Type::Enum' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Input__AND__GraphQL::Role::Output' )},"name" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; return undef if $root_value->can('of'); my(@passon) = %$args ? $args : (); $root_value->name(@passon);},"type" => {}},"ofType" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; return unless $_[0]->can('of'); $_[0]->of;},"type" => {}},"possibleTypes" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; return unless $_[0]->DOES('GraphQL::Role::Abstract'); $_[3]{'schema'}->get_possible_types($_[0]);},"type" => {}}},"name" => "__Type","non_null" => {}}, 'GraphQL::Type::Object' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )}},"name" => "__InputValue","non_null" => {}}, 'GraphQL::Type::Object' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )}, 'GraphQL::Type::List__WITH__GraphQL::Role::Output' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )},"description" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; return undef unless $root_value->can($field_name); my(@passon) = %$args ? $args : (); $root_value->$field_name(@passon);},"type" => {}},"locations" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; return undef unless $root_value->can($field_name); my(@passon) = %$args ? $args : (); $root_value->$field_name(@passon);},"type" => bless( {"of" => bless( {"non_null" => {},"of" => bless( {"list" => {},"of" => bless( {"_fields_deprecation_applied" => 1,"description" => "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.","name" => "__DirectiveLocation","non_null" => {},"values" => {"ARGUMENT_DEFINITION" => {"description" => "Location adjacent to an argument definition.","value" => "ARGUMENT_DEFINITION"},"ENUM" => {"description" => "Location adjacent to an enum definition.","value" => "ENUM"},"ENUM_VALUE" => {"description" => "Location adjacent to an enum value definition.","value" => "ENUM_VALUE"},"FIELD" => {"description" => "Location adjacent to a field.","value" => "FIELD"},"FIELD_DEFINITION" => {"description" => "Location adjacent to a field definition.","value" => "FIELD_DEFINITION"},"FRAGMENT_DEFINITION" => {"description" => "Location adjacent to a fragment definition.","value" => "FRAGMENT_DEFINITION"},"FRAGMENT_SPREAD" => {"description" => "Location adjacent to a fragment spread.","value" => "FRAGMENT_SPREAD"},"INLINE_FRAGMENT" => {"description" => "Location adjacent to an inline fragment.","value" => "INLINE_FRAGMENT"},"INPUT_FIELD_DEFINITION" => {"description" => "Location adjacent to an input object field definition.","value" => "INPUT_FIELD_DEFINITION"},"INPUT_OBJECT" => {"description" => "Location adjacent to an input object type definition.","value" => "INPUT_OBJECT"},"INTERFACE" => {"description" => "Location adjacent to an interface definition.","value" => "INTERFACE"},"MUTATION" => {"description" => "Location adjacent to a mutation operation.","value" => "MUTATION"},"OBJECT" => {"description" => "Location adjacent to an object type definition.","value" => "OBJECT"},"QUERY" => {"description" => "Location adjacent to a query operation.","value" => "QUERY"},"SCALAR" => {"description" => "Location adjacent to a scalar definition.","value" => "SCALAR"},"SCHEMA" => {"description" => "Location adjacent to a schema definition.","value" => "SCHEMA"},"SUBSCRIPTION" => {"description" => "Location adjacent to a subscription operation.","value" => "SUBSCRIPTION"},"UNION" => {"description" => "Location adjacent to a union definition.","value" => "UNION"}}}, 'GraphQL::Type::Enum' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Input__AND__GraphQL::Role::Output' )}, 'GraphQL::Type::List__WITH__GraphQL::Role::Input__AND__GraphQL::Role::Output' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Input__AND__GraphQL::Role::Output' )},"name" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; return undef unless $root_value->can($field_name); my(@passon) = %$args ? $args : (); $root_value->$field_name(@passon);},"type" => {}}},"name" => "__Directive","non_null" => {}}, 'GraphQL::Type::Object' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )}, 'GraphQL::Type::List__WITH__GraphQL::Role::Output' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )},"mutationType" => {"description" => "If this server supports mutation, the type that mutation operations will be rooted at.","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; $_[0]->mutation;},"type" => {}},"queryType" => {"description" => "The type that query operations will be rooted at.","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; $_[0]->query;},"type" => {}},"subscriptionType" => {"description" => "If this server support subscription, the type that subscription operations will be rooted at.","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; $_[0]->subscription;},"type" => {}},"types" => {"description" => "A list of all types supported by this server.","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; [(sort {$a->name cmp $b->name;} values %{$_[0]->name2type;})];},"type" => {}}},"name" => "__Schema","non_null" => {}}, 'GraphQL::Type::Object' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )},"__type" => {"args" => {"name" => {"type" => {}}},"description" => "Request the type information of a single type.","name" => "__type","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; $_[3]{'schema'}->name2type->{$_[1]{'name'}};},"type" => {}}};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"list"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"list"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"}{"non_null"}{"of"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"description"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"name"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"list"}{"non_null"}{"of"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"list"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"list"}{"of"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"description"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"args"}{"includeDeprecated"}{"type"}{"non_null"}{"of"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"args"}{"includeDeprecated"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"}{"list"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"}{"of"}{"fields"}{"deprecationReason"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"}{"of"}{"fields"}{"description"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"}{"of"}{"fields"}{"isDeprecated"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"args"}{"includeDeprecated"}{"type"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"}{"of"}{"fields"}{"name"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"args"}{"includeDeprecated"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"args"}{"includeDeprecated"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"list"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"fields"}{"args"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"fields"}{"deprecationReason"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"fields"}{"description"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"fields"}{"isDeprecated"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"args"}{"includeDeprecated"}{"type"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"fields"}{"name"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"fields"}{"type"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"inputFields"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"interfaces"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"list"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"kind"}{"type"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"kind"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"name"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"ofType"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"possibleTypes"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"list"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"description"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"locations"}{"type"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"locations"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"locations"}{"type"}{"of"}{"of"}{"list"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"locations"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"locations"}{"type"}{"of"}{"of"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"locations"}{"type"}{"of"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"name"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"mutationType"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"queryType"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"subscriptionType"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"types"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"list"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"non_null"} = $v->{"__schema"}{"type"};$v->{"__type"}{"args"}{"name"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"}{"non_null"};$v->{"__type"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}; \$v}->{$field_name} and $parent_type == $schema->query
MC/DC0%0/2
${my $v = {"__schema" => {"description" => "Access the current type schema of this server.","name" => "__schema","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; $_[3]{'schema'};},"type" => bless( {"of" => bless( {"_fields_deprecation_applied" => 1,"_fields_resolved" => 1,"_interfaces_resolved" => 1,"description" => "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.","fields" => {"directives" => {"description" => "A list of all directives supported by this server.","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; $_[0]->directives;},"type" => bless( {"of" => bless( {"non_null" => {},"of" => bless( {"list" => {},"of" => bless( {"_fields_deprecation_applied" => 1,"_fields_resolved" => 1,"_interfaces_resolved" => 1,"description" => "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.","fields" => {"args" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; _hash2array($_[0]->args);},"type" => bless( {"of" => bless( {"non_null" => {},"of" => bless( {"list" => {},"of" => bless( {"_fields_deprecation_applied" => 1,"_fields_resolved" => 1,"_interfaces_resolved" => 1,"description" => "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.","fields" => {"defaultValue" => {"description" => "A GraphQL-formatted string representing the default value for this input value.","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; '???'; return unless defined(my $value = $_[0]{'default_value'}); my $gql = $_[0]{'type'}->perl_to_graphql($value); return $gql if $_[0]{'type'}->isa('GraphQL::Type::Enum'); $JSON_noutf8->encode($gql);},"type" => bless( {"description" => "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.","name" => "String","non_null" => bless( {"of" => {}}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Input__AND__GraphQL::Role::Output' ),"parse_value" => sub { package GraphQL::Type::Scalar; use warnings; use strict; no feature ':all'; use feature ':5.12'; BEGIN { $^H{'Function::Parameters/config'} = 'HASH(0x5cbbe49dddc0)'; } return undef unless defined $_[0]; goto \&$closure;},"serialize" => sub { package GraphQL::Type::Scalar; use warnings; use strict; no feature ':all'; use feature ':5.12'; BEGIN { $^H{'Function::Parameters/config'} = 'HASH(0x5cbbe49dddc0)'; } return undef unless defined $_[0]; goto \&$closure;}}, 'GraphQL::Type::Scalar' )},"description" => {"type" => {}},"name" => {"type" => {}},"type" => {"type" => bless( {"list" => bless( {"non_null" => bless( {"of" => {}}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' ),"of" => {}}, 'GraphQL::Type::List__WITH__GraphQL::Role::Output' ),"of" => bless( {"_fields_deprecation_applied" => 1,"_fields_resolved" => 1,"_interfaces_resolved" => 1,"description" => "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.","fields" => {"description" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; return undef unless $root_value->can($field_name); my(@passon) = %$args ? $args : (); $root_value->$field_name(@passon);},"type" => {}},"enumValues" => {"args" => {"includeDeprecated" => {"default_value" => 0,"type" => bless( {"description" => "The `Boolean` scalar type represents `true` or `false`.","name" => "Boolean","non_null" => bless( {"of" => {}}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Input__AND__GraphQL::Role::Output' ),"parse_value" => sub { package GraphQL::Type::Scalar; use warnings; use strict; no feature ':all'; use feature ':5.12'; BEGIN { $^H{'Function::Parameters/config'} = 'HASH(0x5cbbe49dddc0)'; } return undef unless defined $_[0]; goto \&$closure;},"serialize" => sub { package GraphQL::Type::Scalar; use warnings; use strict; no feature ':all'; use feature ':5.12'; BEGIN { $^H{'Function::Parameters/config'} = 'HASH(0x5cbbe49dddc0)'; } return undef unless defined $_[0]; goto \&$closure;}}, 'GraphQL::Type::Scalar' )}},"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($type, $args) = @_; return unless $type->isa('GraphQL::Type::Enum'); my $values = $type->values; '???'; $values = {map({$_, $values->{$_};} grep((!$values->{$_}{'is_deprecated'}), keys %$values))} unless $args->{'includeDeprecated'}; [map({+{'name', $_, 'description', $values->{$_}{'description'}, 'isDeprecated', $values->{$_}{'is_deprecated'}, 'deprecationReason', $values->{$_}{'deprecation_reason'}};} sort(keys %{$values;}))];},"type" => bless( {"of" => bless( {"list" => {},"of" => bless( {"_fields_deprecation_applied" => 1,"_fields_resolved" => 1,"_interfaces_resolved" => 1,"description" => "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.","fields" => {"deprecationReason" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; $root_value->{$real};},"type" => {}},"description" => {"type" => {}},"isDeprecated" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; not !$root_value->{$real};},"type" => {}},"name" => {"type" => {}}},"name" => "__EnumValue","non_null" => {}}, 'GraphQL::Type::Object' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )}, 'GraphQL::Type::List__WITH__GraphQL::Role::Output' )},"fields" => {"args" => {"includeDeprecated" => {"default_value" => 0,"type" => {}}},"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($type, $args) = @_; return undef unless $type->DOES('GraphQL::Role::FieldsOutput'); my $map = $type->fields; $map = {map({$_, $map->{$_};} grep((!$map->{$_}{'deprecation_reason'}), keys %$map))} unless $args->{'includeDeprecated'}; [map({+{'name', $_, 'description', $map->{$_}{'description'}, 'args', $map->{$_}{'args'}, 'type', $map->{$_}{'type'}, 'isDeprecated', $map->{$_}{'is_deprecated'}, 'deprecationReason', $map->{$_}{'deprecation_reason'}};} sort(keys %{$map;}))];},"type" => bless( {"of" => bless( {"list" => {},"of" => bless( {"_fields_deprecation_applied" => 1,"_fields_resolved" => 1,"_interfaces_resolved" => 1,"description" => "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.","fields" => {"args" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; _hash2array($_[0]{'args'} || {});},"type" => {}},"deprecationReason" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; $root_value->{$real};},"type" => {}},"description" => {"type" => {}},"isDeprecated" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; not !$root_value->{$real};},"type" => {}},"name" => {"type" => {}},"type" => {"type" => {}}},"name" => "__Field","non_null" => {}}, 'GraphQL::Type::Object' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )}, 'GraphQL::Type::List__WITH__GraphQL::Role::Output' )},"inputFields" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($type) = @_; return unless $type->isa('GraphQL::Type::InputObject'); _hash2array($type->fields || {});},"type" => {}},"interfaces" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($type) = @_; return unless $type->isa('GraphQL::Type::Object'); $type->interfaces or [];},"type" => {}},"kind" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my $c = ref $_[0]; $c =~ s/__.*//u; {GraphQL::Type::Enum => 'ENUM', GraphQL::Type::InputObject => 'INPUT_OBJECT', GraphQL::Type::Interface => 'INTERFACE', GraphQL::Type::List => 'LIST', GraphQL::Type::NonNull => 'NON_NULL', GraphQL::Type::Object => 'OBJECT', GraphQL::Type::Scalar => 'SCALAR', GraphQL::Type::Union => 'UNION'}->{$c} // die('Unknown kind of type => ' . ref($_[0]));},"type" => bless( {"of" => bless( {"_fields_deprecation_applied" => 1,"description" => "An enum describing what kind of type a given `__Type` is.","name" => "__TypeKind","non_null" => {},"values" => {"ENUM" => {"description" => "Indicates this type is an enum. `enumValues` is a valid field.","value" => "ENUM"},"INPUT_OBJECT" => {"description" => "Indicates this type is an input object. `inputFields` is a valid field.","value" => "INPUT_OBJECT"},"INTERFACE" => {"description" => "Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.","value" => "INTERFACE"},"LIST" => {"description" => "Indicates this type is a list. `ofType` is a valid field.","value" => "LIST"},"NON_NULL" => {"description" => "Indicates this type is a non-null. `ofType` is a valid field.","value" => "NON_NULL"},"OBJECT" => {"description" => "Indicates this type is an object. `fields` and `interfaces` are valid fields.","value" => "OBJECT"},"SCALAR" => {"description" => "Indicates this type is a scalar.","value" => "SCALAR"},"UNION" => {"description" => "Indicates this type is a union. `possibleTypes` is a valid field.","value" => "UNION"}}}, 'GraphQL::Type::Enum' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Input__AND__GraphQL::Role::Output' )},"name" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; return undef if $root_value->can('of'); my(@passon) = %$args ? $args : (); $root_value->name(@passon);},"type" => {}},"ofType" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; return unless $_[0]->can('of'); $_[0]->of;},"type" => {}},"possibleTypes" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; return unless $_[0]->DOES('GraphQL::Role::Abstract'); $_[3]{'schema'}->get_possible_types($_[0]);},"type" => {}}},"name" => "__Type","non_null" => {}}, 'GraphQL::Type::Object' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )}},"name" => "__InputValue","non_null" => {}}, 'GraphQL::Type::Object' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )}, 'GraphQL::Type::List__WITH__GraphQL::Role::Output' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )},"description" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; return undef unless $root_value->can($field_name); my(@passon) = %$args ? $args : (); $root_value->$field_name(@passon);},"type" => {}},"locations" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; return undef unless $root_value->can($field_name); my(@passon) = %$args ? $args : (); $root_value->$field_name(@passon);},"type" => bless( {"of" => bless( {"non_null" => {},"of" => bless( {"list" => {},"of" => bless( {"_fields_deprecation_applied" => 1,"description" => "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.","name" => "__DirectiveLocation","non_null" => {},"values" => {"ARGUMENT_DEFINITION" => {"description" => "Location adjacent to an argument definition.","value" => "ARGUMENT_DEFINITION"},"ENUM" => {"description" => "Location adjacent to an enum definition.","value" => "ENUM"},"ENUM_VALUE" => {"description" => "Location adjacent to an enum value definition.","value" => "ENUM_VALUE"},"FIELD" => {"description" => "Location adjacent to a field.","value" => "FIELD"},"FIELD_DEFINITION" => {"description" => "Location adjacent to a field definition.","value" => "FIELD_DEFINITION"},"FRAGMENT_DEFINITION" => {"description" => "Location adjacent to a fragment definition.","value" => "FRAGMENT_DEFINITION"},"FRAGMENT_SPREAD" => {"description" => "Location adjacent to a fragment spread.","value" => "FRAGMENT_SPREAD"},"INLINE_FRAGMENT" => {"description" => "Location adjacent to an inline fragment.","value" => "INLINE_FRAGMENT"},"INPUT_FIELD_DEFINITION" => {"description" => "Location adjacent to an input object field definition.","value" => "INPUT_FIELD_DEFINITION"},"INPUT_OBJECT" => {"description" => "Location adjacent to an input object type definition.","value" => "INPUT_OBJECT"},"INTERFACE" => {"description" => "Location adjacent to an interface definition.","value" => "INTERFACE"},"MUTATION" => {"description" => "Location adjacent to a mutation operation.","value" => "MUTATION"},"OBJECT" => {"description" => "Location adjacent to an object type definition.","value" => "OBJECT"},"QUERY" => {"description" => "Location adjacent to a query operation.","value" => "QUERY"},"SCALAR" => {"description" => "Location adjacent to a scalar definition.","value" => "SCALAR"},"SCHEMA" => {"description" => "Location adjacent to a schema definition.","value" => "SCHEMA"},"SUBSCRIPTION" => {"description" => "Location adjacent to a subscription operation.","value" => "SUBSCRIPTION"},"UNION" => {"description" => "Location adjacent to a union definition.","value" => "UNION"}}}, 'GraphQL::Type::Enum' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Input__AND__GraphQL::Role::Output' )}, 'GraphQL::Type::List__WITH__GraphQL::Role::Input__AND__GraphQL::Role::Output' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Input__AND__GraphQL::Role::Output' )},"name" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; return undef unless $root_value->can($field_name); my(@passon) = %$args ? $args : (); $root_value->$field_name(@passon);},"type" => {}}},"name" => "__Directive","non_null" => {}}, 'GraphQL::Type::Object' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )}, 'GraphQL::Type::List__WITH__GraphQL::Role::Output' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )},"mutationType" => {"description" => "If this server supports mutation, the type that mutation operations will be rooted at.","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; $_[0]->mutation;},"type" => {}},"queryType" => {"description" => "The type that query operations will be rooted at.","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; $_[0]->query;},"type" => {}},"subscriptionType" => {"description" => "If this server support subscription, the type that subscription operations will be rooted at.","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; $_[0]->subscription;},"type" => {}},"types" => {"description" => "A list of all types supported by this server.","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; [(sort {$a->name cmp $b->name;} values %{$_[0]->name2type;})];},"type" => {}}},"name" => "__Schema","non_null" => {}}, 'GraphQL::Type::Object' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )},"__type" => {"args" => {"name" => {"type" => {}}},"description" => "Request the type information of a single type.","name" => "__type","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; $_[3]{'schema'}->name2type->{$_[1]{'name'}};},"type" => {}}};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"list"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"list"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"}{"non_null"}{"of"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"description"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"name"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"list"}{"non_null"}{"of"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"list"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"list"}{"of"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"description"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"args"}{"includeDeprecated"}{"type"}{"non_null"}{"of"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"args"}{"includeDeprecated"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"}{"list"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"}{"of"}{"fields"}{"deprecationReason"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"}{"of"}{"fields"}{"description"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"}{"of"}{"fields"}{"isDeprecated"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"args"}{"includeDeprecated"}{"type"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"}{"of"}{"fields"}{"name"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"args"}{"includeDeprecated"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"args"}{"includeDeprecated"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"list"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"fields"}{"args"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"fields"}{"deprecationReason"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"fields"}{"description"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"fields"}{"isDeprecated"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"args"}{"includeDeprecated"}{"type"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"fields"}{"name"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"fields"}{"type"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"inputFields"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"interfaces"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"list"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"kind"}{"type"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"kind"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"name"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"ofType"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"possibleTypes"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"list"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"description"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"locations"}{"type"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"locations"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"locations"}{"type"}{"of"}{"of"}{"list"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"locations"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"locations"}{"type"}{"of"}{"of"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"locations"}{"type"}{"of"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"name"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"mutationType"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"queryType"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"subscriptionType"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"types"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"list"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"non_null"} = $v->{"__schema"}{"type"};$v->{"__type"}{"args"}{"name"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"}{"non_null"};$v->{"__type"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}; \$v}->{$field_name} and $parent_type == $schema->query
${my $v = {"__schema" => {"description" => "Access the current type schema of this server.","name" => "__schema","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; $_[3]{'schema'};},"type" => bless( {"of" => bless( {"_fields_deprecation_applied" => 1,"_fields_resolved" => 1,"_interfaces_resolved" => 1,"description" => "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.","fields" => {"directives" => {"description" => "A list of all directives supported by this server.","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; $_[0]->directives;},"type" => bless( {"of" => bless( {"non_null" => {},"of" => bless( {"list" => {},"of" => bless( {"_fields_deprecation_applied" => 1,"_fields_resolved" => 1,"_interfaces_resolved" => 1,"description" => "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.","fields" => {"args" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; _hash2array($_[0]->args);},"type" => bless( {"of" => bless( {"non_null" => {},"of" => bless( {"list" => {},"of" => bless( {"_fields_deprecation_applied" => 1,"_fields_resolved" => 1,"_interfaces_resolved" => 1,"description" => "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.","fields" => {"defaultValue" => {"description" => "A GraphQL-formatted string representing the default value for this input value.","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; '???'; return unless defined(my $value = $_[0]{'default_value'}); my $gql = $_[0]{'type'}->perl_to_graphql($value); return $gql if $_[0]{'type'}->isa('GraphQL::Type::Enum'); $JSON_noutf8->encode($gql);},"type" => bless( {"description" => "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.","name" => "String","non_null" => bless( {"of" => {}}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Input__AND__GraphQL::Role::Output' ),"parse_value" => sub { package GraphQL::Type::Scalar; use warnings; use strict; no feature ':all'; use feature ':5.12'; BEGIN { $^H{'Function::Parameters/config'} = 'HASH(0x5cbbe49dddc0)'; } return undef unless defined $_[0]; goto \&$closure;},"serialize" => sub { package GraphQL::Type::Scalar; use warnings; use strict; no feature ':all'; use feature ':5.12'; BEGIN { $^H{'Function::Parameters/config'} = 'HASH(0x5cbbe49dddc0)'; } return undef unless defined $_[0]; goto \&$closure;}}, 'GraphQL::Type::Scalar' )},"description" => {"type" => {}},"name" => {"type" => {}},"type" => {"type" => bless( {"list" => bless( {"non_null" => bless( {"of" => {}}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' ),"of" => {}}, 'GraphQL::Type::List__WITH__GraphQL::Role::Output' ),"of" => bless( {"_fields_deprecation_applied" => 1,"_fields_resolved" => 1,"_interfaces_resolved" => 1,"description" => "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.","fields" => {"description" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; return undef unless $root_value->can($field_name); my(@passon) = %$args ? $args : (); $root_value->$field_name(@passon);},"type" => {}},"enumValues" => {"args" => {"includeDeprecated" => {"default_value" => 0,"type" => bless( {"description" => "The `Boolean` scalar type represents `true` or `false`.","name" => "Boolean","non_null" => bless( {"of" => {}}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Input__AND__GraphQL::Role::Output' ),"parse_value" => sub { package GraphQL::Type::Scalar; use warnings; use strict; no feature ':all'; use feature ':5.12'; BEGIN { $^H{'Function::Parameters/config'} = 'HASH(0x5cbbe49dddc0)'; } return undef unless defined $_[0]; goto \&$closure;},"serialize" => sub { package GraphQL::Type::Scalar; use warnings; use strict; no feature ':all'; use feature ':5.12'; BEGIN { $^H{'Function::Parameters/config'} = 'HASH(0x5cbbe49dddc0)'; } return undef unless defined $_[0]; goto \&$closure;}}, 'GraphQL::Type::Scalar' )}},"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($type, $args) = @_; return unless $type->isa('GraphQL::Type::Enum'); my $values = $type->values; '???'; $values = {map({$_, $values->{$_};} grep((!$values->{$_}{'is_deprecated'}), keys %$values))} unless $args->{'includeDeprecated'}; [map({+{'name', $_, 'description', $values->{$_}{'description'}, 'isDeprecated', $values->{$_}{'is_deprecated'}, 'deprecationReason', $values->{$_}{'deprecation_reason'}};} sort(keys %{$values;}))];},"type" => bless( {"of" => bless( {"list" => {},"of" => bless( {"_fields_deprecation_applied" => 1,"_fields_resolved" => 1,"_interfaces_resolved" => 1,"description" => "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.","fields" => {"deprecationReason" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; $root_value->{$real};},"type" => {}},"description" => {"type" => {}},"isDeprecated" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; not !$root_value->{$real};},"type" => {}},"name" => {"type" => {}}},"name" => "__EnumValue","non_null" => {}}, 'GraphQL::Type::Object' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )}, 'GraphQL::Type::List__WITH__GraphQL::Role::Output' )},"fields" => {"args" => {"includeDeprecated" => {"default_value" => 0,"type" => {}}},"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($type, $args) = @_; return undef unless $type->DOES('GraphQL::Role::FieldsOutput'); my $map = $type->fields; $map = {map({$_, $map->{$_};} grep((!$map->{$_}{'deprecation_reason'}), keys %$map))} unless $args->{'includeDeprecated'}; [map({+{'name', $_, 'description', $map->{$_}{'description'}, 'args', $map->{$_}{'args'}, 'type', $map->{$_}{'type'}, 'isDeprecated', $map->{$_}{'is_deprecated'}, 'deprecationReason', $map->{$_}{'deprecation_reason'}};} sort(keys %{$map;}))];},"type" => bless( {"of" => bless( {"list" => {},"of" => bless( {"_fields_deprecation_applied" => 1,"_fields_resolved" => 1,"_interfaces_resolved" => 1,"description" => "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.","fields" => {"args" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; _hash2array($_[0]{'args'} || {});},"type" => {}},"deprecationReason" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; $root_value->{$real};},"type" => {}},"description" => {"type" => {}},"isDeprecated" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; not !$root_value->{$real};},"type" => {}},"name" => {"type" => {}},"type" => {"type" => {}}},"name" => "__Field","non_null" => {}}, 'GraphQL::Type::Object' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )}, 'GraphQL::Type::List__WITH__GraphQL::Role::Output' )},"inputFields" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($type) = @_; return unless $type->isa('GraphQL::Type::InputObject'); _hash2array($type->fields || {});},"type" => {}},"interfaces" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($type) = @_; return unless $type->isa('GraphQL::Type::Object'); $type->interfaces or [];},"type" => {}},"kind" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my $c = ref $_[0]; $c =~ s/__.*//u; {GraphQL::Type::Enum => 'ENUM', GraphQL::Type::InputObject => 'INPUT_OBJECT', GraphQL::Type::Interface => 'INTERFACE', GraphQL::Type::List => 'LIST', GraphQL::Type::NonNull => 'NON_NULL', GraphQL::Type::Object => 'OBJECT', GraphQL::Type::Scalar => 'SCALAR', GraphQL::Type::Union => 'UNION'}->{$c} // die('Unknown kind of type => ' . ref($_[0]));},"type" => bless( {"of" => bless( {"_fields_deprecation_applied" => 1,"description" => "An enum describing what kind of type a given `__Type` is.","name" => "__TypeKind","non_null" => {},"values" => {"ENUM" => {"description" => "Indicates this type is an enum. `enumValues` is a valid field.","value" => "ENUM"},"INPUT_OBJECT" => {"description" => "Indicates this type is an input object. `inputFields` is a valid field.","value" => "INPUT_OBJECT"},"INTERFACE" => {"description" => "Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.","value" => "INTERFACE"},"LIST" => {"description" => "Indicates this type is a list. `ofType` is a valid field.","value" => "LIST"},"NON_NULL" => {"description" => "Indicates this type is a non-null. `ofType` is a valid field.","value" => "NON_NULL"},"OBJECT" => {"description" => "Indicates this type is an object. `fields` and `interfaces` are valid fields.","value" => "OBJECT"},"SCALAR" => {"description" => "Indicates this type is a scalar.","value" => "SCALAR"},"UNION" => {"description" => "Indicates this type is a union. `possibleTypes` is a valid field.","value" => "UNION"}}}, 'GraphQL::Type::Enum' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Input__AND__GraphQL::Role::Output' )},"name" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; return undef if $root_value->can('of'); my(@passon) = %$args ? $args : (); $root_value->name(@passon);},"type" => {}},"ofType" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; return unless $_[0]->can('of'); $_[0]->of;},"type" => {}},"possibleTypes" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; return unless $_[0]->DOES('GraphQL::Role::Abstract'); $_[3]{'schema'}->get_possible_types($_[0]);},"type" => {}}},"name" => "__Type","non_null" => {}}, 'GraphQL::Type::Object' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )}},"name" => "__InputValue","non_null" => {}}, 'GraphQL::Type::Object' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )}, 'GraphQL::Type::List__WITH__GraphQL::Role::Output' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )},"description" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; return undef unless $root_value->can($field_name); my(@passon) = %$args ? $args : (); $root_value->$field_name(@passon);},"type" => {}},"locations" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; return undef unless $root_value->can($field_name); my(@passon) = %$args ? $args : (); $root_value->$field_name(@passon);},"type" => bless( {"of" => bless( {"non_null" => {},"of" => bless( {"list" => {},"of" => bless( {"_fields_deprecation_applied" => 1,"description" => "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.","name" => "__DirectiveLocation","non_null" => {},"values" => {"ARGUMENT_DEFINITION" => {"description" => "Location adjacent to an argument definition.","value" => "ARGUMENT_DEFINITION"},"ENUM" => {"description" => "Location adjacent to an enum definition.","value" => "ENUM"},"ENUM_VALUE" => {"description" => "Location adjacent to an enum value definition.","value" => "ENUM_VALUE"},"FIELD" => {"description" => "Location adjacent to a field.","value" => "FIELD"},"FIELD_DEFINITION" => {"description" => "Location adjacent to a field definition.","value" => "FIELD_DEFINITION"},"FRAGMENT_DEFINITION" => {"description" => "Location adjacent to a fragment definition.","value" => "FRAGMENT_DEFINITION"},"FRAGMENT_SPREAD" => {"description" => "Location adjacent to a fragment spread.","value" => "FRAGMENT_SPREAD"},"INLINE_FRAGMENT" => {"description" => "Location adjacent to an inline fragment.","value" => "INLINE_FRAGMENT"},"INPUT_FIELD_DEFINITION" => {"description" => "Location adjacent to an input object field definition.","value" => "INPUT_FIELD_DEFINITION"},"INPUT_OBJECT" => {"description" => "Location adjacent to an input object type definition.","value" => "INPUT_OBJECT"},"INTERFACE" => {"description" => "Location adjacent to an interface definition.","value" => "INTERFACE"},"MUTATION" => {"description" => "Location adjacent to a mutation operation.","value" => "MUTATION"},"OBJECT" => {"description" => "Location adjacent to an object type definition.","value" => "OBJECT"},"QUERY" => {"description" => "Location adjacent to a query operation.","value" => "QUERY"},"SCALAR" => {"description" => "Location adjacent to a scalar definition.","value" => "SCALAR"},"SCHEMA" => {"description" => "Location adjacent to a schema definition.","value" => "SCHEMA"},"SUBSCRIPTION" => {"description" => "Location adjacent to a subscription operation.","value" => "SUBSCRIPTION"},"UNION" => {"description" => "Location adjacent to a union definition.","value" => "UNION"}}}, 'GraphQL::Type::Enum' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Input__AND__GraphQL::Role::Output' )}, 'GraphQL::Type::List__WITH__GraphQL::Role::Input__AND__GraphQL::Role::Output' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Input__AND__GraphQL::Role::Output' )},"name" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; return undef unless $root_value->can($field_name); my(@passon) = %$args ? $args : (); $root_value->$field_name(@passon);},"type" => {}}},"name" => "__Directive","non_null" => {}}, 'GraphQL::Type::Object' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )}, 'GraphQL::Type::List__WITH__GraphQL::Role::Output' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )},"mutationType" => {"description" => "If this server supports mutation, the type that mutation operations will be rooted at.","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; $_[0]->mutation;},"type" => {}},"queryType" => {"description" => "The type that query operations will be rooted at.","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; $_[0]->query;},"type" => {}},"subscriptionType" => {"description" => "If this server support subscription, the type that subscription operations will be rooted at.","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; $_[0]->subscription;},"type" => {}},"types" => {"description" => "A list of all types supported by this server.","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; [(sort {$a->name cmp $b->name;} values %{$_[0]->name2type;})];},"type" => {}}},"name" => "__Schema","non_null" => {}}, 'GraphQL::Type::Object' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )},"__type" => {"args" => {"name" => {"type" => {}}},"description" => "Request the type information of a single type.","name" => "__type","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; $_[3]{'schema'}->name2type->{$_[1]{'name'}};},"type" => {}}};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"list"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"list"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"}{"non_null"}{"of"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"description"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"name"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"list"}{"non_null"}{"of"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"list"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"list"}{"of"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"description"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"args"}{"includeDeprecated"}{"type"}{"non_null"}{"of"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"args"}{"includeDeprecated"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"}{"list"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"}{"of"}{"fields"}{"deprecationReason"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"}{"of"}{"fields"}{"description"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"}{"of"}{"fields"}{"isDeprecated"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"args"}{"includeDeprecated"}{"type"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"}{"of"}{"fields"}{"name"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"args"}{"includeDeprecated"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"args"}{"includeDeprecated"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"list"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"fields"}{"args"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"fields"}{"deprecationReason"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"fields"}{"description"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"fields"}{"isDeprecated"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"args"}{"includeDeprecated"}{"type"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"fields"}{"name"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"fields"}{"type"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"inputFields"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"interfaces"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"list"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"kind"}{"type"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"kind"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"name"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"ofType"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"possibleTypes"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"list"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"description"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"locations"}{"type"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"locations"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"locations"}{"type"}{"of"}{"of"}{"list"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"locations"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"locations"}{"type"}{"of"}{"of"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"locations"}{"type"}{"of"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"name"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"mutationType"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"queryType"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"subscriptionType"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"types"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"list"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"non_null"} = $v->{"__schema"}{"type"};$v->{"__type"}{"args"}{"name"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"}{"non_null"};$v->{"__type"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}; \$v}->{$field_name}
$parent_type == $schema->query
Truth table0%0/3
A and B
A= ${my $v = {"__schema" => {"description" => "Access the current type schema of this server.","name" => "__schema","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; $_[3]{'schema'};},"type" => bless( {"of" => bless( {"_fields_deprecation_applied" => 1,"_fields_resolved" => 1,"_interfaces_resolved" => 1,"description" => "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.","fields" => {"directives" => {"description" => "A list of all directives supported by this server.","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; $_[0]->directives;},"type" => bless( {"of" => bless( {"non_null" => {},"of" => bless( {"list" => {},"of" => bless( {"_fields_deprecation_applied" => 1,"_fields_resolved" => 1,"_interfaces_resolved" => 1,"description" => "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.","fields" => {"args" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; _hash2array($_[0]->args);},"type" => bless( {"of" => bless( {"non_null" => {},"of" => bless( {"list" => {},"of" => bless( {"_fields_deprecation_applied" => 1,"_fields_resolved" => 1,"_interfaces_resolved" => 1,"description" => "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.","fields" => {"defaultValue" => {"description" => "A GraphQL-formatted string representing the default value for this input value.","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; '???'; return unless defined(my $value = $_[0]{'default_value'}); my $gql = $_[0]{'type'}->perl_to_graphql($value); return $gql if $_[0]{'type'}->isa('GraphQL::Type::Enum'); $JSON_noutf8->encode($gql);},"type" => bless( {"description" => "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.","name" => "String","non_null" => bless( {"of" => {}}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Input__AND__GraphQL::Role::Output' ),"parse_value" => sub { package GraphQL::Type::Scalar; use warnings; use strict; no feature ':all'; use feature ':5.12'; BEGIN { $^H{'Function::Parameters/config'} = 'HASH(0x5cbbe49dddc0)'; } return undef unless defined $_[0]; goto \&$closure;},"serialize" => sub { package GraphQL::Type::Scalar; use warnings; use strict; no feature ':all'; use feature ':5.12'; BEGIN { $^H{'Function::Parameters/config'} = 'HASH(0x5cbbe49dddc0)'; } return undef unless defined $_[0]; goto \&$closure;}}, 'GraphQL::Type::Scalar' )},"description" => {"type" => {}},"name" => {"type" => {}},"type" => {"type" => bless( {"list" => bless( {"non_null" => bless( {"of" => {}}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' ),"of" => {}}, 'GraphQL::Type::List__WITH__GraphQL::Role::Output' ),"of" => bless( {"_fields_deprecation_applied" => 1,"_fields_resolved" => 1,"_interfaces_resolved" => 1,"description" => "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.","fields" => {"description" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; return undef unless $root_value->can($field_name); my(@passon) = %$args ? $args : (); $root_value->$field_name(@passon);},"type" => {}},"enumValues" => {"args" => {"includeDeprecated" => {"default_value" => 0,"type" => bless( {"description" => "The `Boolean` scalar type represents `true` or `false`.","name" => "Boolean","non_null" => bless( {"of" => {}}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Input__AND__GraphQL::Role::Output' ),"parse_value" => sub { package GraphQL::Type::Scalar; use warnings; use strict; no feature ':all'; use feature ':5.12'; BEGIN { $^H{'Function::Parameters/config'} = 'HASH(0x5cbbe49dddc0)'; } return undef unless defined $_[0]; goto \&$closure;},"serialize" => sub { package GraphQL::Type::Scalar; use warnings; use strict; no feature ':all'; use feature ':5.12'; BEGIN { $^H{'Function::Parameters/config'} = 'HASH(0x5cbbe49dddc0)'; } return undef unless defined $_[0]; goto \&$closure;}}, 'GraphQL::Type::Scalar' )}},"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($type, $args) = @_; return unless $type->isa('GraphQL::Type::Enum'); my $values = $type->values; '???'; $values = {map({$_, $values->{$_};} grep((!$values->{$_}{'is_deprecated'}), keys %$values))} unless $args->{'includeDeprecated'}; [map({+{'name', $_, 'description', $values->{$_}{'description'}, 'isDeprecated', $values->{$_}{'is_deprecated'}, 'deprecationReason', $values->{$_}{'deprecation_reason'}};} sort(keys %{$values;}))];},"type" => bless( {"of" => bless( {"list" => {},"of" => bless( {"_fields_deprecation_applied" => 1,"_fields_resolved" => 1,"_interfaces_resolved" => 1,"description" => "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.","fields" => {"deprecationReason" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; $root_value->{$real};},"type" => {}},"description" => {"type" => {}},"isDeprecated" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; not !$root_value->{$real};},"type" => {}},"name" => {"type" => {}}},"name" => "__EnumValue","non_null" => {}}, 'GraphQL::Type::Object' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )}, 'GraphQL::Type::List__WITH__GraphQL::Role::Output' )},"fields" => {"args" => {"includeDeprecated" => {"default_value" => 0,"type" => {}}},"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($type, $args) = @_; return undef unless $type->DOES('GraphQL::Role::FieldsOutput'); my $map = $type->fields; $map = {map({$_, $map->{$_};} grep((!$map->{$_}{'deprecation_reason'}), keys %$map))} unless $args->{'includeDeprecated'}; [map({+{'name', $_, 'description', $map->{$_}{'description'}, 'args', $map->{$_}{'args'}, 'type', $map->{$_}{'type'}, 'isDeprecated', $map->{$_}{'is_deprecated'}, 'deprecationReason', $map->{$_}{'deprecation_reason'}};} sort(keys %{$map;}))];},"type" => bless( {"of" => bless( {"list" => {},"of" => bless( {"_fields_deprecation_applied" => 1,"_fields_resolved" => 1,"_interfaces_resolved" => 1,"description" => "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.","fields" => {"args" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; _hash2array($_[0]{'args'} || {});},"type" => {}},"deprecationReason" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; $root_value->{$real};},"type" => {}},"description" => {"type" => {}},"isDeprecated" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; not !$root_value->{$real};},"type" => {}},"name" => {"type" => {}},"type" => {"type" => {}}},"name" => "__Field","non_null" => {}}, 'GraphQL::Type::Object' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )}, 'GraphQL::Type::List__WITH__GraphQL::Role::Output' )},"inputFields" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($type) = @_; return unless $type->isa('GraphQL::Type::InputObject'); _hash2array($type->fields || {});},"type" => {}},"interfaces" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($type) = @_; return unless $type->isa('GraphQL::Type::Object'); $type->interfaces or [];},"type" => {}},"kind" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my $c = ref $_[0]; $c =~ s/__.*//u; {GraphQL::Type::Enum => 'ENUM', GraphQL::Type::InputObject => 'INPUT_OBJECT', GraphQL::Type::Interface => 'INTERFACE', GraphQL::Type::List => 'LIST', GraphQL::Type::NonNull => 'NON_NULL', GraphQL::Type::Object => 'OBJECT', GraphQL::Type::Scalar => 'SCALAR', GraphQL::Type::Union => 'UNION'}->{$c} // die('Unknown kind of type => ' . ref($_[0]));},"type" => bless( {"of" => bless( {"_fields_deprecation_applied" => 1,"description" => "An enum describing what kind of type a given `__Type` is.","name" => "__TypeKind","non_null" => {},"values" => {"ENUM" => {"description" => "Indicates this type is an enum. `enumValues` is a valid field.","value" => "ENUM"},"INPUT_OBJECT" => {"description" => "Indicates this type is an input object. `inputFields` is a valid field.","value" => "INPUT_OBJECT"},"INTERFACE" => {"description" => "Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.","value" => "INTERFACE"},"LIST" => {"description" => "Indicates this type is a list. `ofType` is a valid field.","value" => "LIST"},"NON_NULL" => {"description" => "Indicates this type is a non-null. `ofType` is a valid field.","value" => "NON_NULL"},"OBJECT" => {"description" => "Indicates this type is an object. `fields` and `interfaces` are valid fields.","value" => "OBJECT"},"SCALAR" => {"description" => "Indicates this type is a scalar.","value" => "SCALAR"},"UNION" => {"description" => "Indicates this type is a union. `possibleTypes` is a valid field.","value" => "UNION"}}}, 'GraphQL::Type::Enum' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Input__AND__GraphQL::Role::Output' )},"name" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; return undef if $root_value->can('of'); my(@passon) = %$args ? $args : (); $root_value->name(@passon);},"type" => {}},"ofType" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; return unless $_[0]->can('of'); $_[0]->of;},"type" => {}},"possibleTypes" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; return unless $_[0]->DOES('GraphQL::Role::Abstract'); $_[3]{'schema'}->get_possible_types($_[0]);},"type" => {}}},"name" => "__Type","non_null" => {}}, 'GraphQL::Type::Object' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )}},"name" => "__InputValue","non_null" => {}}, 'GraphQL::Type::Object' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )}, 'GraphQL::Type::List__WITH__GraphQL::Role::Output' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )},"description" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; return undef unless $root_value->can($field_name); my(@passon) = %$args ? $args : (); $root_value->$field_name(@passon);},"type" => {}},"locations" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; return undef unless $root_value->can($field_name); my(@passon) = %$args ? $args : (); $root_value->$field_name(@passon);},"type" => bless( {"of" => bless( {"non_null" => {},"of" => bless( {"list" => {},"of" => bless( {"_fields_deprecation_applied" => 1,"description" => "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.","name" => "__DirectiveLocation","non_null" => {},"values" => {"ARGUMENT_DEFINITION" => {"description" => "Location adjacent to an argument definition.","value" => "ARGUMENT_DEFINITION"},"ENUM" => {"description" => "Location adjacent to an enum definition.","value" => "ENUM"},"ENUM_VALUE" => {"description" => "Location adjacent to an enum value definition.","value" => "ENUM_VALUE"},"FIELD" => {"description" => "Location adjacent to a field.","value" => "FIELD"},"FIELD_DEFINITION" => {"description" => "Location adjacent to a field definition.","value" => "FIELD_DEFINITION"},"FRAGMENT_DEFINITION" => {"description" => "Location adjacent to a fragment definition.","value" => "FRAGMENT_DEFINITION"},"FRAGMENT_SPREAD" => {"description" => "Location adjacent to a fragment spread.","value" => "FRAGMENT_SPREAD"},"INLINE_FRAGMENT" => {"description" => "Location adjacent to an inline fragment.","value" => "INLINE_FRAGMENT"},"INPUT_FIELD_DEFINITION" => {"description" => "Location adjacent to an input object field definition.","value" => "INPUT_FIELD_DEFINITION"},"INPUT_OBJECT" => {"description" => "Location adjacent to an input object type definition.","value" => "INPUT_OBJECT"},"INTERFACE" => {"description" => "Location adjacent to an interface definition.","value" => "INTERFACE"},"MUTATION" => {"description" => "Location adjacent to a mutation operation.","value" => "MUTATION"},"OBJECT" => {"description" => "Location adjacent to an object type definition.","value" => "OBJECT"},"QUERY" => {"description" => "Location adjacent to a query operation.","value" => "QUERY"},"SCALAR" => {"description" => "Location adjacent to a scalar definition.","value" => "SCALAR"},"SCHEMA" => {"description" => "Location adjacent to a schema definition.","value" => "SCHEMA"},"SUBSCRIPTION" => {"description" => "Location adjacent to a subscription operation.","value" => "SUBSCRIPTION"},"UNION" => {"description" => "Location adjacent to a union definition.","value" => "UNION"}}}, 'GraphQL::Type::Enum' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Input__AND__GraphQL::Role::Output' )}, 'GraphQL::Type::List__WITH__GraphQL::Role::Input__AND__GraphQL::Role::Output' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Input__AND__GraphQL::Role::Output' )},"name" => {"resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; my($root_value, $args, $context, $info) = @_; return undef unless $root_value->can($field_name); my(@passon) = %$args ? $args : (); $root_value->$field_name(@passon);},"type" => {}}},"name" => "__Directive","non_null" => {}}, 'GraphQL::Type::Object' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )}, 'GraphQL::Type::List__WITH__GraphQL::Role::Output' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )},"mutationType" => {"description" => "If this server supports mutation, the type that mutation operations will be rooted at.","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; $_[0]->mutation;},"type" => {}},"queryType" => {"description" => "The type that query operations will be rooted at.","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; $_[0]->query;},"type" => {}},"subscriptionType" => {"description" => "If this server support subscription, the type that subscription operations will be rooted at.","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; $_[0]->subscription;},"type" => {}},"types" => {"description" => "A list of all types supported by this server.","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; [(sort {$a->name cmp $b->name;} values %{$_[0]->name2type;})];},"type" => {}}},"name" => "__Schema","non_null" => {}}, 'GraphQL::Type::Object' )}, 'GraphQL::Type::NonNull__WITH__GraphQL::Role::Output' )},"__type" => {"args" => {"name" => {"type" => {}}},"description" => "Request the type information of a single type.","name" => "__type","resolve" => sub { package GraphQL::Introspection; use warnings; use strict; no feature ':all'; use feature ':5.12'; $_[3]{'schema'}->name2type->{$_[1]{'name'}};},"type" => {}}};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"list"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"list"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"}{"non_null"}{"of"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"description"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"name"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"list"}{"non_null"}{"of"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"list"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"list"}{"of"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"description"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"args"}{"includeDeprecated"}{"type"}{"non_null"}{"of"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"args"}{"includeDeprecated"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"}{"list"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"}{"of"}{"fields"}{"deprecationReason"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"}{"of"}{"fields"}{"description"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"}{"of"}{"fields"}{"isDeprecated"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"args"}{"includeDeprecated"}{"type"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"}{"of"}{"fields"}{"name"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"args"}{"includeDeprecated"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"args"}{"includeDeprecated"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"list"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"fields"}{"args"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"fields"}{"deprecationReason"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"fields"}{"description"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"fields"}{"isDeprecated"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"enumValues"}{"args"}{"includeDeprecated"}{"type"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"fields"}{"name"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"fields"}{"type"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"fields"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"inputFields"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"interfaces"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"list"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"kind"}{"type"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"kind"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"name"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"ofType"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"fields"}{"possibleTypes"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"list"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"description"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"locations"}{"type"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"locations"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"locations"}{"type"}{"of"}{"of"}{"list"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"locations"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"locations"}{"type"}{"of"}{"of"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"locations"}{"type"}{"of"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"name"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"non_null"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"mutationType"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"queryType"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"subscriptionType"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"};$v->{"__schema"}{"type"}{"of"}{"fields"}{"types"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"list"}{"non_null"};$v->{"__schema"}{"type"}{"of"}{"non_null"} = $v->{"__schema"}{"type"};$v->{"__type"}{"args"}{"name"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"defaultValue"}{"type"}{"non_null"};$v->{"__type"}{"type"} = $v->{"__schema"}{"type"}{"of"}{"fields"}{"directives"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"args"}{"type"}{"of"}{"of"}{"of"}{"fields"}{"type"}{"type"}{"of"}; \$v}->{$field_name}B= $parent_type == $schema->query
|
| 435 |
1384 |
| $parent_type->fields->{$field_name}; |
| 436 |
15 |
▶ | } |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 437 |
|
| |
| 438 |
|
| # NB similar ordering as _execute_fields - graphql-js switches |
| 439 |
2167 |
▶ | fun _build_resolve_info( |
|
Subroutine
_build_resolve_info: called CC=8 SCAR=22.6
|
| 440 |
|
| HashRef $context, |
| 441 |
|
| (InstanceOf['GraphQL::Type']) $parent_type, |
| 442 |
|
| HashRef $field_def, |
| 443 |
|
| ArrayRef $path, |
| 444 |
|
| ArrayRef[HashRef] $nodes, |
| 445 |
98 |
▶ | ) { |
Branch: 7 branches
| Branch | True | False | Total |
| @_ < 5 and Function::Parameters::_croak('Too few arguments for fun _build_resolve_info (expected 5, got ' . @_ . ')') |
2167 |
0 |
2167 |
| @_ > 5 and Function::Parameters::_croak('Too many arguments for fun _build_resolve_info (expected 5, got ' . @_ . ')') |
0 |
2167 |
2167 |
| Ref::Util::XS::is_plain_hashref($context) or Function::Parameters::_croak('In fun _build_resolve_info: parameter 1 ($context): ' . ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($context)) |
0 |
2167 |
2167 |
| Type::Tiny::XS::AUTO::TC9($parent_type) or Function::Parameters::_croak('In fun _build_resolve_info: parameter 2 ($parent_type): ' . ${my $v = bless( {"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"class" => "GraphQL::Type","coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 985,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "InstanceOf[\"GraphQL::Type\"]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Method/Generate/Accessor.pm","line" => 716,"package" => "Method::Generate::Accessor"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","name" => "__ANON__","type_constraints" => [bless( {"class" => "Moo::Object","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Method/Generate/Accessor.pm","line" => 716,"package" => "Method::Generate::Accessor"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_blessed_ref($_[0]) or _failed_check(24, 'Object', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Object","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; builtin::blessed($_);},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 578,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Object","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_blessed_ref($_[1])" : &$maybe_load_modules('Scalar::Util', "Scalar::Util::blessed($_[1])");},"is_object" => 1,"library" => "Types::Standard","name" => "Object","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"uniq" => 24}, 'Type::Tiny' ),"uniq" => 103}, 'Type::Tiny::Class' ),bless( {"class" => "GraphQL::MaybeTypeCheck","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Method/Generate/Accessor.pm","line" => 716,"package" => "Method::Generate::Accessor"},"deprecated" => !!0,"inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","uniq" => 104}, 'Type::Tiny::Class' )],"uniq" => 105,"xs_sub" => "Type::Tiny::XS::AUTO::TC12"}, 'Type::Tiny::Intersection' ),"uniq" => 101}, 'Type::Tiny::Class' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($parent_type)) |
2167 |
0 |
2167 |
| Ref::Util::XS::is_plain_hashref($field_def) or Function::Parameters::_croak('In fun _build_resolve_info: parameter 3 ($field_def): ' . ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($field_def)) |
2167 |
0 |
2167 |
| Ref::Util::XS::is_plain_arrayref($path) or Function::Parameters::_croak('In fun _build_resolve_info: parameter 4 ($path): ' . ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_arrayref($_[0]) or _failed_check(21, 'ArrayRef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_ArrayRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, @new) = ($_, 0);'; push @code, 'for (@$orig) {'; push @code, sprintf('++$return_orig && last unless (%s);', $coercable_item->inline_check('$_')); push @code, sprintf('push @new, (%s);', $param->coercion->inline_coercion('$_')); push @code, '}'; push @code, '$return_orig ? $orig : \\@new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my @new; foreach my $item (@$value) { return $value unless $coercable_item->check($item); push @new, $param->coerce($item); } return \@new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'ARRAY';},"constraint_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; return &Types::Standard::ArrayRef() unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'ArrayRef', \@_, 3); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to ArrayRef[`a] expected to be a type constraint; got $param"; my($min, $max) = (0, -1); $min = Types::Standard::assert_Int(shift()) if @_; $max = Types::Standard::assert_Int(shift()) if @_; my $param_compiled_check = $param->compiled_check; my $xsub; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("ArrayRef[$paramname]") if $paramname; } elsif (&Type::Tiny::_USE_MOUSE() and $param->_has_xsub and $min == 0 and $max == -1) { require Mouse::Util::TypeConstraints; my $maker = 'Mouse::Util::TypeConstraints'->can('_parameterize_ArrayRef_for'); $xsub = &$maker($param) if $maker; } return sub { my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0; } , $xsub if $min == 0 and $max == -1; return sub { my $array = shift(); return if @$array < $min; ($param->check($_) or return) foreach (@$array); return !0; } if $max == -1; return sub { my $array = shift(); return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } if $min == 0; return sub { my $array = shift(); return if @$array < $min; return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } ;},"deep_explanation" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; my($min, $max) = (0, -1); $min = $type->parameters->[1] if @{$type->parameters;} > 1; $max = $type->parameters->[2] if @{$type->parameters;} > 2; if ($min != 0 and @$value < $min) { return [sprintf('"%s" constrains array length at least %s', $type, $min), sprintf('@{%s} is %d', $varname, scalar @$value)]; } if ($max > 0 and @$value > $max) { return [sprintf('"%s" constrains array length at most %d', $type, $max), sprintf('@{%s} is %d', $varname, scalar @$value)]; } foreach my $i (0 .. $value->$#*) { my $item = $value->[$i]; next if $param->check($item); return [sprintf('"%s" constrains each value in the array with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->[%d]', $varname, $i));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 523,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "ArrayRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $param = shift(); my($min, $max) = (0, -1); $min = shift() if @_; $max = shift() if @_; my $param_compiled_check = $param->compiled_check; my $xsubname; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("ArrayRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_arrayref($_[1])" : "ref($_[1]) eq 'ARRAY'";},"library" => "Types::Standard","name" => "ArrayRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return [];},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 21}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($path)) |
2167 |
0 |
2167 |
| Type::Tiny::XS::AUTO::TC1($nodes) or Function::Parameters::_croak('In fun _build_resolve_info: parameter 5 ($nodes): ' . ${my $v = bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 92,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "ArrayRef[HashRef]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}';},"name" => "__ANON__","parameters" => [bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' )],"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_arrayref($_[0]) or _failed_check(21, 'ArrayRef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_ArrayRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, @new) = ($_, 0);'; push @code, 'for (@$orig) {'; push @code, sprintf('++$return_orig && last unless (%s);', $coercable_item->inline_check('$_')); push @code, sprintf('push @new, (%s);', $param->coercion->inline_coercion('$_')); push @code, '}'; push @code, '$return_orig ? $orig : \\@new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my @new; foreach my $item (@$value) { return $value unless $coercable_item->check($item); push @new, $param->coerce($item); } return \@new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'ARRAY';},"constraint_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; return &Types::Standard::ArrayRef() unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'ArrayRef', \@_, 3); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to ArrayRef[`a] expected to be a type constraint; got $param"; my($min, $max) = (0, -1); $min = Types::Standard::assert_Int(shift()) if @_; $max = Types::Standard::assert_Int(shift()) if @_; my $param_compiled_check = $param->compiled_check; my $xsub; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("ArrayRef[$paramname]") if $paramname; } elsif (&Type::Tiny::_USE_MOUSE() and $param->_has_xsub and $min == 0 and $max == -1) { require Mouse::Util::TypeConstraints; my $maker = 'Mouse::Util::TypeConstraints'->can('_parameterize_ArrayRef_for'); $xsub = &$maker($param) if $maker; } return sub { my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0; } , $xsub if $min == 0 and $max == -1; return sub { my $array = shift(); return if @$array < $min; ($param->check($_) or return) foreach (@$array); return !0; } if $max == -1; return sub { my $array = shift(); return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } if $min == 0; return sub { my $array = shift(); return if @$array < $min; return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } ;},"deep_explanation" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; my($min, $max) = (0, -1); $min = $type->parameters->[1] if @{$type->parameters;} > 1; $max = $type->parameters->[2] if @{$type->parameters;} > 2; if ($min != 0 and @$value < $min) { return [sprintf('"%s" constrains array length at least %s', $type, $min), sprintf('@{%s} is %d', $varname, scalar @$value)]; } if ($max > 0 and @$value > $max) { return [sprintf('"%s" constrains array length at most %d', $type, $max), sprintf('@{%s} is %d', $varname, scalar @$value)]; } foreach my $i (0 .. $value->$#*) { my $item = $value->[$i]; next if $param->check($item); return [sprintf('"%s" constrains each value in the array with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->[%d]', $varname, $i));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 523,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "ArrayRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $param = shift(); my($min, $max) = (0, -1); $min = shift() if @_; $max = shift() if @_; my $param_compiled_check = $param->compiled_check; my $xsubname; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("ArrayRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_arrayref($_[1])" : "ref($_[1]) eq 'ARRAY'";},"library" => "Types::Standard","name" => "ArrayRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return [];},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 21}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 44}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"coercion"}{"type_constraint"} = $v->{"parameters"}[0];$v->{"parameters"}[0]{"compiled_type_constraint"} = $v->{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"};$v->{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"};$v->{"type_default"} = $v->{"parent"}{"type_default"}; \$v}->get_message($nodes)) |
2167 |
0 |
2167 |
|
| 446 |
|
| { |
| 447 |
|
| field_name => $nodes->[0]{name}, |
| 448 |
|
| field_nodes => $nodes, |
| 449 |
|
| return_type => $field_def->{type}, |
| 450 |
|
| parent_type => $parent_type, |
| 451 |
|
| path => $path, |
| 452 |
|
| schema => $context->{schema}, |
| 453 |
|
| fragments => $context->{fragments}, |
| 454 |
|
| root_value => $context->{root_value}, |
| 455 |
|
| operation => $context->{operation}, |
| 456 |
|
| variable_values => $context->{variable_values}, |
| 457 |
|
| promise_code => $context->{promise_code}, |
| 458 |
2522 |
| }; |
| 459 |
|
| } |
| 460 |
|
| |
| 461 |
2167 |
▶ | fun _resolve_field_value_or_error( |
|
Subroutine
_resolve_field_value_or_error: called CC=10 SCAR=24.2
|
| 462 |
|
| HashRef $context, |
| 463 |
|
| HashRef $field_def, |
| 464 |
|
| ArrayRef[HashRef] $nodes, |
| 465 |
|
| Maybe[CodeLike] $resolve, |
| 466 |
|
| Maybe[Any] $root_value, |
| 467 |
|
| HashRef $info, |
| 468 |
2522 |
▶ | ) { |
Branch: 8 branches
| Branch | True | False | Total |
| @_ < 6 and Function::Parameters::_croak('Too few arguments for fun _resolve_field_value_or_error (expected 6, got ' . @_ . ')') |
2167 |
0 |
2167 |
| @_ > 6 and Function::Parameters::_croak('Too many arguments for fun _resolve_field_value_or_error (expected 6, got ' . @_ . ')') |
2167 |
0 |
2167 |
| Ref::Util::XS::is_plain_hashref($context) or Function::Parameters::_croak('In fun _resolve_field_value_or_error: parameter 1 ($context): ' . ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($context)) |
29 |
2138 |
2167 |
| Ref::Util::XS::is_plain_hashref($field_def) or Function::Parameters::_croak('In fun _resolve_field_value_or_error: parameter 2 ($field_def): ' . ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($field_def)) |
0 |
2522 |
2522 |
| Type::Tiny::XS::AUTO::TC1($nodes) or Function::Parameters::_croak('In fun _resolve_field_value_or_error: parameter 3 ($nodes): ' . ${my $v = bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 92,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "ArrayRef[HashRef]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}';},"name" => "__ANON__","parameters" => [bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' )],"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_arrayref($_[0]) or _failed_check(21, 'ArrayRef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_ArrayRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, @new) = ($_, 0);'; push @code, 'for (@$orig) {'; push @code, sprintf('++$return_orig && last unless (%s);', $coercable_item->inline_check('$_')); push @code, sprintf('push @new, (%s);', $param->coercion->inline_coercion('$_')); push @code, '}'; push @code, '$return_orig ? $orig : \\@new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my @new; foreach my $item (@$value) { return $value unless $coercable_item->check($item); push @new, $param->coerce($item); } return \@new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'ARRAY';},"constraint_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; return &Types::Standard::ArrayRef() unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'ArrayRef', \@_, 3); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to ArrayRef[`a] expected to be a type constraint; got $param"; my($min, $max) = (0, -1); $min = Types::Standard::assert_Int(shift()) if @_; $max = Types::Standard::assert_Int(shift()) if @_; my $param_compiled_check = $param->compiled_check; my $xsub; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("ArrayRef[$paramname]") if $paramname; } elsif (&Type::Tiny::_USE_MOUSE() and $param->_has_xsub and $min == 0 and $max == -1) { require Mouse::Util::TypeConstraints; my $maker = 'Mouse::Util::TypeConstraints'->can('_parameterize_ArrayRef_for'); $xsub = &$maker($param) if $maker; } return sub { my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0; } , $xsub if $min == 0 and $max == -1; return sub { my $array = shift(); return if @$array < $min; ($param->check($_) or return) foreach (@$array); return !0; } if $max == -1; return sub { my $array = shift(); return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } if $min == 0; return sub { my $array = shift(); return if @$array < $min; return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } ;},"deep_explanation" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; my($min, $max) = (0, -1); $min = $type->parameters->[1] if @{$type->parameters;} > 1; $max = $type->parameters->[2] if @{$type->parameters;} > 2; if ($min != 0 and @$value < $min) { return [sprintf('"%s" constrains array length at least %s', $type, $min), sprintf('@{%s} is %d', $varname, scalar @$value)]; } if ($max > 0 and @$value > $max) { return [sprintf('"%s" constrains array length at most %d', $type, $max), sprintf('@{%s} is %d', $varname, scalar @$value)]; } foreach my $i (0 .. $value->$#*) { my $item = $value->[$i]; next if $param->check($item); return [sprintf('"%s" constrains each value in the array with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->[%d]', $varname, $i));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 523,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "ArrayRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $param = shift(); my($min, $max) = (0, -1); $min = shift() if @_; $max = shift() if @_; my $param_compiled_check = $param->compiled_check; my $xsubname; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("ArrayRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_arrayref($_[1])" : "ref($_[1]) eq 'ARRAY'";},"library" => "Types::Standard","name" => "ArrayRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return [];},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 21}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 44}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"coercion"}{"type_constraint"} = $v->{"parameters"}[0];$v->{"parameters"}[0]{"compiled_type_constraint"} = $v->{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"};$v->{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"};$v->{"type_default"} = $v->{"parent"}{"type_default"}; \$v}->get_message($nodes)) |
0 |
2522 |
2522 |
| Type::Tiny::XS::AUTO::TC8($resolve) or Function::Parameters::_croak('In fun _resolve_field_value_or_error: parameter 4 ($resolve): ' . ${my $v = bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; my $value = shift(); return !0 unless defined $value; return $param->check($value);},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/x86_64-linux/Function/Parameters.pm","line" => 98,"package" => "Function::Parameters"},"deprecated" => !!0,"display_name" => "Maybe[CodeLike]","inlined" => sub { package Types::Standard; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $param_check = $param->inline_check($v); "!defined($v) or $param_check";},"name" => "__ANON__","parameters" => [bless( {"_default_message" => sub { package Type::Tiny; use warnings; use strict; sprintf '%s did not pass type constraint "%s"', _dd($_[0]), $name;},"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"compiled_type_constraint" => sub ;,"constraint" => sub { package Types::TypeTiny; use warnings; use strict; ref $_ eq 'CODE' or builtin::blessed($_) and _check_overload($_, '&{}');},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/TypeTiny.pm","line" => 432,"package" => "Types::TypeTiny"},"deprecated" => !!0,"display_name" => "CodeLike","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::TypeTiny; use warnings; use strict; $Type::Tiny::AvoidCallbacks || !$xsubname ? goto $inlined : "$xsubname($_[1])";},"is_using_default_message" => 1,"library" => "Types::TypeTiny","name" => "CodeLike","type_default" => sub { package Types::TypeTiny; use warnings; use strict; return sub { } ;},"uniq" => 94}, 'Type::Tiny' )],"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Maybe","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; return $param->coercion;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Maybe') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Maybe', \@_, 1); my $param = Types::TypeTiny::to_TypeTiny(shift()); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to Maybe[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my @xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); push @xsub, Type::Tiny::XS::get_coderef_for("Maybe[$paramname]") if $paramname }; return sub { my $value = shift(); return !0 unless defined $value; return $param->check($value); } , @xsub;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return [sprintf('%s is defined', Type::Tiny::_dd($value)), sprintf('"%s" constrains the value with "%s" if it is defined', $type, $param), @{$param->validate_explain($value, $varname);}];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 657,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Maybe","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $param = shift(); my $param_compiled_check = $param->compiled_check; my $xsubname; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("Maybe[$paramname]") }; return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $param_check = $param->inline_check($v); "!defined($v) or $param_check"; } ;},"library" => "Types::Standard","name" => "Maybe","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; $_[0]->type_default or $Type::Tiny::parameterize_type->type_default;},"uniq" => 25}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 100}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"constraint"};$v->{"type_default"} = $v->{"parameters"}[0]{"type_default"}; \$v}->get_message($resolve)) |
2522 |
0 |
2522 |
| Type::Tiny::XS::AUTO::TC30($root_value) or Function::Parameters::_croak('In fun _resolve_field_value_or_error: parameter 5 ($root_value): ' . ${my $v = bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; my $value = shift(); return !0 unless defined $value; return $param->check($value);},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/x86_64-linux/Function/Parameters.pm","line" => 98,"package" => "Function::Parameters"},"deprecated" => !!0,"display_name" => "Maybe[Any]","inlined" => sub { package Types::Standard; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $param_check = $param->inline_check($v); "!defined($v) or $param_check";},"name" => "__ANON__","parameters" => [bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' )],"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Maybe","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; return $param->coercion;},"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Maybe') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Maybe', \@_, 1); my $param = Types::TypeTiny::to_TypeTiny(shift()); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to Maybe[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my @xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); push @xsub, Type::Tiny::XS::get_coderef_for("Maybe[$paramname]") if $paramname }; return sub { my $value = shift(); return !0 unless defined $value; return $param->check($value); } , @xsub;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return [sprintf('%s is defined', Type::Tiny::_dd($value)), sprintf('"%s" constrains the value with "%s" if it is defined', $type, $param), @{$param->validate_explain($value, $varname);}];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 657,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Maybe","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $param = shift(); my $param_compiled_check = $param->compiled_check; my $xsubname; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("Maybe[$paramname]") }; return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $param_check = $param->inline_check($v); "!defined($v) or $param_check"; } ;},"library" => "Types::Standard","name" => "Maybe","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => {},"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; $_[0]->type_default or $Type::Tiny::parameterize_type->type_default;},"uniq" => 25}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 154}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"coercion"}{"type_constraint"} = $v->{"parameters"}[0];$v->{"parameters"}[0]{"compiled_type_constraint"} = $v->{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"constraint"} = $v->{"parameters"}[0]{"constraint"};$v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parameters"}[0];$v->{"type_default"} = $v->{"parameters"}[0]{"type_default"}; \$v}->get_message($root_value)) |
2522 |
0 |
2522 |
| Ref::Util::XS::is_plain_hashref($info) or Function::Parameters::_croak('In fun _resolve_field_value_or_error: parameter 6 ($info): ' . ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($info)) |
2522 |
0 |
2522 |
|
| 469 |
2522 |
| DEBUG and _debug('_resolve_field_value_or_error', $nodes, $field_def, eval { $JSON->encode($nodes->[0]) }); |
| 470 |
2461 |
| my $result = eval { |
| 471 |
|
| my $args = _get_argument_values( |
| 472 |
|
| $field_def, $nodes->[0], $context->{variable_values}, |
| 473 |
80 |
| ); |
| 474 |
3686 |
| DEBUG and _debug("_resolve_field_value_or_error(args)", $args, eval { $JSON->encode($args) }); |
| 475 |
3686 |
| $resolve->($root_value, $args, $context->{context_value}, $info) |
| 476 |
|
| }; |
| 477 |
3686 |
▶ | return GraphQL::Error->coerce($@) if $@; |
Branch: 1 branch
| Branch | True | False | Total |
| if $@ |
2522 |
0 |
2522 |
|
| 478 |
3686 |
| $result; |
| 479 |
|
| } |
| 480 |
|
| |
| 481 |
2522 |
▶ | fun _complete_value_catching_error( |
|
Subroutine
_complete_value_catching_error: called CC=11 SCAR=24.5
|
| 482 |
|
| HashRef $context, |
| 483 |
|
| (InstanceOf['GraphQL::Type']) $return_type, |
| 484 |
|
| ArrayRef[HashRef] $nodes, |
| 485 |
|
| HashRef $info, |
| 486 |
|
| ArrayRef $path, |
| 487 |
|
| Any $result, |
| 488 |
3686 |
▶ | ) :ReturnType(ExecutionPartialResult | Promise) { |
Branch: 7 branches
| Branch | True | False | Total |
| @_ < 6 and Function::Parameters::_croak('Too few arguments for fun _complete_value_catching_error (expected 6, got ' . @_ . ')') |
2522 |
0 |
2522 |
| @_ > 6 and Function::Parameters::_croak('Too many arguments for fun _complete_value_catching_error (expected 6, got ' . @_ . ')') |
1097 |
1425 |
2522 |
| Ref::Util::XS::is_plain_hashref($context) or Function::Parameters::_croak('In fun _complete_value_catching_error: parameter 1 ($context): ' . ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($context)) |
1286 |
98 |
1384 |
| Type::Tiny::XS::AUTO::TC9($return_type) or Function::Parameters::_croak('In fun _complete_value_catching_error: parameter 2 ($return_type): ' . ${my $v = bless( {"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"class" => "GraphQL::Type","coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 985,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "InstanceOf[\"GraphQL::Type\"]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Method/Generate/Accessor.pm","line" => 716,"package" => "Method::Generate::Accessor"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","name" => "__ANON__","type_constraints" => [bless( {"class" => "Moo::Object","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Method/Generate/Accessor.pm","line" => 716,"package" => "Method::Generate::Accessor"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_blessed_ref($_[0]) or _failed_check(24, 'Object', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Object","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; builtin::blessed($_);},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 578,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Object","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_blessed_ref($_[1])" : &$maybe_load_modules('Scalar::Util', "Scalar::Util::blessed($_[1])");},"is_object" => 1,"library" => "Types::Standard","name" => "Object","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"uniq" => 24}, 'Type::Tiny' ),"uniq" => 103}, 'Type::Tiny::Class' ),bless( {"class" => "GraphQL::MaybeTypeCheck","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Method/Generate/Accessor.pm","line" => 716,"package" => "Method::Generate::Accessor"},"deprecated" => !!0,"inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","uniq" => 104}, 'Type::Tiny::Class' )],"uniq" => 105,"xs_sub" => "Type::Tiny::XS::AUTO::TC12"}, 'Type::Tiny::Intersection' ),"uniq" => 101}, 'Type::Tiny::Class' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($return_type)) |
41 |
1384 |
1425 |
| Type::Tiny::XS::AUTO::TC1($nodes) or Function::Parameters::_croak('In fun _complete_value_catching_error: parameter 3 ($nodes): ' . ${my $v = bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 92,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "ArrayRef[HashRef]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}';},"name" => "__ANON__","parameters" => [bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' )],"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_arrayref($_[0]) or _failed_check(21, 'ArrayRef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_ArrayRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, @new) = ($_, 0);'; push @code, 'for (@$orig) {'; push @code, sprintf('++$return_orig && last unless (%s);', $coercable_item->inline_check('$_')); push @code, sprintf('push @new, (%s);', $param->coercion->inline_coercion('$_')); push @code, '}'; push @code, '$return_orig ? $orig : \\@new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my @new; foreach my $item (@$value) { return $value unless $coercable_item->check($item); push @new, $param->coerce($item); } return \@new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'ARRAY';},"constraint_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; return &Types::Standard::ArrayRef() unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'ArrayRef', \@_, 3); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to ArrayRef[`a] expected to be a type constraint; got $param"; my($min, $max) = (0, -1); $min = Types::Standard::assert_Int(shift()) if @_; $max = Types::Standard::assert_Int(shift()) if @_; my $param_compiled_check = $param->compiled_check; my $xsub; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("ArrayRef[$paramname]") if $paramname; } elsif (&Type::Tiny::_USE_MOUSE() and $param->_has_xsub and $min == 0 and $max == -1) { require Mouse::Util::TypeConstraints; my $maker = 'Mouse::Util::TypeConstraints'->can('_parameterize_ArrayRef_for'); $xsub = &$maker($param) if $maker; } return sub { my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0; } , $xsub if $min == 0 and $max == -1; return sub { my $array = shift(); return if @$array < $min; ($param->check($_) or return) foreach (@$array); return !0; } if $max == -1; return sub { my $array = shift(); return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } if $min == 0; return sub { my $array = shift(); return if @$array < $min; return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } ;},"deep_explanation" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; my($min, $max) = (0, -1); $min = $type->parameters->[1] if @{$type->parameters;} > 1; $max = $type->parameters->[2] if @{$type->parameters;} > 2; if ($min != 0 and @$value < $min) { return [sprintf('"%s" constrains array length at least %s', $type, $min), sprintf('@{%s} is %d', $varname, scalar @$value)]; } if ($max > 0 and @$value > $max) { return [sprintf('"%s" constrains array length at most %d', $type, $max), sprintf('@{%s} is %d', $varname, scalar @$value)]; } foreach my $i (0 .. $value->$#*) { my $item = $value->[$i]; next if $param->check($item); return [sprintf('"%s" constrains each value in the array with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->[%d]', $varname, $i));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 523,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "ArrayRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $param = shift(); my($min, $max) = (0, -1); $min = shift() if @_; $max = shift() if @_; my $param_compiled_check = $param->compiled_check; my $xsubname; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("ArrayRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_arrayref($_[1])" : "ref($_[1]) eq 'ARRAY'";},"library" => "Types::Standard","name" => "ArrayRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return [];},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 21}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 44}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"coercion"}{"type_constraint"} = $v->{"parameters"}[0];$v->{"parameters"}[0]{"compiled_type_constraint"} = $v->{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"};$v->{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"};$v->{"type_default"} = $v->{"parent"}{"type_default"}; \$v}->get_message($nodes)) |
0 |
2522 |
2522 |
| Ref::Util::XS::is_plain_hashref($info) or Function::Parameters::_croak('In fun _complete_value_catching_error: parameter 4 ($info): ' . ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($info)) |
0 |
2522 |
2522 |
| Ref::Util::XS::is_plain_arrayref($path) or Function::Parameters::_croak('In fun _complete_value_catching_error: parameter 5 ($path): ' . ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_arrayref($_[0]) or _failed_check(21, 'ArrayRef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_ArrayRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, @new) = ($_, 0);'; push @code, 'for (@$orig) {'; push @code, sprintf('++$return_orig && last unless (%s);', $coercable_item->inline_check('$_')); push @code, sprintf('push @new, (%s);', $param->coercion->inline_coercion('$_')); push @code, '}'; push @code, '$return_orig ? $orig : \\@new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my @new; foreach my $item (@$value) { return $value unless $coercable_item->check($item); push @new, $param->coerce($item); } return \@new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'ARRAY';},"constraint_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; return &Types::Standard::ArrayRef() unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'ArrayRef', \@_, 3); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to ArrayRef[`a] expected to be a type constraint; got $param"; my($min, $max) = (0, -1); $min = Types::Standard::assert_Int(shift()) if @_; $max = Types::Standard::assert_Int(shift()) if @_; my $param_compiled_check = $param->compiled_check; my $xsub; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("ArrayRef[$paramname]") if $paramname; } elsif (&Type::Tiny::_USE_MOUSE() and $param->_has_xsub and $min == 0 and $max == -1) { require Mouse::Util::TypeConstraints; my $maker = 'Mouse::Util::TypeConstraints'->can('_parameterize_ArrayRef_for'); $xsub = &$maker($param) if $maker; } return sub { my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0; } , $xsub if $min == 0 and $max == -1; return sub { my $array = shift(); return if @$array < $min; ($param->check($_) or return) foreach (@$array); return !0; } if $max == -1; return sub { my $array = shift(); return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } if $min == 0; return sub { my $array = shift(); return if @$array < $min; return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } ;},"deep_explanation" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; my($min, $max) = (0, -1); $min = $type->parameters->[1] if @{$type->parameters;} > 1; $max = $type->parameters->[2] if @{$type->parameters;} > 2; if ($min != 0 and @$value < $min) { return [sprintf('"%s" constrains array length at least %s', $type, $min), sprintf('@{%s} is %d', $varname, scalar @$value)]; } if ($max > 0 and @$value > $max) { return [sprintf('"%s" constrains array length at most %d', $type, $max), sprintf('@{%s} is %d', $varname, scalar @$value)]; } foreach my $i (0 .. $value->$#*) { my $item = $value->[$i]; next if $param->check($item); return [sprintf('"%s" constrains each value in the array with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->[%d]', $varname, $i));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 523,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "ArrayRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $param = shift(); my($min, $max) = (0, -1); $min = shift() if @_; $max = shift() if @_; my $param_compiled_check = $param->compiled_check; my $xsubname; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("ArrayRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_arrayref($_[1])" : "ref($_[1]) eq 'ARRAY'";},"library" => "Types::Standard","name" => "ArrayRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return [];},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 21}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($path)) |
2522 |
0 |
2522 |
|
| 489 |
3588 |
| DEBUG and _debug('_complete_value_catching_error(before)', $return_type->to_string, $result); |
| 490 |
3556 |
▶ | if ($return_type->isa('GraphQL::Type::NonNull')) { |
Branch: 1 branch
| Branch | True | False | Total |
| if ($return_type->isa("GraphQL::Type::NonNull")) |
2522 |
0 |
2522 |
|
| 491 |
1085 |
| return _complete_value_with_located_error(@_); |
| 492 |
|
| } |
| 493 |
1077 |
| my $result = eval { |
| 494 |
1077 |
| my $c = _complete_value_with_located_error(@_); |
| 495 |
17 |
▶ | return $c if !is_Promise($c); |
Branch: 1 branch
| Branch | True | False | Total |
| unless is_Promise($c) |
2522 |
0 |
2522 |
|
| 496 |
33 |
▶ | $c->then(undef, sub { |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
|
| 497 |
79 |
| $context->{promise_code}{resolve}->(_wrap_error(@_)) |
| 498 |
17 |
| }); |
| 499 |
|
| }; |
| 500 |
1060 |
| DEBUG and _debug("_complete_value_catching_error(after)(@{[$return_type->to_string]})", $return_type->to_string, $result, $@); |
| 501 |
2471 |
▶ | return _wrap_error($@) if $@; |
Branch: 1 branch
| Branch | True | False | Total |
| if $@ |
2522 |
0 |
2522 |
|
| 502 |
1880 |
| $result; |
| 503 |
15 |
▶ | } |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 504 |
|
| |
| 505 |
2522 |
▶ | fun _complete_value_with_located_error( |
|
Subroutine
_complete_value_with_located_error: called CC=10 SCAR=23.7
|
| 506 |
|
| HashRef $context, |
| 507 |
|
| (InstanceOf['GraphQL::Type']) $return_type, |
| 508 |
|
| ArrayRef[HashRef] $nodes, |
| 509 |
|
| HashRef $info, |
| 510 |
|
| ArrayRef $path, |
| 511 |
|
| Any $result, |
| 512 |
141 |
▶ | ) :ReturnType(ExecutionPartialResult | Promise) { |
Branch: 7 branches
| Branch | True | False | Total |
| @_ < 6 and Function::Parameters::_croak('Too few arguments for fun _complete_value_with_located_error (expected 6, got ' . @_ . ')') |
2522 |
0 |
2522 |
| @_ > 6 and Function::Parameters::_croak('Too many arguments for fun _complete_value_with_located_error (expected 6, got ' . @_ . ')') |
2297 |
164 |
2461 |
| Ref::Util::XS::is_plain_hashref($context) or Function::Parameters::_croak('In fun _complete_value_with_located_error: parameter 1 ($context): ' . ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($context)) |
61 |
2461 |
2522 |
| Type::Tiny::XS::AUTO::TC9($return_type) or Function::Parameters::_croak('In fun _complete_value_with_located_error: parameter 2 ($return_type): ' . ${my $v = bless( {"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"class" => "GraphQL::Type","coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 985,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "InstanceOf[\"GraphQL::Type\"]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Method/Generate/Accessor.pm","line" => 716,"package" => "Method::Generate::Accessor"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","name" => "__ANON__","type_constraints" => [bless( {"class" => "Moo::Object","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Method/Generate/Accessor.pm","line" => 716,"package" => "Method::Generate::Accessor"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_blessed_ref($_[0]) or _failed_check(24, 'Object', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Object","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; builtin::blessed($_);},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 578,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Object","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_blessed_ref($_[1])" : &$maybe_load_modules('Scalar::Util', "Scalar::Util::blessed($_[1])");},"is_object" => 1,"library" => "Types::Standard","name" => "Object","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"uniq" => 24}, 'Type::Tiny' ),"uniq" => 103}, 'Type::Tiny::Class' ),bless( {"class" => "GraphQL::MaybeTypeCheck","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Method/Generate/Accessor.pm","line" => 716,"package" => "Method::Generate::Accessor"},"deprecated" => !!0,"inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","uniq" => 104}, 'Type::Tiny::Class' )],"uniq" => 105,"xs_sub" => "Type::Tiny::XS::AUTO::TC12"}, 'Type::Tiny::Intersection' ),"uniq" => 101}, 'Type::Tiny::Class' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($return_type)) |
0 |
3686 |
3686 |
| Type::Tiny::XS::AUTO::TC1($nodes) or Function::Parameters::_croak('In fun _complete_value_with_located_error: parameter 3 ($nodes): ' . ${my $v = bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 92,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "ArrayRef[HashRef]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}';},"name" => "__ANON__","parameters" => [bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' )],"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_arrayref($_[0]) or _failed_check(21, 'ArrayRef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_ArrayRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, @new) = ($_, 0);'; push @code, 'for (@$orig) {'; push @code, sprintf('++$return_orig && last unless (%s);', $coercable_item->inline_check('$_')); push @code, sprintf('push @new, (%s);', $param->coercion->inline_coercion('$_')); push @code, '}'; push @code, '$return_orig ? $orig : \\@new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my @new; foreach my $item (@$value) { return $value unless $coercable_item->check($item); push @new, $param->coerce($item); } return \@new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'ARRAY';},"constraint_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; return &Types::Standard::ArrayRef() unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'ArrayRef', \@_, 3); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to ArrayRef[`a] expected to be a type constraint; got $param"; my($min, $max) = (0, -1); $min = Types::Standard::assert_Int(shift()) if @_; $max = Types::Standard::assert_Int(shift()) if @_; my $param_compiled_check = $param->compiled_check; my $xsub; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("ArrayRef[$paramname]") if $paramname; } elsif (&Type::Tiny::_USE_MOUSE() and $param->_has_xsub and $min == 0 and $max == -1) { require Mouse::Util::TypeConstraints; my $maker = 'Mouse::Util::TypeConstraints'->can('_parameterize_ArrayRef_for'); $xsub = &$maker($param) if $maker; } return sub { my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0; } , $xsub if $min == 0 and $max == -1; return sub { my $array = shift(); return if @$array < $min; ($param->check($_) or return) foreach (@$array); return !0; } if $max == -1; return sub { my $array = shift(); return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } if $min == 0; return sub { my $array = shift(); return if @$array < $min; return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } ;},"deep_explanation" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; my($min, $max) = (0, -1); $min = $type->parameters->[1] if @{$type->parameters;} > 1; $max = $type->parameters->[2] if @{$type->parameters;} > 2; if ($min != 0 and @$value < $min) { return [sprintf('"%s" constrains array length at least %s', $type, $min), sprintf('@{%s} is %d', $varname, scalar @$value)]; } if ($max > 0 and @$value > $max) { return [sprintf('"%s" constrains array length at most %d', $type, $max), sprintf('@{%s} is %d', $varname, scalar @$value)]; } foreach my $i (0 .. $value->$#*) { my $item = $value->[$i]; next if $param->check($item); return [sprintf('"%s" constrains each value in the array with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->[%d]', $varname, $i));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 523,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "ArrayRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $param = shift(); my($min, $max) = (0, -1); $min = shift() if @_; $max = shift() if @_; my $param_compiled_check = $param->compiled_check; my $xsubname; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("ArrayRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_arrayref($_[1])" : "ref($_[1]) eq 'ARRAY'";},"library" => "Types::Standard","name" => "ArrayRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return [];},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 21}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 44}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"coercion"}{"type_constraint"} = $v->{"parameters"}[0];$v->{"parameters"}[0]{"compiled_type_constraint"} = $v->{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"};$v->{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"};$v->{"type_default"} = $v->{"parent"}{"type_default"}; \$v}->get_message($nodes)) |
0 |
3686 |
3686 |
| Ref::Util::XS::is_plain_hashref($info) or Function::Parameters::_croak('In fun _complete_value_with_located_error: parameter 4 ($info): ' . ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($info)) |
3686 |
0 |
3686 |
| Ref::Util::XS::is_plain_arrayref($path) or Function::Parameters::_croak('In fun _complete_value_with_located_error: parameter 5 ($path): ' . ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_arrayref($_[0]) or _failed_check(21, 'ArrayRef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_ArrayRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, @new) = ($_, 0);'; push @code, 'for (@$orig) {'; push @code, sprintf('++$return_orig && last unless (%s);', $coercable_item->inline_check('$_')); push @code, sprintf('push @new, (%s);', $param->coercion->inline_coercion('$_')); push @code, '}'; push @code, '$return_orig ? $orig : \\@new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my @new; foreach my $item (@$value) { return $value unless $coercable_item->check($item); push @new, $param->coerce($item); } return \@new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'ARRAY';},"constraint_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; return &Types::Standard::ArrayRef() unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'ArrayRef', \@_, 3); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to ArrayRef[`a] expected to be a type constraint; got $param"; my($min, $max) = (0, -1); $min = Types::Standard::assert_Int(shift()) if @_; $max = Types::Standard::assert_Int(shift()) if @_; my $param_compiled_check = $param->compiled_check; my $xsub; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("ArrayRef[$paramname]") if $paramname; } elsif (&Type::Tiny::_USE_MOUSE() and $param->_has_xsub and $min == 0 and $max == -1) { require Mouse::Util::TypeConstraints; my $maker = 'Mouse::Util::TypeConstraints'->can('_parameterize_ArrayRef_for'); $xsub = &$maker($param) if $maker; } return sub { my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0; } , $xsub if $min == 0 and $max == -1; return sub { my $array = shift(); return if @$array < $min; ($param->check($_) or return) foreach (@$array); return !0; } if $max == -1; return sub { my $array = shift(); return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } if $min == 0; return sub { my $array = shift(); return if @$array < $min; return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } ;},"deep_explanation" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; my($min, $max) = (0, -1); $min = $type->parameters->[1] if @{$type->parameters;} > 1; $max = $type->parameters->[2] if @{$type->parameters;} > 2; if ($min != 0 and @$value < $min) { return [sprintf('"%s" constrains array length at least %s', $type, $min), sprintf('@{%s} is %d', $varname, scalar @$value)]; } if ($max > 0 and @$value > $max) { return [sprintf('"%s" constrains array length at most %d', $type, $max), sprintf('@{%s} is %d', $varname, scalar @$value)]; } foreach my $i (0 .. $value->$#*) { my $item = $value->[$i]; next if $param->check($item); return [sprintf('"%s" constrains each value in the array with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->[%d]', $varname, $i));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 523,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "ArrayRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $param = shift(); my($min, $max) = (0, -1); $min = shift() if @_; $max = shift() if @_; my $param_compiled_check = $param->compiled_check; my $xsubname; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("ArrayRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_arrayref($_[1])" : "ref($_[1]) eq 'ARRAY'";},"library" => "Types::Standard","name" => "ArrayRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return [];},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 21}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($path)) |
3686 |
0 |
3686 |
|
| 513 |
76 |
| my $result = eval { |
| 514 |
2188 |
| my $c = _complete_value(@_); |
| 515 |
2188 |
▶ | return $c if !is_Promise($c); |
Branch: 1 branch
| Branch | True | False | Total |
| unless is_Promise($c) |
3686 |
0 |
3686 |
|
| 516 |
80 |
▶ | $c->then(undef, sub { |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
|
| 517 |
2188 |
| $context->{promise_code}{reject}->( |
| 518 |
|
| _located_error($_[0], $nodes, $path) |
| 519 |
|
| ) |
| 520 |
2188 |
| }); |
| 521 |
|
| }; |
| 522 |
2188 |
| DEBUG and _debug('_complete_value_with_located_error(after)', $return_type->to_string, $result, $@); |
| 523 |
2188 |
▶ | die _located_error($@, $nodes, $path) if $@; |
Branch: 1 branch
| Branch | True | False | Total |
| if $@ |
3686 |
0 |
3686 |
|
| 524 |
2188 |
| $result; |
| 525 |
15 |
▶ | } |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 526 |
|
| |
| 527 |
3686 |
▶ | fun _complete_value( |
|
Subroutine
_complete_value: called CC=14 SCAR=26.6
|
| 528 |
|
| HashRef $context, |
| 529 |
|
| (InstanceOf['GraphQL::Type']) $return_type, |
| 530 |
|
| ArrayRef[HashRef] $nodes, |
| 531 |
|
| HashRef $info, |
| 532 |
|
| ArrayRef $path, |
| 533 |
|
| Any $result, |
| 534 |
2188 |
▶ | ) :ReturnType(ExecutionPartialResult | Promise) { |
Branch: 7 branches
| Branch | True | False | Total |
| @_ < 6 and Function::Parameters::_croak('Too few arguments for fun _complete_value (expected 6, got ' . @_ . ')') |
3686 |
0 |
3686 |
| @_ > 6 and Function::Parameters::_croak('Too many arguments for fun _complete_value (expected 6, got ' . @_ . ')') |
98 |
3588 |
3686 |
| Ref::Util::XS::is_plain_hashref($context) or Function::Parameters::_croak('In fun _complete_value: parameter 1 ($context): ' . ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($context)) |
32 |
3556 |
3588 |
| Type::Tiny::XS::AUTO::TC9($return_type) or Function::Parameters::_croak('In fun _complete_value: parameter 2 ($return_type): ' . ${my $v = bless( {"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"class" => "GraphQL::Type","coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 985,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "InstanceOf[\"GraphQL::Type\"]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Method/Generate/Accessor.pm","line" => 716,"package" => "Method::Generate::Accessor"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","name" => "__ANON__","type_constraints" => [bless( {"class" => "Moo::Object","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Method/Generate/Accessor.pm","line" => 716,"package" => "Method::Generate::Accessor"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_blessed_ref($_[0]) or _failed_check(24, 'Object', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Object","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; builtin::blessed($_);},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 578,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Object","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_blessed_ref($_[1])" : &$maybe_load_modules('Scalar::Util', "Scalar::Util::blessed($_[1])");},"is_object" => 1,"library" => "Types::Standard","name" => "Object","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"uniq" => 24}, 'Type::Tiny' ),"uniq" => 103}, 'Type::Tiny::Class' ),bless( {"class" => "GraphQL::MaybeTypeCheck","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Method/Generate/Accessor.pm","line" => 716,"package" => "Method::Generate::Accessor"},"deprecated" => !!0,"inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","uniq" => 104}, 'Type::Tiny::Class' )],"uniq" => 105,"xs_sub" => "Type::Tiny::XS::AUTO::TC12"}, 'Type::Tiny::Intersection' ),"uniq" => 101}, 'Type::Tiny::Class' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($return_type)) |
1085 |
2471 |
3556 |
| Type::Tiny::XS::AUTO::TC1($nodes) or Function::Parameters::_croak('In fun _complete_value: parameter 3 ($nodes): ' . ${my $v = bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 92,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "ArrayRef[HashRef]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}';},"name" => "__ANON__","parameters" => [bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' )],"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_arrayref($_[0]) or _failed_check(21, 'ArrayRef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_ArrayRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, @new) = ($_, 0);'; push @code, 'for (@$orig) {'; push @code, sprintf('++$return_orig && last unless (%s);', $coercable_item->inline_check('$_')); push @code, sprintf('push @new, (%s);', $param->coercion->inline_coercion('$_')); push @code, '}'; push @code, '$return_orig ? $orig : \\@new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my @new; foreach my $item (@$value) { return $value unless $coercable_item->check($item); push @new, $param->coerce($item); } return \@new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'ARRAY';},"constraint_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; return &Types::Standard::ArrayRef() unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'ArrayRef', \@_, 3); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to ArrayRef[`a] expected to be a type constraint; got $param"; my($min, $max) = (0, -1); $min = Types::Standard::assert_Int(shift()) if @_; $max = Types::Standard::assert_Int(shift()) if @_; my $param_compiled_check = $param->compiled_check; my $xsub; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("ArrayRef[$paramname]") if $paramname; } elsif (&Type::Tiny::_USE_MOUSE() and $param->_has_xsub and $min == 0 and $max == -1) { require Mouse::Util::TypeConstraints; my $maker = 'Mouse::Util::TypeConstraints'->can('_parameterize_ArrayRef_for'); $xsub = &$maker($param) if $maker; } return sub { my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0; } , $xsub if $min == 0 and $max == -1; return sub { my $array = shift(); return if @$array < $min; ($param->check($_) or return) foreach (@$array); return !0; } if $max == -1; return sub { my $array = shift(); return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } if $min == 0; return sub { my $array = shift(); return if @$array < $min; return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } ;},"deep_explanation" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; my($min, $max) = (0, -1); $min = $type->parameters->[1] if @{$type->parameters;} > 1; $max = $type->parameters->[2] if @{$type->parameters;} > 2; if ($min != 0 and @$value < $min) { return [sprintf('"%s" constrains array length at least %s', $type, $min), sprintf('@{%s} is %d', $varname, scalar @$value)]; } if ($max > 0 and @$value > $max) { return [sprintf('"%s" constrains array length at most %d', $type, $max), sprintf('@{%s} is %d', $varname, scalar @$value)]; } foreach my $i (0 .. $value->$#*) { my $item = $value->[$i]; next if $param->check($item); return [sprintf('"%s" constrains each value in the array with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->[%d]', $varname, $i));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 523,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "ArrayRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $param = shift(); my($min, $max) = (0, -1); $min = shift() if @_; $max = shift() if @_; my $param_compiled_check = $param->compiled_check; my $xsubname; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("ArrayRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_arrayref($_[1])" : "ref($_[1]) eq 'ARRAY'";},"library" => "Types::Standard","name" => "ArrayRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return [];},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 21}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 44}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"coercion"}{"type_constraint"} = $v->{"parameters"}[0];$v->{"parameters"}[0]{"compiled_type_constraint"} = $v->{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"};$v->{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"};$v->{"type_default"} = $v->{"parent"}{"type_default"}; \$v}->get_message($nodes)) |
17 |
1060 |
1077 |
| Ref::Util::XS::is_plain_hashref($info) or Function::Parameters::_croak('In fun _complete_value: parameter 4 ($info): ' . ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($info)) |
591 |
1880 |
2471 |
| Ref::Util::XS::is_plain_arrayref($path) or Function::Parameters::_croak('In fun _complete_value: parameter 5 ($path): ' . ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_arrayref($_[0]) or _failed_check(21, 'ArrayRef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_ArrayRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, @new) = ($_, 0);'; push @code, 'for (@$orig) {'; push @code, sprintf('++$return_orig && last unless (%s);', $coercable_item->inline_check('$_')); push @code, sprintf('push @new, (%s);', $param->coercion->inline_coercion('$_')); push @code, '}'; push @code, '$return_orig ? $orig : \\@new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my @new; foreach my $item (@$value) { return $value unless $coercable_item->check($item); push @new, $param->coerce($item); } return \@new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'ARRAY';},"constraint_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; return &Types::Standard::ArrayRef() unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'ArrayRef', \@_, 3); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to ArrayRef[`a] expected to be a type constraint; got $param"; my($min, $max) = (0, -1); $min = Types::Standard::assert_Int(shift()) if @_; $max = Types::Standard::assert_Int(shift()) if @_; my $param_compiled_check = $param->compiled_check; my $xsub; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("ArrayRef[$paramname]") if $paramname; } elsif (&Type::Tiny::_USE_MOUSE() and $param->_has_xsub and $min == 0 and $max == -1) { require Mouse::Util::TypeConstraints; my $maker = 'Mouse::Util::TypeConstraints'->can('_parameterize_ArrayRef_for'); $xsub = &$maker($param) if $maker; } return sub { my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0; } , $xsub if $min == 0 and $max == -1; return sub { my $array = shift(); return if @$array < $min; ($param->check($_) or return) foreach (@$array); return !0; } if $max == -1; return sub { my $array = shift(); return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } if $min == 0; return sub { my $array = shift(); return if @$array < $min; return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } ;},"deep_explanation" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; my($min, $max) = (0, -1); $min = $type->parameters->[1] if @{$type->parameters;} > 1; $max = $type->parameters->[2] if @{$type->parameters;} > 2; if ($min != 0 and @$value < $min) { return [sprintf('"%s" constrains array length at least %s', $type, $min), sprintf('@{%s} is %d', $varname, scalar @$value)]; } if ($max > 0 and @$value > $max) { return [sprintf('"%s" constrains array length at most %d', $type, $max), sprintf('@{%s} is %d', $varname, scalar @$value)]; } foreach my $i (0 .. $value->$#*) { my $item = $value->[$i]; next if $param->check($item); return [sprintf('"%s" constrains each value in the array with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->[%d]', $varname, $i));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 523,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "ArrayRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $param = shift(); my($min, $max) = (0, -1); $min = shift() if @_; $max = shift() if @_; my $param_compiled_check = $param->compiled_check; my $xsubname; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("ArrayRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_arrayref($_[1])" : "ref($_[1]) eq 'ARRAY'";},"library" => "Types::Standard","name" => "ArrayRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return [];},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 21}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($path)) |
0 |
141 |
141 |
|
| 535 |
43 |
| DEBUG and _debug('_complete_value', $return_type->to_string, $path, $result); |
| 536 |
41 |
▶ | if (is_Promise($result)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (is_Promise($result)) |
0 |
141 |
141 |
|
| 537 |
204 |
| my @outerargs = @_[0..4]; |
| 538 |
2 |
▶ | return $result->then(sub { _complete_value(@outerargs, $_[0]) }); |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
|
| 539 |
|
| } |
| 540 |
2 |
▶ | die $result if GraphQL::Error->is($result); |
Branch: 1 branch
| Branch | True | False | Total |
| if "GraphQL::Error"->is($result) |
141 |
0 |
141 |
|
| 541 |
2 |
▶ | if ($return_type->isa('GraphQL::Type::NonNull')) { |
Branch: 1 branch
| Branch | True | False | Total |
| if ($return_type->isa("GraphQL::Type::NonNull")) |
141 |
0 |
141 |
|
| 542 |
2 |
| my $completed = _complete_value( |
| 543 |
|
| $context, |
| 544 |
|
| $return_type->of, |
| 545 |
|
| $nodes, |
| 546 |
|
| $info, |
| 547 |
|
| $path, |
| 548 |
|
| $result, |
| 549 |
|
| ); |
| 550 |
202 |
| DEBUG and _debug('_complete_value(NonNull)', $return_type->to_string, $completed); |
| 551 |
|
| # The !is_Promise is necessary unlike in the JS because there the |
| 552 |
|
| # null-check will work fine on either a promise or a real value. |
| 553 |
|
| die GraphQL::Error->coerce( |
| 554 |
41 |
| "Cannot return null for non-nullable field @{[$info->{parent_type}->name]}.@{[$info->{field_name}]}." |
| 555 |
242 |
▶ | ) if !is_Promise($completed) and !defined $completed->{data}; |
Branch: 1 branch
| Branch | True | False | Total |
| unless is_Promise($completed) or defined $completed->{"data"} |
65 |
76 |
141 |
Condition100%3/3
is_Promise($completed) or defined $completed->{"data"}
MC/DC0%0/2
is_Promise($completed) or defined $completed->{"data"}
is_Promise($completed)
defined $completed->{"data"}
Truth table0%0/3
A or B
A= is_Promise($completed)B= defined $completed->{"data"}
|
| 556 |
1 |
| return $completed; |
| 557 |
|
| } |
| 558 |
1 |
▶ | return { data => undef } if !defined $result; |
Branch: 1 branch
| Branch | True | False | Total |
| unless defined $result |
0 |
2188 |
2188 |
|
| 559 |
201 |
| $return_type->_complete_value( |
| 560 |
|
| $context, |
| 561 |
|
| $nodes, |
| 562 |
|
| $info, |
| 563 |
|
| $path, |
| 564 |
|
| $result, |
| 565 |
|
| ); |
| 566 |
15 |
▶ | } |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 567 |
|
| |
| 568 |
141 |
▶ | fun _located_error( |
|
Subroutine
_located_error: called CC=6 SCAR=18.7
|
| 569 |
|
| Any $error, |
| 570 |
|
| ArrayRef[HashRef] $nodes, |
| 571 |
|
| ArrayRef $path, |
| 572 |
8 |
▶ | ) { |
Branch: 4 branches
| Branch | True | False | Total |
| @_ < 3 and Function::Parameters::_croak('Too few arguments for fun _located_error (expected 3, got ' . @_ . ')') |
0 |
2188 |
2188 |
| @_ > 3 and Function::Parameters::_croak('Too many arguments for fun _located_error (expected 3, got ' . @_ . ')') |
0 |
2188 |
2188 |
| Type::Tiny::XS::AUTO::TC1($nodes) or Function::Parameters::_croak('In fun _located_error: parameter 2 ($nodes): ' . ${my $v = bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 92,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "ArrayRef[HashRef]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}';},"name" => "__ANON__","parameters" => [bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' )],"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_arrayref($_[0]) or _failed_check(21, 'ArrayRef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_ArrayRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, @new) = ($_, 0);'; push @code, 'for (@$orig) {'; push @code, sprintf('++$return_orig && last unless (%s);', $coercable_item->inline_check('$_')); push @code, sprintf('push @new, (%s);', $param->coercion->inline_coercion('$_')); push @code, '}'; push @code, '$return_orig ? $orig : \\@new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my @new; foreach my $item (@$value) { return $value unless $coercable_item->check($item); push @new, $param->coerce($item); } return \@new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'ARRAY';},"constraint_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; return &Types::Standard::ArrayRef() unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'ArrayRef', \@_, 3); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to ArrayRef[`a] expected to be a type constraint; got $param"; my($min, $max) = (0, -1); $min = Types::Standard::assert_Int(shift()) if @_; $max = Types::Standard::assert_Int(shift()) if @_; my $param_compiled_check = $param->compiled_check; my $xsub; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("ArrayRef[$paramname]") if $paramname; } elsif (&Type::Tiny::_USE_MOUSE() and $param->_has_xsub and $min == 0 and $max == -1) { require Mouse::Util::TypeConstraints; my $maker = 'Mouse::Util::TypeConstraints'->can('_parameterize_ArrayRef_for'); $xsub = &$maker($param) if $maker; } return sub { my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0; } , $xsub if $min == 0 and $max == -1; return sub { my $array = shift(); return if @$array < $min; ($param->check($_) or return) foreach (@$array); return !0; } if $max == -1; return sub { my $array = shift(); return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } if $min == 0; return sub { my $array = shift(); return if @$array < $min; return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } ;},"deep_explanation" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; my($min, $max) = (0, -1); $min = $type->parameters->[1] if @{$type->parameters;} > 1; $max = $type->parameters->[2] if @{$type->parameters;} > 2; if ($min != 0 and @$value < $min) { return [sprintf('"%s" constrains array length at least %s', $type, $min), sprintf('@{%s} is %d', $varname, scalar @$value)]; } if ($max > 0 and @$value > $max) { return [sprintf('"%s" constrains array length at most %d', $type, $max), sprintf('@{%s} is %d', $varname, scalar @$value)]; } foreach my $i (0 .. $value->$#*) { my $item = $value->[$i]; next if $param->check($item); return [sprintf('"%s" constrains each value in the array with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->[%d]', $varname, $i));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 523,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "ArrayRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $param = shift(); my($min, $max) = (0, -1); $min = shift() if @_; $max = shift() if @_; my $param_compiled_check = $param->compiled_check; my $xsubname; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("ArrayRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_arrayref($_[1])" : "ref($_[1]) eq 'ARRAY'";},"library" => "Types::Standard","name" => "ArrayRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return [];},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 21}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 44}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"coercion"}{"type_constraint"} = $v->{"parameters"}[0];$v->{"parameters"}[0]{"compiled_type_constraint"} = $v->{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"};$v->{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"};$v->{"type_default"} = $v->{"parent"}{"type_default"}; \$v}->get_message($nodes)) |
2188 |
0 |
2188 |
| Ref::Util::XS::is_plain_arrayref($path) or Function::Parameters::_croak('In fun _located_error: parameter 3 ($path): ' . ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_plain_arrayref($_[0]) or _failed_check(21, 'ArrayRef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_ArrayRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, @new) = ($_, 0);'; push @code, 'for (@$orig) {'; push @code, sprintf('++$return_orig && last unless (%s);', $coercable_item->inline_check('$_')); push @code, sprintf('push @new, (%s);', $param->coercion->inline_coercion('$_')); push @code, '}'; push @code, '$return_orig ? $orig : \\@new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my @new; foreach my $item (@$value) { return $value unless $coercable_item->check($item); push @new, $param->coerce($item); } return \@new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'ARRAY';},"constraint_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; return &Types::Standard::ArrayRef() unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'ArrayRef', \@_, 3); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to ArrayRef[`a] expected to be a type constraint; got $param"; my($min, $max) = (0, -1); $min = Types::Standard::assert_Int(shift()) if @_; $max = Types::Standard::assert_Int(shift()) if @_; my $param_compiled_check = $param->compiled_check; my $xsub; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("ArrayRef[$paramname]") if $paramname; } elsif (&Type::Tiny::_USE_MOUSE() and $param->_has_xsub and $min == 0 and $max == -1) { require Mouse::Util::TypeConstraints; my $maker = 'Mouse::Util::TypeConstraints'->can('_parameterize_ArrayRef_for'); $xsub = &$maker($param) if $maker; } return sub { my $array = shift(); ($param->check($_) or return) foreach (@$array); return !0; } , $xsub if $min == 0 and $max == -1; return sub { my $array = shift(); return if @$array < $min; ($param->check($_) or return) foreach (@$array); return !0; } if $max == -1; return sub { my $array = shift(); return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } if $min == 0; return sub { my $array = shift(); return if @$array < $min; return if @$array > $max; ($param->check($_) or return) foreach (@$array); return !0; } ;},"deep_explanation" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; my($min, $max) = (0, -1); $min = $type->parameters->[1] if @{$type->parameters;} > 1; $max = $type->parameters->[2] if @{$type->parameters;} > 2; if ($min != 0 and @$value < $min) { return [sprintf('"%s" constrains array length at least %s', $type, $min), sprintf('@{%s} is %d', $varname, scalar @$value)]; } if ($max > 0 and @$value > $max) { return [sprintf('"%s" constrains array length at most %d', $type, $max), sprintf('@{%s} is %d', $varname, scalar @$value)]; } foreach my $i (0 .. $value->$#*) { my $item = $value->[$i]; next if $param->check($item); return [sprintf('"%s" constrains each value in the array with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->[%d]', $varname, $i));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 523,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "ArrayRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::ArrayRef; no warnings; use strict; my $param = shift(); my($min, $max) = (0, -1); $min = shift() if @_; $max = shift() if @_; my $param_compiled_check = $param->compiled_check; my $xsubname; if ($min == 0 and $max == -1) { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("ArrayRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::ArrayRef()->inline_check($v); if ($min != 0) { $p .= sprintf(' and @{%s} >= %d', $v, $min); } if ($max > 0) { $p .= sprintf(' and @{%s} <= %d', $v, $max); } my $param_check = $param->inline_check('$i'); return $p if $param->{'uniq'} eq &Types::Standard::Any()->{'uniq'}; "$p and do { " . 'my $ok = 1; ' . "for my \$i (\@{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_arrayref($_[1])" : "ref($_[1]) eq 'ARRAY'";},"library" => "Types::Standard","name" => "ArrayRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return [];},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 21}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($path)) |
2188 |
0 |
2188 |
|
| 573 |
199 |
| DEBUG and _debug('_located_error', $error); |
| 574 |
2 |
| $error = GraphQL::Error->coerce($error); |
| 575 |
197 |
▶ | return $error if $error->locations; |
Branch: 1 branch
| Branch | True | False | Total |
| if $error->locations |
2188 |
0 |
2188 |
|
| 576 |
|
| GraphQL::Error->coerce($error)->but( |
| 577 |
197 |
| locations => [ map $_->{location}, @$nodes ], |
| 578 |
|
| path => $path, |
| 579 |
|
| ); |
| 580 |
|
| } |
| 581 |
|
| |
| 582 |
2188 |
▶ | fun _get_argument_values( |
|
Subroutine
_get_argument_values: called CC=36 SCAR=36.2
|
| 583 |
|
| (HashRef | InstanceOf['GraphQL::Directive']) $def, |
| 584 |
|
| HashRef $node, |
| 585 |
|
| Maybe[HashRef] $variable_values = {}, |
| 586 |
197 |
▶ | ) { |
Branch: 6 branches
| Branch | True | False | Total |
| @_ < 2 and Function::Parameters::_croak('Too few arguments for fun _get_argument_values (expected 2, got ' . @_ . ')') |
1982 |
206 |
2188 |
| @_ > 3 and Function::Parameters::_croak('Too many arguments for fun _get_argument_values (expected 3, got ' . @_ . ')') |
2 |
204 |
206 |
| @_ < 3 and $variable_values = {} |
2 |
202 |
204 |
| Type::Tiny::XS::AUTO::TC31($def) or Function::Parameters::_croak('In fun _get_argument_values: parameter 1 ($def): ' . ${my $v = bless( {"compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Execution.pm","line" => 583,"package" => "GraphQL::Execution"},"deprecated" => !!0,"name" => "__ANON__","type_constraints" => [bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' ),bless( {"class" => "GraphQL::Directive","coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 985,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "InstanceOf[\"GraphQL::Directive\"]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","name" => "__ANON__","type_constraints" => [bless( {"class" => "Moo::Object","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; Ref::Util::XS::is_blessed_ref($_[0]) or _failed_check(24, 'Object', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Object","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; builtin::blessed($_);},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 578,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Object","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_blessed_ref($_[1])" : &$maybe_load_modules('Scalar::Util', "Scalar::Util::blessed($_[1])");},"is_object" => 1,"library" => "Types::Standard","name" => "Object","parent" => {},"uniq" => 24}, 'Type::Tiny' ),"uniq" => 168}, 'Type::Tiny::Class' ),bless( {"class" => "GraphQL::MaybeTypeCheck","compiled_type_constraint" => sub ;,"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Return/Type.pm","line" => 54,"package" => "Return::Type"},"deprecated" => !!0,"inlined" => sub { package Type::Tiny::Class; use warnings; use strict; my $var = $_[1]; return "do { use Scalar::Util (); Scalar::Util::blessed($var) and $var->isa(q[$class]) }" if $Type::Tiny::AvoidCallbacks; return "$xsub($var)" if $xsub; "Scalar::Util::blessed($var) and $var->isa(q[$class])";},"name" => "__ANON__","uniq" => 169}, 'Type::Tiny::Class' )],"uniq" => 170,"xs_sub" => "Type::Tiny::XS::AUTO::TC12"}, 'Type::Tiny::Intersection' ),"uniq" => 144}, 'Type::Tiny::Class' )],"uniq" => 155,"xs_sub" => "Type::Tiny::XS::AUTO::TC31"}, 'Type::Tiny::Union' );$v->{"type_constraints"}[0]{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0];$v->{"type_constraints"}[0]{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0]{"parent"};$v->{"type_constraints"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"type_constraints"}[0]{"parent"}{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"type_constraints"}[1]{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[1];$v->{"type_constraints"}[1]{"compiled_type_constraint"} = $v->{"type_constraints"}[1]{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[1]{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[1]{"parent"}{"type_constraints"}[0]{"parent"};$v->{"type_constraints"}[1]{"parent"}{"type_constraints"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"type_constraints"}[1]{"parent"}{"type_constraints"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[1]{"parent"}{"type_constraints"}[0]{"parent"}{"parent"} = $v->{"type_constraints"}[0]{"parent"}; \$v}->get_message($def)) |
1 |
201 |
202 |
| Ref::Util::XS::is_plain_hashref($node) or Function::Parameters::_croak('In fun _get_argument_values: parameter 2 ($node): ' . ${my $v = bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($node)) |
2 |
199 |
201 |
| Type::Tiny::XS::AUTO::TC2($variable_values) or Function::Parameters::_croak('In fun _get_argument_values: parameter 3 ($variable_values): ' . ${my $v = bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; my $value = shift(); return !0 unless defined $value; return $param->check($value);},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 338,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "Maybe[HashRef]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $param_check = $param->inline_check($v); "!defined($v) or $param_check";},"name" => "__ANON__","parameters" => [bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' )],"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Maybe","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; return $param->coercion;},"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Maybe') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Maybe', \@_, 1); my $param = Types::TypeTiny::to_TypeTiny(shift()); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to Maybe[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my @xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); push @xsub, Type::Tiny::XS::get_coderef_for("Maybe[$paramname]") if $paramname }; return sub { my $value = shift(); return !0 unless defined $value; return $param->check($value); } , @xsub;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return [sprintf('%s is defined', Type::Tiny::_dd($value)), sprintf('"%s" constrains the value with "%s" if it is defined', $type, $param), @{$param->validate_explain($value, $varname);}];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 657,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Maybe","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $param = shift(); my $param_compiled_check = $param->compiled_check; my $xsubname; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("Maybe[$paramname]") }; return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $param_check = $param->inline_check($v); "!defined($v) or $param_check"; } ;},"library" => "Types::Standard","name" => "Maybe","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; $_[0]->type_default or $Type::Tiny::parameterize_type->type_default;},"uniq" => 25}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 69}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"coercion"}{"type_constraint"} = $v->{"parameters"}[0];$v->{"parameters"}[0]{"compiled_type_constraint"} = $v->{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"};$v->{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"type_default"} = $v->{"parameters"}[0]{"type_default"}; \$v}->get_message($variable_values)) |
2 |
197 |
199 |
|
| 587 |
49 |
| my $arg_defs = $def->{args}; |
| 588 |
49 |
| my $arg_nodes = $node->{arguments}; |
| 589 |
40 |
| DEBUG and _debug("_get_argument_values", $arg_defs, $arg_nodes, $variable_values, eval { $JSON->encode($node) }); |
| 590 |
40 |
▶ | return {} if !$arg_defs; |
Branch: 1 branch
| Branch | True | False | Total |
| unless $arg_defs |
0 |
197 |
197 |
|
| 591 |
142 |
▶ | my @bad = grep { !exists $arg_nodes->{$_} and !defined $arg_defs->{$_}{default_value} and $arg_defs->{$_}{type}->isa('GraphQL::Type::NonNull') } keys %$arg_defs; |
Condition83%5/6
!(exists $arg_nodes->{$_} || defined $arg_defs->{$_}{'default_value'}) && $arg_defs->{$_}{'type'}->isa('GraphQL::Type::NonNull')
exists $arg_nodes->{$_} || defined $arg_defs->{$_}{'default_value'}
MC/DC0%0/3
!(exists $arg_nodes->{$_} || defined $arg_defs->{$_}{'default_value'}) && $arg_defs->{$_}{'type'}->isa('GraphQL::Type::NonNull')
exists $arg_nodes->{$_}
defined $arg_defs->{$_}{'default_value'}
$arg_defs->{$_}{'type'}->isa('GraphQL::Type::NonNull')
Truth table0%0/4
not(A || B) && C
A= exists $arg_nodes->{$_}B= defined $arg_defs->{$_}{'default_value'}C= $arg_defs->{$_}{'type'}->isa('GraphQL::Type::NonNull')
| A | B | C | result |
| 1 | X | X | 0 |
| 0 | 1 | X | 0 |
| 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 |
|
| 592 |
142 |
▶ | die GraphQL::Error->new( |
Branch: 1 branch
| Branch | True | False | Total |
| if @bad |
49 |
182 |
231 |
|
| 593 |
|
| message => "Argument '$bad[0]' of type ". |
| 594 |
142 |
| "'@{[$arg_defs->{$bad[0]}{type}->to_string]}' not given.", |
| 595 |
|
| nodes => [ $node ], |
| 596 |
|
| ) if @bad; |
| 597 |
|
| @bad = grep { |
| 598 |
142 |
| ref($arg_nodes->{$_}) eq 'SCALAR' and |
| 599 |
142 |
| $variable_values->{${$arg_nodes->{$_}}} and |
| 600 |
2 |
| !_type_will_accept($arg_defs->{$_}{type}, $variable_values->{${$arg_nodes->{$_}}}{type}) |
| 601 |
142 |
▶ | } keys %$arg_defs; |
Condition83%5/6
ref $arg_nodes->{$_} eq 'SCALAR' && $$variable_values{${$arg_nodes->{$_};}} && !_type_will_accept($arg_defs->{$_}{'type'}, $$variable_values{${$arg_nodes->{$_};}}{'type'})
ref $arg_nodes->{$_} eq "SCALAR" and $$variable_values{${$arg_nodes->{$_};}}
MC/DC0%0/3
ref $arg_nodes->{$_} eq 'SCALAR' && $$variable_values{${$arg_nodes->{$_};}} && !_type_will_accept($arg_defs->{$_}{'type'}, $$variable_values{${$arg_nodes->{$_};}}{'type'})
ref $arg_nodes->{$_} eq "SCALAR"
$$variable_values{${$arg_nodes->{$_};}}
!_type_will_accept($arg_defs->{$_}{'type'}, $$variable_values{${$arg_nodes->{$_};}}{'type'})
Truth table0%0/4
A and B && not(C)
A= ref $arg_nodes->{$_} eq "SCALAR"B= $$variable_values{${$arg_nodes->{$_};}}C= !_type_will_accept($arg_defs->{$_}{'type'}, $$variable_values{${$arg_nodes->{$_};}}{'type'})
| A | B | C | result |
| 0 | X | X | 0 |
| 1 | 0 | X | 0 |
| 1 | 1 | 0 | 0 |
| 1 | 1 | 1 | 1 |
|
| 602 |
2 |
▶ | die GraphQL::Error->new( |
Branch: 1 branch
| Branch | True | False | Total |
| if @bad |
40 |
142 |
182 |
|
| 603 |
2 |
| message => "Variable '\$${$arg_nodes->{$bad[0]}}' of type '@{[$variable_values->{${$arg_nodes->{$bad[0]}}}{type}->to_string]}'". |
| 604 |
195 |
| " where expected '@{[$arg_defs->{$bad[0]}{type}->to_string]}'.", |
| 605 |
|
| nodes => [ $node ], |
| 606 |
|
| ) if @bad; |
| 607 |
|
| my @novar = grep { |
| 608 |
39 |
| ref($arg_nodes->{$_}) eq 'SCALAR' and |
| 609 |
39 |
| (!$variable_values or !exists $variable_values->{${$arg_nodes->{$_}}}) and |
| 610 |
|
| !defined $arg_defs->{$_}{default_value} and |
| 611 |
39 |
▶ | $arg_defs->{$_}{type}->isa('GraphQL::Type::NonNull') |
Condition91%11/12
ref $arg_nodes->{$_} eq 'SCALAR' && !($variable_values && exists $$variable_values{${$arg_nodes->{$_};}}) && !defined($arg_defs->{$_}{'default_value'}) && $arg_defs->{$_}{'type'}->isa('GraphQL::Type::NonNull')
ref $arg_nodes->{$_} eq "SCALAR" and not $variable_values && exists $$variable_values{${$arg_nodes->{$_};}} and not defined $arg_defs->{$_}{"default_value"}
ref $arg_nodes->{$_} eq "SCALAR" and not $variable_values && exists $$variable_values{${$arg_nodes->{$_};}}
$variable_values && exists $$variable_values{${$arg_nodes->{$_};}}
MC/DC0%0/5
ref $arg_nodes->{$_} eq 'SCALAR' && !($variable_values && exists $$variable_values{${$arg_nodes->{$_};}}) && !defined($arg_defs->{$_}{'default_value'}) && $arg_defs->{$_}{'type'}->isa('GraphQL::Type::NonNull')
ref $arg_nodes->{$_} eq "SCALAR"
$variable_values
exists $$variable_values{${$arg_nodes->{$_};}}
not defined $arg_defs->{$_}{"default_value"}
$arg_defs->{$_}{'type'}->isa('GraphQL::Type::NonNull')
Truth table0%0/8
A and not(B && C) and not(D) && E
A= ref $arg_nodes->{$_} eq "SCALAR"B= $variable_valuesC= exists $$variable_values{${$arg_nodes->{$_};}}D= not defined $arg_defs->{$_}{"default_value"}E= $arg_defs->{$_}{'type'}->isa('GraphQL::Type::NonNull')
| A | B | C | D | E | result |
| 0 | X | X | X | X | 0 |
| 1 | 1 | 1 | X | X | 0 |
| 1 | 0 | X | 0 | X | 0 |
| 1 | 1 | 0 | 0 | X | 0 |
| 1 | 0 | X | 1 | 0 | 0 |
| 1 | 1 | 0 | 1 | 0 | 0 |
| 1 | 0 | X | 1 | 1 | 1 |
| 1 | 1 | 0 | 1 | 1 | 1 |
|
| 612 |
|
| } keys %$arg_defs; |
| 613 |
39 |
▶ | die GraphQL::Error->new( |
Branch: 1 branch
| Branch | True | False | Total |
| if @novar |
9 |
40 |
49 |
|
| 614 |
|
| message => "Argument '$novar[0]' of type ". |
| 615 |
39 |
| "'@{[$arg_defs->{$novar[0]}{type}->to_string]}'". |
| 616 |
39 |
| " was given variable '\$${$arg_nodes->{$novar[0]}}' but no runtime value.", |
| 617 |
|
| nodes => [ $node ], |
| 618 |
|
| ) if @novar; |
| 619 |
|
| my @enumfail = grep { |
| 620 |
39 |
| ref($arg_nodes->{$_}) eq 'REF' and |
| 621 |
11 |
▶ | ref(${$arg_nodes->{$_}}) eq 'SCALAR' and |
Condition66%2/3
$arg_defs->{$_}{'type'}->isa('GraphQL::Type::NonNull') && $arg_defs->{$_}{'type'}->of->isa('GraphQL::Type::Enum')
MC/DC0%0/2
$arg_defs->{$_}{'type'}->isa('GraphQL::Type::NonNull') && $arg_defs->{$_}{'type'}->of->isa('GraphQL::Type::Enum')
$arg_defs->{$_}{'type'}->isa('GraphQL::Type::NonNull')
$arg_defs->{$_}{'type'}->of->isa('GraphQL::Type::Enum')
Truth table33%1/3
A && B
A= $arg_defs->{$_}{'type'}->isa('GraphQL::Type::NonNull')B= $arg_defs->{$_}{'type'}->of->isa('GraphQL::Type::Enum')
|
| 622 |
|
| !$arg_defs->{$_}{type}->isa('GraphQL::Type::Enum') and |
| 623 |
12 |
▶ | !($arg_defs->{$_}{type}->isa('GraphQL::Type::NonNull') and $arg_defs->{$_}{type}->of->isa('GraphQL::Type::Enum')) |
Condition88%8/9
ref $arg_nodes->{$_} eq 'REF' && ref ${$arg_nodes->{$_};} eq 'SCALAR' && !$arg_defs->{$_}{'type'}->isa('GraphQL::Type::Enum') && !($arg_defs->{$_}{'type'}->isa('GraphQL::Type::NonNull') && $arg_defs->{$_}{'type'}->of->isa('GraphQL::Type::Enum'))
ref $arg_nodes->{$_} eq "REF" and ref ${$arg_nodes->{$_};} eq "SCALAR" and not $arg_defs->{$_}{"type"}->isa("GraphQL::Type::Enum")
ref $arg_nodes->{$_} eq "REF" and ref ${$arg_nodes->{$_};} eq "SCALAR"
MC/DC0%0/4
ref $arg_nodes->{$_} eq 'REF' && ref ${$arg_nodes->{$_};} eq 'SCALAR' && !$arg_defs->{$_}{'type'}->isa('GraphQL::Type::Enum') && !($arg_defs->{$_}{'type'}->isa('GraphQL::Type::NonNull') && $arg_defs->{$_}{'type'}->of->isa('GraphQL::Type::Enum'))
ref $arg_nodes->{$_} eq "REF"
ref ${$arg_nodes->{$_};} eq "SCALAR"
not $arg_defs->{$_}{"type"}->isa("GraphQL::Type::Enum")
!($arg_defs->{$_}{'type'}->isa('GraphQL::Type::NonNull') && $arg_defs->{$_}{'type'}->of->isa('GraphQL::Type::Enum'))
Truth table20%1/5
A and B and not(C) && not(D)
A= ref $arg_nodes->{$_} eq "REF"B= ref ${$arg_nodes->{$_};} eq "SCALAR"C= not $arg_defs->{$_}{"type"}->isa("GraphQL::Type::Enum")D= !($arg_defs->{$_}{'type'}->isa('GraphQL::Type::NonNull') && $arg_defs->{$_}{'type'}->of->isa('GraphQL::Type::Enum'))
| A | B | C | D | result |
| 0 | X | X | X | 0 |
| 1 | 0 | X | X | 0 |
| 1 | 1 | 0 | X | 0 |
| 1 | 1 | 1 | 0 | 0 |
| 1 | 1 | 1 | 1 | 1 |
|
| 624 |
|
| } keys %$arg_defs; |
| 625 |
39 |
▶ | die GraphQL::Error->new( |
Branch: 1 branch
| Branch | True | False | Total |
| if @enumfail |
0 |
142 |
142 |
|
| 626 |
|
| message => "Argument '$enumfail[0]' of type ". |
| 627 |
167 |
| "'@{[$arg_defs->{$enumfail[0]}{type}->to_string]}'". |
| 628 |
167 |
| " was given ${${$arg_nodes->{$enumfail[0]}}} which is enum value.", |
| 629 |
|
| nodes => [ $node ], |
| 630 |
|
| ) if @enumfail; |
| 631 |
|
| my @enumstring = grep { |
| 632 |
|
| defined($arg_nodes->{$_}) and |
| 633 |
167 |
▶ | !ref($arg_nodes->{$_}) |
Condition66%2/3
defined $arg_nodes->{$_} && !ref($arg_nodes->{$_})
MC/DC50%1/2
defined $arg_nodes->{$_} && !ref($arg_nodes->{$_})
defined $arg_nodes->{$_}
!ref($arg_nodes->{$_})
Truth table66%2/3
A && not(B)
A= defined $arg_nodes->{$_}B= !ref($arg_nodes->{$_})
|
| 634 |
167 |
| } grep $arg_defs->{$_}{type}->isa('GraphQL::Type::Enum'), keys %$arg_defs; |
| 635 |
167 |
▶ | die GraphQL::Error->new( |
Branch: 1 branch
| Branch | True | False | Total |
| if @enumstring |
2 |
140 |
142 |
|
| 636 |
|
| message => "Argument '$enumstring[0]' of type ". |
| 637 |
167 |
| "'@{[$arg_defs->{$enumstring[0]}{type}->to_string]}'". |
| 638 |
|
| " was given '$arg_nodes->{$enumstring[0]}' which is not enum value.", |
| 639 |
|
| nodes => [ $node ], |
| 640 |
|
| ) if @enumstring; |
| 641 |
167 |
▶ | return {} if !$arg_nodes; |
Branch: 1 branch
| Branch | True | False | Total |
| unless $arg_nodes |
0 |
39 |
39 |
|
| 642 |
2 |
| my %coerced_values; |
| 643 |
7 |
| for my $name (keys %$arg_defs) { |
| 644 |
4 |
| my $arg_def = $arg_defs->{$name}; |
| 645 |
7 |
| my $arg_type = $arg_def->{type}; |
| 646 |
17 |
| my $argument_node = $arg_nodes->{$name}; |
| 647 |
147 |
| my $default_value = $arg_def->{default_value}; |
| 648 |
41 |
| DEBUG and _debug("_get_argument_values($name)", $arg_def, $arg_type, $argument_node, $default_value); |
| 649 |
41 |
▶ | if (!exists $arg_nodes->{$name}) { |
Branch: 2 branches
| Branch | True | False | Total |
| if (not exists $arg_nodes->{$name}) { } |
0 |
39 |
39 |
| elsif (ref $argument_node eq 'SCALAR') { } |
0 |
39 |
39 |
|
| 650 |
|
| # none given - apply type arg's default if any. already validated perl |
| 651 |
41 |
▶ | $coerced_values{$name} = $default_value if exists $arg_def->{default_value}; |
Branch: 1 branch
| Branch | True | False | Total |
| if exists $arg_def->{"default_value"} |
4 |
35 |
39 |
|
| 652 |
41 |
| next; |
| 653 |
|
| } elsif (ref($argument_node) eq 'SCALAR') { |
| 654 |
|
| # scalar ref means it's a variable. already validated perl |
| 655 |
|
| $coerced_values{$name} = |
| 656 |
|
| ($variable_values && $variable_values->{$$argument_node} && $variable_values->{$$argument_node}{value}) |
| 657 |
742 |
▶ | // $default_value; |
Condition66%6/9
$variable_values && $$variable_values{$$argument_node} && $$variable_values{$$argument_node}{"value"} // $default_value
$variable_values and $$variable_values{$$argument_node} and $$variable_values{$$argument_node}{"value"}
$variable_values and $$variable_values{$$argument_node}
MC/DC0%0/4
$variable_values && $$variable_values{$$argument_node} && $$variable_values{$$argument_node}{"value"} // $default_value
$variable_values
$$variable_values{$$argument_node}
$$variable_values{$$argument_node}{"value"}
$default_value
Truth table0%0/7
A and B and C // D
A= $variable_valuesB= $$variable_values{$$argument_node}C= $$variable_values{$$argument_node}{"value"}D= $default_value
| A | B | C | D | result |
| 1 | 1 | 1 | X | 1 |
| 0 | X | X | 1 | 1 |
| 1 | 0 | X | 1 | 1 |
| 1 | 1 | 0 | 1 | 1 |
| 0 | X | X | 0 | 0 |
| 1 | 0 | X | 0 | 0 |
| 1 | 1 | 0 | 0 | 0 |
|
| 658 |
742 |
| next; |
| 659 |
|
| } else { |
| 660 |
|
| # query literal or variable. JSON land, needs convert/validate |
| 661 |
742 |
| $coerced_values{$name} = _coerce_value( |
| 662 |
|
| $argument_node, $variable_values, $default_value |
| 663 |
|
| ); |
| 664 |
|
| } |
| 665 |
742 |
▶ | next if !exists $coerced_values{$name}; |
Branch: 1 branch
| Branch | True | False | Total |
| unless exists $coerced_values{$name} |
6 |
29 |
35 |
|
| 666 |
742 |
| DEBUG and _debug("_get_argument_values($name after initial)", $arg_def, $arg_type, $argument_node, $default_value, eval { $JSON->encode(\%coerced_values) }); |
| 667 |
742 |
| eval { $coerced_values{$name} = $arg_type->graphql_to_perl($coerced_values{$name}) }; |
| 668 |
742 |
| DEBUG and do { local $@; _debug("_get_argument_values($name after coerce)", eval { $JSON->encode(\%coerced_values) }) }; |
| 669 |
742 |
▶ | if ($@) { |
Branch: 1 branch
| Branch | True | False | Total |
| if ($@) |
0 |
167 |
167 |
|
| 670 |
742 |
| my $error = $@; |
| 671 |
742 |
| $error =~ s#\s+at.*line\s+\d+\.#.#; |
| 672 |
|
| # JSON can't encode scalar references |
| 673 |
742 |
| my $jsonable = _coerce_for_error($coerced_values{$name}); |
| 674 |
169 |
| die GraphQL::Error->new( |
| 675 |
|
| message => "Argument '$name' got invalid value" |
| 676 |
169 |
| . " @{[$JSON->encode($jsonable)]}.\nExpected '" |
| 677 |
|
| . $arg_type->to_string . "'.\n$error", |
| 678 |
|
| nodes => [ $node ], |
| 679 |
|
| ); |
| 680 |
|
| } |
| 681 |
|
| } |
| 682 |
573 |
| \%coerced_values; |
| 683 |
|
| } |
| 684 |
|
| |
| 685 |
3 |
▶ | fun _coerce_for_error(Any $value) { |
|
Subroutine
_coerce_for_error: called CC=6 SCAR=18.0
Branch: 2 branches
| Branch | True | False | Total |
| @_ < 1 and Function::Parameters::_croak('Too few arguments for fun _coerce_for_error (expected 1, got ' . @_ . ')') |
0 |
167 |
167 |
| @_ > 1 and Function::Parameters::_croak('Too many arguments for fun _coerce_for_error (expected 1, got ' . @_ . ')') |
167 |
0 |
167 |
|
| 686 |
15 |
| my $ref = ref $value; |
| 687 |
|
| my $ret = 'SCALAR' eq $ref ? $$value |
| 688 |
15 |
▶ | : 'ARRAY' eq $ref ? [ map { _coerce_for_error($_) } @$value ] |
Branch: 1 branch
| Branch | True | False | Total |
| 'HASH' eq $ref ? : |
4 |
154 |
158 |
|
| 689 |
15 |
▶ | : 'HASH' eq $ref ? { map { $_ => _coerce_for_error($value->{$_}) } keys %$value } |
Branch: 2 branches
| Branch | True | False | Total |
| 'SCALAR' eq $ref ? : |
2 |
165 |
167 |
| 'ARRAY' eq $ref ? : |
7 |
158 |
165 |
|
| 690 |
|
| : $value |
| 691 |
|
| ; |
| 692 |
15 |
| return $ret; |
| 693 |
|
| } |
| 694 |
|
| |
| 695 |
167 |
▶ | fun _coerce_value( |
|
Subroutine
_coerce_value: called CC=11 SCAR=25.4
|
| 696 |
|
| Any $argument_node, |
| 697 |
|
| Maybe[HashRef] $variable_values, |
| 698 |
|
| Any $default_value, |
| 699 |
15 |
▶ | ) { |
Branch: 3 branches
| Branch | True | False | Total |
| @_ < 3 and Function::Parameters::_croak('Too few arguments for fun _coerce_value (expected 3, got ' . @_ . ')') |
7 |
147 |
154 |
| @_ > 3 and Function::Parameters::_croak('Too many arguments for fun _coerce_value (expected 3, got ' . @_ . ')') |
0 |
41 |
41 |
| Type::Tiny::XS::AUTO::TC2($variable_values) or Function::Parameters::_croak('In fun _coerce_value: parameter 2 ($variable_values): ' . ${my $v = bless( {"_build_coercion" => sub { package Type::Tiny; use warnings; use strict; my $coercion = shift(); my $built = $self->coercion_generator->($self, $P, @args); $coercion->add_type_coercions(@{$built->type_coercion_map;}) if $built; $coercion->freeze;},"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; my $value = shift(); return !0 unless defined $value; return $param->check($value);},"definition_context" => {"file" => "/home/cpancover/.cpan/build/GraphQL-0.54-0/blib/lib/GraphQL/Type/Library.pm","line" => 338,"package" => "GraphQL::Type::Library"},"deprecated" => !!0,"display_name" => "Maybe[HashRef]","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $param_check = $param->inline_check($v); "!defined($v) or $param_check";},"name" => "__ANON__","parameters" => [bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_HashRef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; my $coercable_item = $param->coercion->_source_type_union; my $C = 'Type::Coercion'->new('type_constraint', $child); if ($param->coercion->can_be_inlined and $coercable_item->can_be_inlined) { $C->add_type_coercions($parent, &Types::Standard::Stringable(sub { my @code; push @code, 'do { my ($orig, $return_orig, %new) = ($_, 0);'; push @code, 'for (keys %$orig) {'; push @code, sprintf('$return_orig++ && last unless (%s);', $coercable_item->inline_check('$orig->{$_}')); push @code, sprintf('$new{$_} = (%s);', $param->coercion->inline_coercion('$orig->{$_}')); push @code, '}'; push @code, '$return_orig ? $orig : \\%new'; push @code, '}'; join $", @code; } )); } else { $C->add_type_coercions($parent, sub { my $value = @_ ? $_[0] : $_; my %new; foreach my $k (keys %$value) { return $value unless $coercable_item->check($value->{$k}); $new{$k} = $param->coerce($value->{$k}); } return \%new; } ); } return $C;},"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_ eq 'HASH';},"constraint_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; return &Types::Standard::HashRef() unless @_; require Error::TypeTiny::WrongNumberOfParameters; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'HashRef', \@_, 1); my $param = shift(); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to HashRef[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my $xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsub = Type::Tiny::XS::get_coderef_for("HashRef[$paramname]") if $paramname }; return sub { my $hash = shift(); ($param->check($_) or return) foreach (values %$hash); return !0; } , $xsub;},"deep_explanation" => sub { package Types::Standard::HashRef; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; foreach my $k (sort keys %$value) { my $item = $value->{$k}; next if $param->check($item); return [sprintf('"%s" constrains each value in the hash with "%s"', $type, $param), @{$param->validate_explain($item, sprintf('%s->{%s}', $varname, B::perlstring($k)));}]; } return;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 544,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "HashRef","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard::HashRef; no warnings; use strict; my $param = shift(); my $compiled = $param->compiled_check; my $xsubname; unless ($Type::Tiny::AvoidCallbacks) { my $paramname = Type::Tiny::XS::is_known($compiled); $xsubname = Type::Tiny::XS::get_subname_for("HashRef[$paramname]"); } return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $p = &Types::Standard::HashRef()->inline_check($v); my $param_check = $param->inline_check('$i'); "$p and do { " . 'my $ok = 1; ' . "for my \$i (values %{$v}) { " . "(\$ok = 0, last) unless $param_check " . '}; ' . '$ok ' . '}'; } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; !$Type::Tiny::AvoidCallbacks ? "Ref::Util::XS::is_plain_hashref($_[1])" : "ref($_[1]) eq 'HASH'";},"library" => "Types::Standard","my_methods" => {"hashref_allows_key" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); Types::Standard::is_Str($_[0]);},"hashref_allows_value" => sub { package Types::Standard::HashRef; no warnings; use strict; my $self = shift(); my($key, $value) = @_; return !1 unless $self->my_hashref_allows_key($key); return !0 if $self == &Types::Standard::HashRef(); my $href = $self->find_parent(sub { $_->has_parent and $_->parent == &Types::Standard::HashRef(); } ); my $param = $href->type_parameter; Types::Standard::is_Str($key) and $param->check($value);}},"name" => "HashRef","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; not ref $_[0] and _failed_check(16, 'Ref', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Ref","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Types::Standard; no warnings; use strict; ref $_;},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Ref') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Ref', \@_, 1); my $reftype = shift(); $reftype =~ /^(SCALAR|ARRAY|HASH|CODE|REF|GLOB|LVALUE|FORMAT|IO|VSTRING|REGEXP|Regexp)$/i or _croak "Parameter to Ref[`a] expected to be a Perl ref type; got $reftype"; $reftype = "$reftype"; return sub { ref $_[0] and builtin::reftype($_[0]) eq $reftype; } ;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; require B; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return if $type->check($value); my $reftype = builtin::reftype($value); return [sprintf('"%s" constrains reftype(%s) to be equal to %s', $type, $varname, B::perlstring($param)), sprintf('reftype(%s) is %s', $varname, defined $reftype ? B::perlstring($reftype) : 'undef')];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 438,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Ref","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $reftype = shift(); return sub { my $v = $_[1]; &$maybe_load_modules('Scalar::Util', "ref($v) and Scalar::Util::reftype($v) eq q($reftype)"); } ;},"inlined" => sub { package Types::Standard; no warnings; use strict; "!!ref($_[1])";},"library" => "Types::Standard","name" => "Ref","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] or _failed_check(7, 'Defined', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Defined","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; defined $_[0] and _failed_check(6, 'Undef', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Undef","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complementary_type" => {},"constraint" => sub { package Types::Standard; no warnings; use strict; not defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 254,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Undef","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "!defined($_[1])";},"library" => "Types::Standard","name" => "Undef","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ;,"display_name" => "to_Item","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 226,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Item","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Item","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Sub::Defer; use warnings; use strict; $undeferred ||= undefer_sub($deferred_info->[4]); goto \&$undeferred;},"_overload_coderef_no_rebuild" => 1,"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Any","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"complement_name" => "None","constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 220,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Any","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; '!!1';},"library" => "Types::Standard","name" => "Any","type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 1}, 'Type::Tiny' ),"uniq" => 2}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"uniq" => 6}, 'Type::Tiny' ),"constraint" => sub { package Types::Standard; no warnings; use strict; defined $_;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 262,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Defined","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; "defined($_[1])";},"library" => "Types::Standard","name" => "Defined","parent" => {},"uniq" => 7}, 'Type::Tiny' ),"uniq" => 16}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return {};},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; return $Type::Tiny::parameterize_type->type_default if @_ < 2; return undef;},"uniq" => 22}, 'Type::Tiny' )],"parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\x10\x01\x00\x00\x00\x50\x04\x00\x00\x00\x00\x00\x01\x40\x05\x45\x55\x15\x55\x55\x01\x00"} use strict; '???'; $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_Maybe","frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"coercion_generator" => sub { package Types::Standard; no warnings; use strict; my($parent, $child, $param) = @_; return unless $param->has_coercion; return $param->coercion;},"compiled_type_constraint" => do{my $o},"constraint" => do{my $o},"constraint_generator" => sub { package Types::Standard; no warnings; use strict; return $meta->get_type('Maybe') unless @_; Type::Tiny::check_parameter_count_for_parameterized_type('Types::Standard', 'Maybe', \@_, 1); my $param = Types::TypeTiny::to_TypeTiny(shift()); Types::TypeTiny::is_TypeTiny($param) or _croak "Parameter to Maybe[`a] expected to be a type constraint; got $param"; my $param_compiled_check = $param->compiled_check; my @xsub; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); push @xsub, Type::Tiny::XS::get_coderef_for("Maybe[$paramname]") if $paramname }; return sub { my $value = shift(); return !0 unless defined $value; return $param->check($value); } , @xsub;},"deep_explanation" => sub { package Types::Standard; no warnings; use strict; my($type, $value, $varname) = @_; my $param = $type->parameters->[0]; return [sprintf('%s is defined', Type::Tiny::_dd($value)), sprintf('"%s" constrains the value with "%s" if it is defined', $type, $param), @{$param->validate_explain($value, $varname);}];},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 657,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Maybe","exception_class" => "Error::TypeTiny::Assertion","inline_generator" => sub { package Types::Standard; no warnings; use strict; my $param = shift(); my $param_compiled_check = $param->compiled_check; my $xsubname; do { my $paramname = Type::Tiny::XS::is_known($param_compiled_check); $xsubname = Type::Tiny::XS::get_subname_for("Maybe[$paramname]") }; return unless $param->can_be_inlined; return sub { my $v = $_[1]; return "$xsubname($v)" if $xsubname and not $Type::Tiny::AvoidCallbacks; my $param_check = $param->inline_check($v); "!defined($v) or $param_check"; } ;},"library" => "Types::Standard","name" => "Maybe","name_generator" => sub { package Type::Tiny; use warnings; use strict; defined $_ and s/[\x00-\x1F]//gms foreach (my($s, @a) = @_); sprintf '%s[%s]', $s, join(',', map((!defined($_) ? 'undef' : (!ref($_) && /\W/ ? B::perlstring($_) : $_)), @a));},"parent" => {},"type_default" => sub { package Types::Standard; no warnings; use strict; return undef;},"type_default_generator" => sub { package Types::Standard; no warnings; use strict; $_[0]->type_default or $Type::Tiny::parameterize_type->type_default;},"uniq" => 25}, 'Type::Tiny' ),"type_default" => do{my $o},"uniq" => 69}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"coercion"}{"type_constraint"} = $v->{"parameters"}[0];$v->{"parameters"}[0]{"compiled_type_constraint"} = $v->{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"};$v->{"parameters"}[0]{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parameters"}[0]{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"};$v->{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"type_default"} = $v->{"parameters"}[0]{"type_default"}; \$v}->get_message($variable_values)) |
0 |
41 |
41 |
|
| 700 |
15 |
▶ | if (ref($argument_node) eq 'SCALAR') { |
Branch: 4 branches
| Branch | True | False | Total |
| if (ref $argument_node eq 'SCALAR') { } |
41 |
0 |
41 |
| elsif (ref $argument_node eq 'REF') { } |
0 |
742 |
742 |
| elsif (ref $argument_node eq 'ARRAY') { } |
0 |
742 |
742 |
| elsif (ref $argument_node eq 'HASH') { } |
742 |
0 |
742 |
|
| 701 |
|
| # scalar ref means it's a variable. already validated perl but |
| 702 |
|
| # revalidate again as may be in middle of array which would need |
| 703 |
|
| # validate |
| 704 |
|
| return |
| 705 |
|
| ($variable_values && $variable_values->{$$argument_node} && $variable_values->{$$argument_node}{value}) |
| 706 |
15 |
▶ | // $default_value; |
Condition66%6/9
$variable_values && $$variable_values{$$argument_node} && $$variable_values{$$argument_node}{"value"} // $default_value
$variable_values and $$variable_values{$$argument_node} and $$variable_values{$$argument_node}{"value"}
$variable_values and $$variable_values{$$argument_node}
MC/DC0%0/4
$variable_values && $$variable_values{$$argument_node} && $$variable_values{$$argument_node}{"value"} // $default_value
$variable_values
$$variable_values{$$argument_node}
$$variable_values{$$argument_node}{"value"}
$default_value
Truth table0%0/7
A and B and C // D
A= $variable_valuesB= $$variable_values{$$argument_node}C= $$variable_values{$$argument_node}{"value"}D= $default_value
| A | B | C | D | result |
| 1 | 1 | 1 | X | 1 |
| 0 | X | X | 1 | 1 |
| 1 | 0 | X | 1 | 1 |
| 1 | 1 | 0 | 1 | 1 |
| 0 | X | X | 0 | 0 |
| 1 | 0 | X | 0 | 0 |
| 1 | 1 | 0 | 0 | 0 |
|
| 707 |
|
| } elsif (ref($argument_node) eq 'REF') { |
| 708 |
|
| # double ref means it's an enum value. JSON land, needs convert/validate |
| 709 |
15 |
| return $$$argument_node; |
| 710 |
|
| } elsif (ref($argument_node) eq 'ARRAY') { |
| 711 |
|
| # list. recurse |
| 712 |
15 |
| return [ map _coerce_value( |
| 713 |
|
| $_, $variable_values, $default_value |
| 714 |
|
| ), @$argument_node ]; |
| 715 |
|
| } elsif (ref($argument_node) eq 'HASH') { |
| 716 |
|
| # hash. recurse |
| 717 |
15 |
| return +{ map { $_ => _coerce_value( |
| 718 |
15 |
| $argument_node->{$_}, $variable_values, $default_value |
| 719 |
|
| ) } keys %$argument_node }; |
| 720 |
|
| } else { |
| 721 |
|
| # query literal. JSON land, needs convert/validate |
| 722 |
15 |
| return $argument_node; |
| 723 |
|
| } |
| 724 |
|
| } |
| 725 |
|
| |
| 726 |
41 |
▶ | fun _type_will_accept( |
|
Subroutine
_type_will_accept: called CC=14 SCAR=26.7
|
| 727 |
|
| (ConsumerOf['GraphQL::Role::Input']) $arg_type, |
| 728 |
|
| (ConsumerOf['GraphQL::Role::Input']) $var_type, |
| 729 |
15 |
▶ | ) { |
Branch: 4 branches
| Branch | True | False | Total |
| @_ < 2 and Function::Parameters::_croak('Too few arguments for fun _type_will_accept (expected 2, got ' . @_ . ')') |
742 |
0 |
742 |
| @_ > 2 and Function::Parameters::_croak('Too many arguments for fun _type_will_accept (expected 2, got ' . @_ . ')') |
742 |
0 |
742 |
| do {
package Type::Tiny;
builtin::blessed($arg_type) and do {
my $method = $arg_type->can("DOES") || $arg_type->can("isa");
$arg_type->$method("GraphQL::Role::Input")
}
} or Function::Parameters::_croak('In fun _type_will_accept: parameter 1 ($arg_type): ' . ${my $v = bless( {"coercion" => bless( {"_compiled_type_constraint_check" => sub ($) { package Eval::TypeTiny::Sandbox; use strict; do { package Type::Tiny; builtin::blessed($_[0]) and do { my $method = $_[0]->can('DOES') || $_[0]->can('isa'); $_[0]->$method('GraphQL::Role::Input') } };},"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 1015,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "ConsumerOf[\"GraphQL::Role::Input\"]","inlined" => sub { package Type::Tiny::Role; use warnings; use strict; my $var = $_[1]; my $code = "Scalar::Util::blessed($var) and do { my \$method = $var->can('DOES')||$var->can('isa'); $var->\$method(q[$role]) }"; return "do { use Scalar::Util (); $code }" if $Type::Tiny::AvoidCallbacks; $code;},"name" => "__ANON__","role" => "GraphQL::Role::Input","uniq" => 48}, 'Type::Tiny::Role' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"}; \$v}->get_message($arg_type)) |
739 |
3 |
742 |
| do {
package Type::Tiny;
builtin::blessed($var_type) and do {
my $method = $var_type->can("DOES") || $var_type->can("isa");
$var_type->$method("GraphQL::Role::Input")
}
} or Function::Parameters::_croak('In fun _type_will_accept: parameter 2 ($var_type): ' . ${my $v = bless( {"coercion" => bless( {"_compiled_type_constraint_check" => sub ($) { package Eval::TypeTiny::Sandbox; use strict; do { package Type::Tiny; builtin::blessed($_[0]) and do { my $method = $_[0]->can('DOES') || $_[0]->can('isa'); $_[0]->$method('GraphQL::Role::Input') } };},"frozen" => 1,"name" => "__ANON__","type_coercion_map" => [],"type_constraint" => {}}, 'Type::Coercion' ),"compiled_type_constraint" => do{my $o},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 1015,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "ConsumerOf[\"GraphQL::Role::Input\"]","inlined" => sub { package Type::Tiny::Role; use warnings; use strict; my $var = $_[1]; my $code = "Scalar::Util::blessed($var) and do { my \$method = $var->can('DOES')||$var->can('isa'); $var->\$method(q[$role]) }"; return "do { use Scalar::Util (); $code }" if $Type::Tiny::AvoidCallbacks; $code;},"name" => "__ANON__","role" => "GraphQL::Role::Input","uniq" => 48}, 'Type::Tiny::Role' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"coercion"}{"_compiled_type_constraint_check"}; \$v}->get_message($var_type)) |
169 |
573 |
742 |
|
| 730 |
|
▶ | return 1 if $arg_type == $var_type; |
Branch: 1 branch
| Branch | True | False | Total |
| if $arg_type == $var_type |
3 |
570 |
573 |
|
| 731 |
|
| $arg_type = $arg_type->of if $arg_type->isa('GraphQL::Type::NonNull'); |
| 732 |
|
| $var_type = $var_type->of if $var_type->isa('GraphQL::Type::NonNull'); |
| 733 |
|
| return 1 if $arg_type == $var_type; |
| 734 |
|
| return 1 if $arg_type->to_string eq $var_type->to_string; |
| 735 |
|
| ''; |
| 736 |
|
| } |
| 737 |
|
| |
| 738 |
|
| # $root_value is either a hash with fieldnames as keys and either data |
| 739 |
|
| # or coderefs as values |
| 740 |
|
| # OR it's just a coderef itself |
| 741 |
|
| # OR it's an object which gets tried for fieldname as method |
| 742 |
|
| # any code gets called with obvious args |
| 743 |
742 |
▶ | fun _default_field_resolver( |
|
Subroutine
_default_field_resolver: called CC=14 SCAR=26.4
|
| 744 |
|
| CodeLike | HashRef | InstanceOf $root_value, |
| 745 |
|
| HashRef $args, |
| 746 |
|
| Any $context, |
| 747 |
|
| HashRef $info, |
| 748 |
|
| ) { |
| 749 |
|
| my $field_name = $info->{field_name}; |
| 750 |
|
| my $property = is_HashRef($root_value) |
| 751 |
|
| ? $root_value->{$field_name} |
| 752 |
|
| : $root_value; |
| 753 |
|
| DEBUG and _debug('_default_field_resolver', $root_value, $field_name, $args, $property); |
| 754 |
|
| if (length(ref $property) and ( |
| 755 |
|
| ref($property) eq 'CODE' or |
| 756 |
|
| (blessed $property and overload::Method($property, '&{}')) |
| 757 |
|
| )) { |
| 758 |
|
| DEBUG and _debug('_default_field_resolver', 'codelike'); |
| 759 |
|
| return $property->($args, $context, $info); |
| 760 |
|
| } |
| 761 |
|
| if (length(ref $root_value) and blessed($root_value) and $root_value->can($field_name)) { |
| 762 |
|
| DEBUG and _debug('_default_field_resolver', 'method'); |
| 763 |
|
| return $root_value->$field_name($args, $context, $info); |
| 764 |
|
| } |
| 765 |
|
| $property; |
| 766 |
|
| } |
| 767 |
|
| |
| 768 |
|
| 1; |