Zing/Term.pm

filter: Statementstmt 28.4% 58 / 204 Branchbran 0.0% 0 / 68 Conditioncond 0.0% 0 / 9 MC/DCmcdc 0.0% 0 / 5 Subroutinesub 33.3% 10 / 30 Podpod 70.0% 14 / 20 totaltotal 24.4% 82 / 336 CC 39 SCAR 49.9
CC
39
Cov
21%
BUILDARGS
462.0
object
12.0
channel
6.0
CRAP 146.2
↑ Summary Zing/Daemon.pm »
1 package Zing::Term;
2  
3 56 ▶use 5.014;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 56 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 56 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 56 ▶use registry 'Zing::Types';
Subroutine BEGIN: called CC=1 SCAR=0.0
9 56 ▶use routines;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 56 ▶use Data::Object::Class;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 56 ▶use Data::Object::ClassHas;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 56 ▶use Data::Object::Space;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 56 extends 'Zing::Class';
16  
17 56 ▶use Scalar::Util ();
Subroutine BEGIN: called CC=1 SCAR=0.0
18  
19 56 ▶use overload '""' => 'string';
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 56 our $VERSION = '0.26'; # VERSION
22  
23 # ATTRIBUTES
24  
25 56 has 'handle' => (
26 is => 'ro',
27 isa => 'Name',
28 req => 1,
29 );
30  
31 56 has 'symbol' => (
32 is => 'ro',
33 isa => 'Name',
34 req => 1,
35 );
36  
37 56 has 'bucket' => (
38 is => 'ro',
39 isa => 'Name',
40 req => 1,
41 );
42  
43 56 has 'system' => (
44 is => 'ro',
45 isa => 'Name',
46 req => 1,
47 );
48  
49 56 has 'target' => (
50 is => 'ro',
51 isa => 'Name',
52 req => 1,
53 );
54  
55 # BUILDERS
56  
57 56 state $symbols = {
58 'Zing::Channel' => 'channel',
59 'Zing::Data' => 'data',
60 'Zing::Domain' => 'domain',
61 'Zing::Kernel' => 'kernel',
62 'Zing::KeyVal' => 'keyval',
63 'Zing::Lookup' => 'lookup',
64 'Zing::Mailbox' => 'mailbox',
65 'Zing::Meta' => 'meta',
66 'Zing::Process' => 'process',
67 'Zing::PubSub' => 'pubsub',
68 'Zing::Queue' => 'queue',
69 'Zing::Repo' => 'repo',
70 'Zing::Table' => 'table',
71 };
72  
73 0 ▶fun BUILDARGS($self, $item, @data) {
Subroutine BUILDARGS: not called CC=21 SCAR=61.4
Pod undocumented
74 0 my $args = {};
75  
76 0 ▶ if (Scalar::Util::blessed($item)) {
Branch: 2 branches
BranchTrueFalseTotal
if (builtin::blessed($item)) { } 0 0 0
elsif (defined $item and not ref $item) { } 0 0 0
77 0 ▶ if ($item->isa('Zing::Data')) {
Branch: 13 branches
BranchTrueFalseTotal
if ($item->isa('Zing::Data')) { } 0 0 0
elsif ($item->isa('Zing::Lookup')) { } 0 0 0
elsif ($item->isa('Zing::Domain')) { } 0 0 0
elsif ($item->isa('Zing::Table')) { } 0 0 0
elsif ($item->isa('Zing::Channel')) { } 0 0 0
elsif ($item->isa('Zing::Kernel')) { } 0 0 0
elsif ($item->isa('Zing::Mailbox')) { } 0 0 0
elsif ($item->isa('Zing::Process')) { } 0 0 0
elsif ($item->isa('Zing::Queue')) { } 0 0 0
elsif ($item->isa('Zing::Meta')) { } 0 0 0
elsif ($item->isa('Zing::KeyVal')) { } 0 0 0
elsif ($item->isa('Zing::PubSub')) { } 0 0 0
elsif ($item->isa('Zing::Repo')) { } 0 0 0
78 0 $args->{symbol} = $symbols->{'Zing::Data'};
79 0 $args->{bucket} = $item->name;
80 }
81 elsif ($item->isa('Zing::Lookup')) {
82 0 $args->{symbol} = $symbols->{'Zing::Lookup'};
83 0 $args->{bucket} = $item->name;
84 }
85 elsif ($item->isa('Zing::Domain')) {
86 0 $args->{symbol} = $symbols->{'Zing::Domain'};
87 0 $args->{bucket} = $item->name;
88 }
89 elsif ($item->isa('Zing::Table')) {
90 0 $args->{symbol} = $symbols->{'Zing::Table'};
91 0 $args->{bucket} = $item->name;
92 }
93 elsif ($item->isa('Zing::Channel')) {
94 0 $args->{symbol} = $symbols->{'Zing::Channel'};
95 0 $args->{bucket} = $item->name;
96 }
97 elsif ($item->isa('Zing::Kernel')) {
98 0 $args->{symbol} = $symbols->{'Zing::Kernel'};
99 0 $args->{bucket} = $item->name;
100 }
101 elsif ($item->isa('Zing::Mailbox')) {
102 0 $args->{symbol} = $symbols->{'Zing::Mailbox'};
103 0 $args->{bucket} = $item->name;
104 }
105 elsif ($item->isa('Zing::Process')) {
106 0 $args->{symbol} = $symbols->{'Zing::Process'};
107 0 $args->{bucket} = $item->name;
108 }
109 elsif ($item->isa('Zing::Queue')) {
110 0 $args->{symbol} = $symbols->{'Zing::Queue'};
111 0 $args->{bucket} = $item->name;
112 }
113 elsif ($item->isa('Zing::Meta')) {
114 0 $args->{symbol} = $symbols->{'Zing::Meta'};
115 0 $args->{bucket} = $item->name;
116 }
117 elsif ($item->isa('Zing::KeyVal')) {
118 0 $args->{symbol} = $symbols->{'Zing::KeyVal'};
119 0 $args->{bucket} = $item->name;
120 }
121 elsif ($item->isa('Zing::PubSub')) {
122 0 $args->{symbol} = $symbols->{'Zing::PubSub'};
123 0 $args->{bucket} = $item->name;
124 }
125 elsif ($item->isa('Zing::Repo')) {
126 0 $args->{symbol} = $symbols->{'Zing::Repo'};
127 0 $args->{bucket} = $item->name;
128 }
129 else {
130 0 $self->throw(error_term_unknow_object($item));
131 }
132 0 ▶ $args->{target} = ($item->env->target || 'global');
Condition0%0/2
$item->env->target || 'global'
l!l
00
MC/DC0%0/1
$item->env->target || 'global'
$item->env->target
Truth table0%0/2
A
A= $item->env->target
Aresult
11
00
133 0 ▶ $args->{handle} = ($item->env->handle || 'main');
Condition0%0/2
$item->env->handle || 'main'
l!l
00
MC/DC0%0/1
$item->env->handle || 'main'
$item->env->handle
Truth table0%0/2
A
A= $item->env->handle
Aresult
11
00
134 0 ▶ $args->{system} = ($item->env->system || 'zing');
Condition0%0/2
$item->env->system || 'zing'
l!l
00
MC/DC0%0/1
$item->env->system || 'zing'
$item->env->system
Truth table0%0/2
A
A= $item->env->system
Aresult
11
00
135 }
136 ▶ elsif(defined $item && !ref $item) {
Condition0%0/3
defined $item and not ref $item
!ll&&!rl&&r
000
MC/DC0%0/2
defined $item and not ref $item
defined $item not ref $item
Truth table0%0/3
A and not(B)
A= defined $itemB= not ref $item
ABresult
0X0
100
111
137 0 my $schema = [split /:/, "$item", 5];
138  
139 0 my $system = $schema->[0];
140 0 my $handle = $schema->[1];
141 0 my $target = $schema->[2];
142 0 my $symbol = $schema->[3];
143 0 my $bucket = $schema->[4];
144  
145 0 ▶ unless (grep {$_ eq $symbol} values %$symbols) {
Branch: 1 branch
BranchTrueFalseTotal
unless (grep {$_ eq $symbol;} values %$symbols) 0 0 0
146 0 $self->throw(error_term_unknow_symbol("$item"));
147 }
148  
149 0 $args->{system} = $system;
150 0 $args->{handle} = $handle;
151 0 $args->{target} = $target;
152 0 $args->{symbol} = $symbol;
153 0 $args->{bucket} = $bucket;
154 }
155 else {
156 0 $self->throw(error_term_unknown());
157 }
158  
159 0 return $args;
160 56 }
161  
162 # METHODS
163  
164 0 ▶method channel() {
Subroutine channel: not called CC=2 SCAR=17.9
Pod documented
165 0 ▶ unless ($self->symbol eq 'channel') {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->symbol eq "channel") 0 0 0
166 0 $self->throw(error_term_invalid("channel"));
167 }
168  
169 0 return $self->string;
170 56 }
171  
172 0 ▶method data() {
Subroutine data: not called CC=2 SCAR=17.9
Pod documented
173 0 ▶ unless ($self->symbol eq 'data') {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->symbol eq "data") 0 0 0
174 0 $self->throw(error_term_invalid("data"));
175 }
176  
177 0 return $self->string;
178 56 }
179  
180 0 ▶method domain() {
Subroutine domain: not called CC=2 SCAR=17.9
Pod documented
181 0 ▶ unless ($self->symbol eq 'domain') {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->symbol eq "domain") 0 0 0
182 0 $self->throw(error_term_invalid("domain"));
183 }
184  
185 0 return $self->string;
186 56 }
187  
188 0 ▶method kernel() {
Subroutine kernel: not called CC=2 SCAR=17.9
Pod documented
189 0 ▶ unless ($self->symbol eq 'kernel') {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->symbol eq "kernel") 0 0 0
190 0 $self->throw(error_term_invalid("kernel"));
191 }
192  
193 0 return $self->string;
194 56 }
195  
196 0 ▶method keyval() {
Subroutine keyval: not called CC=2 SCAR=17.9
Pod documented
197 0 ▶ unless ($self->symbol eq 'keyval') {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->symbol eq "keyval") 0 0 0
198 0 $self->throw(error_term_invalid("keyval"));
199 }
200  
201 0 return $self->string;
202 56 }
203  
204 0 ▶method lookup() {
Subroutine lookup: not called CC=2 SCAR=17.9
Pod documented
205 0 ▶ unless ($self->symbol eq 'lookup') {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->symbol eq "lookup") 0 0 0
206 0 $self->throw(error_term_invalid("lookup"));
207 }
208  
209 0 return $self->string;
210 56 }
211  
212 0 ▶method mailbox() {
Subroutine mailbox: not called CC=2 SCAR=17.9
Pod documented
213 0 ▶ unless ($self->symbol eq 'mailbox') {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->symbol eq "mailbox") 0 0 0
214 0 $self->throw(error_term_invalid("mailbox"));
215 }
216  
217 0 return $self->string;
218 56 }
219  
220 0 ▶method meta() {
Subroutine meta: not called CC=2 SCAR=17.9
Pod documented
221 0 ▶ unless ($self->symbol eq 'meta') {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->symbol eq "meta") 0 0 0
222 0 $self->throw(error_term_invalid("meta"));
223 }
224  
225 0 return $self->string;
226 56 }
227  
228 0 ▶method object(Maybe[Env] $env) {
Subroutine object: not called CC=3 SCAR=24.8
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
${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; 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/routines.pm","line" => 26,"package" => "routines"},"deprecated" => !!0,"display_name" => "Maybe[Env]","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 Type::Tiny; use warnings; use strict; local $_ = $_[0]; foreach my $c (@constraints) { return unless &$c(@_); } return !0;},"constraint" => sub { package Data::Object::Types::Keywords; use warnings; use strict; no feature ':all'; use feature ':5.12'; BEGIN { $^H{'Function::Parameters/config'} = 'HASH(0x62be84a86130)'; } goto $type->{'validation'};},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Data/Object/Types/Keywords.pm","line" => 144,"package" => "Data::Object::Types::Keywords"},"deprecated" => !!0,"display_name" => "Env","exception_class" => "Error::TypeTiny::Assertion","name" => "Env","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\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 Type::Tiny; BEGIN {${^WARNING_BITS} = "\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_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" => 55}, '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" => 112}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"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"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"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"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"type_default"} = $v->{"parent"}{"type_default"}; \$v}->check($env) or Function::Parameters::_croak('In method object: parameter 1 ($env): ' . ${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; 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/routines.pm","line" => 26,"package" => "routines"},"deprecated" => !!0,"display_name" => "Maybe[Env]","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 Type::Tiny; use warnings; use strict; local $_ = $_[0]; foreach my $c (@constraints) { return unless &$c(@_); } return !0;},"constraint" => sub { package Data::Object::Types::Keywords; use warnings; use strict; no feature ':all'; use feature ':5.12'; BEGIN { $^H{'Function::Parameters/config'} = 'HASH(0x62be84a86130)'; } goto $type->{'validation'};},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Data/Object/Types/Keywords.pm","line" => 144,"package" => "Data::Object::Types::Keywords"},"deprecated" => !!0,"display_name" => "Env","exception_class" => "Error::TypeTiny::Assertion","name" => "Env","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\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 Type::Tiny; BEGIN {${^WARNING_BITS} = "\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_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" => 55}, '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" => 112}, 'Type::Tiny' );$v->{"coercion"}{"type_constraint"} = $v;$v->{"compiled_type_constraint"} = $v->{"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"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parameters"}[0]{"parent"}{"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"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"constraint"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"parent"}{"parent"} = $v->{"parameters"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"type_default"} = $v->{"parent"}{"type_default"}; \$v}->get_message($env)) 0 0 0
229 0 require Zing::Env;
230  
231 $env = Zing::Env->new(
232 0 ▶ ($env ? %{$env} : ()),
Branch: 1 branch
BranchTrueFalseTotal
$env ? : 0 0 0
233 handle => $self->handle,
234 target => $self->target,
235 );
236  
237 my $space = Data::Object::Space->new(
238 0 ({reverse %$symbols})->{$self->symbol}
239 );
240  
241 0 return $space->build(env => $env, name => $self->bucket);
242 56 }
243  
244 0 ▶method process() {
Subroutine process: not called CC=2 SCAR=17.9
Pod documented
245 0 ▶ unless ($self->symbol eq 'process') {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->symbol eq "process") 0 0 0
246 0 $self->throw(error_term_invalid("process"));
247 }
248  
249 0 return $self->string;
250 56 }
251  
252 0 ▶method pubsub() {
Subroutine pubsub: not called CC=2 SCAR=17.9
Pod documented
253 0 ▶ unless ($self->symbol eq 'pubsub') {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->symbol eq "pubsub") 0 0 0
254 0 $self->throw(error_term_invalid("pubsub"));
255 }
256  
257 0 return $self->string;
258 56 }
259  
260 0 ▶method queue() {
Subroutine queue: not called CC=2 SCAR=17.9
Pod documented
261 0 ▶ unless ($self->symbol eq 'queue') {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->symbol eq "queue") 0 0 0
262 0 $self->throw(error_term_invalid("queue"));
263 }
264  
265 0 return $self->string;
266 56 }
267  
268 0 ▶method repo() {
Subroutine repo: not called CC=2 SCAR=17.9
Pod documented
269 0 ▶ unless ($self->symbol eq 'repo') {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->symbol eq "repo") 0 0 0
270 0 $self->throw(error_term_invalid('repo'));
271 }
272  
273 0 return $self->string;
274 56 }
275  
276 0 ▶method string() {
Subroutine string: not called CC=1 SCAR=6.9
Pod documented
277 0 my $system = $self->system;
278 0 my $handle = $self->handle;
279 0 my $target = $self->target;
280 0 my $symbol = $self->symbol;
281 0 my $bucket = $self->bucket;
282  
283 0 return lc join ':', $system, $handle, $target, $symbol, $bucket;
284 56 }
285  
286 0 ▶method table() {
Subroutine table: not called CC=2 SCAR=17.9
Pod undocumented
287 0 ▶ unless ($self->symbol eq 'table') {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->symbol eq "table") 0 0 0
288 0 $self->throw(error_term_invalid('table'));
289 }
290  
291 0 return $self->string;
292 56 }
293  
294 # ERRORS
295  
296 0 ▶fun error_term_invalid(Str $name) {
Subroutine error_term_invalid: not called CC=2 SCAR=17.9
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
Type::Tiny::XS::Str($name) or Function::Parameters::_croak('In fun error_term_invalid: parameter 1 ($name): ' . ${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_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 Type::Tiny; BEGIN {${^WARNING_BITS} = "\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_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' );$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($name)) 0 0 0
297 0 code => 'error_term_invalid',
298 message => qq(Error in term: not a "$name" term),
299 56 }
300  
301 fun error_term_unknown() {
302 0 ▶ code => 'error_term_unknown',
Subroutine error_term_unknown: not called CC=1 SCAR=6.9
Pod undocumented
303 message => qq(Unrecognizable term (or object) provided),
304 56 }
305  
306 0 ▶fun error_term_unknow_object(Object $item) {
Subroutine error_term_unknow_object: not called CC=2 SCAR=17.9
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
Ref::Util::XS::is_blessed_ref($item) or Function::Parameters::_croak('In fun error_term_unknow_object: parameter 1 ($item): ' . ${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_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 Type::Tiny; BEGIN {${^WARNING_BITS} = "\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_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' );$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($item)) 0 0 0
307 0 code => 'error_term_unknow_object',
308 message => qq(Error in term: Unrecognizable "object": $item),
309 56 }
310  
311 0 ▶fun error_term_unknow_symbol(Str $term) {
Subroutine error_term_unknow_symbol: not called CC=2 SCAR=17.9
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
Type::Tiny::XS::Str($term) or Function::Parameters::_croak('In fun error_term_unknow_symbol: parameter 1 ($term): ' . ${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_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 Type::Tiny; BEGIN {${^WARNING_BITS} = "\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_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' );$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($term)) 0 0 0
312 0 code => 'error_term_unknow_symbol',
313 message => qq(Error in term: Unrecognizable "symbol" in: $term),
314 56 }
315  
316 56 1;
317  
318 =encoding utf8
319  
320 =head1 NAME
321  
322 Zing::Term - Resource Representation
323  
324 =cut
325  
326 =head1 ABSTRACT
327  
328 Resource Representation
329  
330 =cut
331  
332 =head1 SYNOPSIS
333  
334 use Zing::KeyVal;
335 use Zing::Term;
336  
337 my $term = Zing::Term->new(Zing::KeyVal->new(name => 'nodes'));
338  
339 # $term->keyval;
340  
341 =cut
342  
343 =head1 DESCRIPTION
344  
345 This package provides a mechanism for generating and validating (global and
346 local) resource identifiers.
347  
348 =cut
349  
350 =head1 LIBRARIES
351  
352 This package uses type constraints from:
353  
354 L<Zing::Types>
355  
356 =cut
357  
358 =head1 ATTRIBUTES
359  
360 This package has the following attributes:
361  
362 =cut
363  
364 =head2 bucket
365  
366 bucket(Str)
367  
368 This attribute is read-only, accepts C<(Str)> values, and is required.
369  
370 =cut
371  
372 =head2 handle
373  
374 handle(Str)
375  
376 This attribute is read-only, accepts C<(Str)> values, and is required.
377  
378 =cut
379  
380 =head2 symbol
381  
382 symbol(Str)
383  
384 This attribute is read-only, accepts C<(Str)> values, and is required.
385  
386 =cut
387  
388 =head2 system
389  
390 system(Str)
391  
392 This attribute is read-only, accepts C<(Str)> values, and is required.
393  
394 =cut
395  
396 =head2 target
397  
398 target(Str)
399  
400 This attribute is read-only, accepts C<(Str)> values, and is required.
401  
402 =cut
403  
404 =head1 METHODS
405  
406 This package implements the following methods:
407  
408 =cut
409  
410 =head2 channel
411  
412 channel() : Str
413  
414 The channel method validates and returns a "channel" resource identifier.
415  
416 =over 4
417  
418 =item channel example #1
419  
420 use Zing::Channel;
421  
422 Zing::Term->new(Zing::Channel->new(name => 'chat'));
423  
424 # $term->channel;
425  
426 =back
427  
428 =cut
429  
430 =head2 data
431  
432 data() : Str
433  
434 The data method validates and returns a "data" resource identifier.
435  
436 =over 4
437  
438 =item data example #1
439  
440 use Zing::Data;
441 use Zing::Process;
442  
443 Zing::Term->new(Zing::Data->new(name => '0.0.0.0'));
444  
445 # $term->data;
446  
447 =back
448  
449 =cut
450  
451 =head2 domain
452  
453 domain() : Str
454  
455 The domain method validates and returns a "domain" resource identifier.
456  
457 =over 4
458  
459 =item domain example #1
460  
461 use Zing::Domain;
462  
463 Zing::Term->new(Zing::Domain->new(name => 'transaction'));
464  
465 # $term->domain;
466  
467 =back
468  
469 =cut
470  
471 =head2 kernel
472  
473 kernel() : Str
474  
475 The kernel method validates and returns a "kernel" resource identifier.
476  
477 =over 4
478  
479 =item kernel example #1
480  
481 use Zing::Kernel;
482  
483 Zing::Term->new(Zing::Kernel->new(scheme => ['MyApp', [], 1]));
484  
485 # $term->kernel;
486  
487 =back
488  
489 =cut
490  
491 =head2 keyval
492  
493 keyval() : Str
494  
495 The keyval method validates and returns a "keyval" resource identifier.
496  
497 =over 4
498  
499 =item keyval example #1
500  
501 use Zing::KeyVal;
502  
503 Zing::Term->new(Zing::KeyVal->new(name => 'listeners'));
504  
505 # $term->keyval;
506  
507 =back
508  
509 =cut
510  
511 =head2 lookup
512  
513 lookup() : Str
514  
515 The lookup method validates and returns a "lookup" resource identifier.
516  
517 =over 4
518  
519 =item lookup example #1
520  
521 use Zing::Lookup;
522  
523 Zing::Term->new(Zing::Lookup->new(name => 'employees'));
524  
525 # $term->lookup;
526  
527 =back
528  
529 =cut
530  
531 =head2 mailbox
532  
533 mailbox() : Str
534  
535 The mailbox method validates and returns a "mailbox" resource identifier.
536  
537 =over 4
538  
539 =item mailbox example #1
540  
541 use Zing::Mailbox;
542 use Zing::Process;
543  
544 Zing::Term->new(Zing::Mailbox->new(name => '0.0.0.0'));
545  
546 # $term->mailbox;
547  
548 =back
549  
550 =cut
551  
552 =head2 meta
553  
554 meta() : Str
555  
556 The meta method validates and returns a "meta" resource identifier.
557  
558 =over 4
559  
560 =item meta example #1
561  
562 use Zing::Meta;
563  
564 Zing::Term->new(Zing::Meta->new(name => 'random'));
565  
566 # $term->meta;
567  
568 =back
569  
570 =cut
571  
572 =head2 object
573  
574 object(Maybe[Env] $env) : Object
575  
576 The object method reifies an object from its resource identifier.
577  
578 =over 4
579  
580 =item object example #1
581  
582 use Zing::Process;
583  
584 my $term = Zing::Term->new(Zing::Process->new);
585  
586 $term->object;
587  
588 =back
589  
590 =cut
591  
592 =head2 process
593  
594 process() : Str
595  
596 The process method validates and returns a "process" resource identifier.
597  
598 =over 4
599  
600 =item process example #1
601  
602 use Zing::Process;
603  
604 Zing::Term->new(Zing::Process->new);
605  
606 # $term->process;
607  
608 =back
609  
610 =cut
611  
612 =head2 pubsub
613  
614 pubsub() : Str
615  
616 The pubsub method validates and returns a "pubsub" resource identifier.
617  
618 =over 4
619  
620 =item pubsub example #1
621  
622 use Zing::PubSub;
623  
624 Zing::Term->new(Zing::PubSub->new(name => 'operations'));
625  
626 # $term->pubsub;
627  
628 =back
629  
630 =cut
631  
632 =head2 queue
633  
634 queue() : Str
635  
636 The queue method validates and returns a "queue" resource identifier.
637  
638 =over 4
639  
640 =item queue example #1
641  
642 use Zing::Queue;
643  
644 Zing::Term->new(Zing::Queue->new(name => 'workflows'));
645  
646 # $term->queue;
647  
648 =back
649  
650 =cut
651  
652 =head2 repo
653  
654 repo() : Str
655  
656 The repo method validates and returns a "repo" resource identifier.
657  
658 =over 4
659  
660 =item repo example #1
661  
662 use Zing::Repo;
663  
664 Zing::Term->new(Zing::Repo->new(name => 'miscellaneous'));
665  
666 # $term->repo;
667  
668 =back
669  
670 =cut
671  
672 =head2 string
673  
674 string() : Str
675  
676 The string method returns a resource identifier. This method is called
677 automatically when the object is used as a string.
678  
679 =over 4
680  
681 =item string example #1
682  
683 # given: synopsis
684  
685 $term->string;
686  
687 =back
688  
689 =cut
690  
691 =head1 AUTHOR
692  
693 Al Newkirk, C<awncorp@cpan.org>
694  
695 =head1 LICENSE
696  
697 Copyright (C) 2011-2019, Al Newkirk, et al.
698  
699 This is free software; you can redistribute it and/or modify it under the terms
700 of the The Apache License, Version 2.0, as elucidated in the L<"license
701 file"|https://github.com/iamalnewkirk/zing/blob/master/LICENSE>.
702  
703 =head1 PROJECT
704  
705 L<Wiki|https://github.com/iamalnewkirk/zing/wiki>
706  
707 L<Project|https://github.com/iamalnewkirk/zing>
708  
709 L<Initiatives|https://github.com/iamalnewkirk/zing/projects>
710  
711 L<Milestones|https://github.com/iamalnewkirk/zing/milestones>
712  
713 L<Contributing|https://github.com/iamalnewkirk/zing/blob/master/CONTRIBUTE.md>
714  
715 L<Issues|https://github.com/iamalnewkirk/zing/issues>
716  
717 =cut
↑ Summary Zing/Daemon.pm »