| 1 |
|
| package Zing::Process; |
| 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 |
|
| |
| 14 |
56 |
| extends 'Zing::Entity'; |
| 15 |
|
| |
| 16 |
56 |
▶ | use FlightRecorder; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 17 |
56 |
▶ | use POSIX; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 18 |
|
| |
| 19 |
56 |
▶ | use Zing::Logic; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 20 |
56 |
▶ | use Zing::Loop; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
|
| 21 |
|
| |
| 22 |
56 |
| our $VERSION = '0.26'; # VERSION |
| 23 |
|
| |
| 24 |
|
| # ATTRIBUTES |
| 25 |
|
| |
| 26 |
56 |
| has 'cleanup' => ( |
| 27 |
|
| is => 'ro', |
| 28 |
|
| isa => 'Bool', |
| 29 |
|
| def => 1, |
| 30 |
|
| ); |
| 31 |
|
| |
| 32 |
56 |
| has 'data' => ( |
| 33 |
|
| is => 'ro', |
| 34 |
|
| isa => 'Data', |
| 35 |
|
| new => 1, |
| 36 |
|
| ); |
| 37 |
|
| |
| 38 |
0 |
▶ | fun new_data($self) { |
|
Subroutine
new_data: not called CC=1 SCAR=6.9
Pod
undocumented
|
| 39 |
0 |
| $self->app->data(name => $self->name) |
| 40 |
56 |
| } |
| 41 |
|
| |
| 42 |
56 |
| has 'journal' => ( |
| 43 |
|
| is => 'ro', |
| 44 |
|
| isa => 'Channel', |
| 45 |
|
| new => 1, |
| 46 |
|
| ); |
| 47 |
|
| |
| 48 |
0 |
▶ | fun new_journal($self) { |
|
Subroutine
new_journal: not called CC=1 SCAR=6.9
Pod
undocumented
|
| 49 |
0 |
| $self->app->journal |
| 50 |
56 |
| } |
| 51 |
|
| |
| 52 |
56 |
| has 'log' => ( |
| 53 |
|
| is => 'ro', |
| 54 |
|
| isa => 'Logger', |
| 55 |
|
| new => 1, |
| 56 |
|
| ); |
| 57 |
|
| |
| 58 |
0 |
▶ | fun new_log($self) { |
|
Subroutine
new_log: not called CC=1 SCAR=6.9
Pod
undocumented
|
| 59 |
0 |
| $self->app->logger(auto => undef) |
| 60 |
56 |
| } |
| 61 |
|
| |
| 62 |
56 |
| has 'logic' => ( |
| 63 |
|
| is => 'ro', |
| 64 |
|
| isa => 'Logic', |
| 65 |
|
| new => 1, |
| 66 |
|
| ); |
| 67 |
|
| |
| 68 |
0 |
▶ | fun new_logic($self) { |
|
Subroutine
new_logic: not called CC=1 SCAR=6.9
Pod
undocumented
|
| 69 |
0 |
| my $debug = $self->env->debug; |
| 70 |
0 |
| Zing::Logic->new(debug => $debug, process => $self) |
| 71 |
56 |
| } |
| 72 |
|
| |
| 73 |
56 |
| has 'loop' => ( |
| 74 |
|
| is => 'ro', |
| 75 |
|
| isa => 'Loop', |
| 76 |
|
| new => 1, |
| 77 |
|
| ); |
| 78 |
|
| |
| 79 |
0 |
▶ | fun new_loop($self) { |
|
Subroutine
new_loop: not called CC=1 SCAR=6.9
Pod
undocumented
|
| 80 |
0 |
| Zing::Loop->new(flow => $self->logic->flow) |
| 81 |
56 |
| } |
| 82 |
|
| |
| 83 |
56 |
| has 'mailbox' => ( |
| 84 |
|
| is => 'ro', |
| 85 |
|
| isa => 'Mailbox', |
| 86 |
|
| new => 1, |
| 87 |
|
| ); |
| 88 |
|
| |
| 89 |
0 |
▶ | fun new_mailbox($self) { |
|
Subroutine
new_mailbox: not called CC=1 SCAR=6.9
Pod
undocumented
|
| 90 |
0 |
| $self->app->mailbox(name => $self->name) |
| 91 |
56 |
| } |
| 92 |
|
| |
| 93 |
56 |
| has 'meta' => ( |
| 94 |
|
| is => 'ro', |
| 95 |
|
| isa => 'Meta', |
| 96 |
|
| new => 1, |
| 97 |
|
| ); |
| 98 |
|
| |
| 99 |
0 |
▶ | fun new_meta($self) { |
|
Subroutine
new_meta: not called CC=1 SCAR=6.9
Pod
undocumented
|
| 100 |
0 |
| $self->app->meta(name => $self->name) |
| 101 |
56 |
| } |
| 102 |
|
| |
| 103 |
56 |
| has 'name' => ( |
| 104 |
|
| is => 'ro', |
| 105 |
|
| isa => 'Name', |
| 106 |
|
| new => 1, |
| 107 |
|
| ); |
| 108 |
|
| |
| 109 |
0 |
▶ | fun new_name($self) { |
|
Subroutine
new_name: not called CC=1 SCAR=6.9
Pod
undocumented
|
| 110 |
0 |
| $self->app->id->string |
| 111 |
56 |
| } |
| 112 |
|
| |
| 113 |
56 |
| has 'parent' => ( |
| 114 |
|
| is => 'ro', |
| 115 |
|
| isa => 'Maybe[Process]', |
| 116 |
|
| opt => 1, |
| 117 |
|
| ); |
| 118 |
|
| |
| 119 |
56 |
| has 'pid' => ( |
| 120 |
|
| is => 'ro', |
| 121 |
|
| isa => 'Int', |
| 122 |
|
| new => 1, |
| 123 |
|
| ); |
| 124 |
|
| |
| 125 |
0 |
▶ | fun new_pid($self) { |
|
Subroutine
new_pid: not called CC=1 SCAR=6.9
Pod
undocumented
|
| 126 |
0 |
| $self->app->pid |
| 127 |
56 |
| } |
| 128 |
|
| |
| 129 |
56 |
| has 'signals' => ( |
| 130 |
|
| is => 'ro', |
| 131 |
|
| isa => 'Map[Interupt, Str|CodeRef]', |
| 132 |
|
| new => 1, |
| 133 |
|
| ); |
| 134 |
|
| |
| 135 |
0 |
▶ | fun new_signals($self) { |
|
Subroutine
new_signals: not called CC=1 SCAR=6.9
Pod
undocumented
|
| 136 |
0 |
| $self->logic->signals |
| 137 |
56 |
| } |
| 138 |
|
| |
| 139 |
56 |
| has 'started' => ( |
| 140 |
|
| is => 'rw', |
| 141 |
|
| isa => 'Int', |
| 142 |
|
| def => 0, |
| 143 |
|
| ); |
| 144 |
|
| |
| 145 |
56 |
| has 'stopped' => ( |
| 146 |
|
| is => 'rw', |
| 147 |
|
| isa => 'Int', |
| 148 |
|
| def => 0, |
| 149 |
|
| ); |
| 150 |
|
| |
| 151 |
56 |
| has 'tag' => ( |
| 152 |
|
| is => 'rw', |
| 153 |
|
| isa => 'Str', |
| 154 |
|
| opt => 1, |
| 155 |
|
| ); |
| 156 |
|
| |
| 157 |
|
| # SHIMS |
| 158 |
|
| |
| 159 |
|
| sub _kill { |
| 160 |
|
| CORE::kill(shift, shift) |
| 161 |
|
| } |
| 162 |
|
| |
| 163 |
|
| # METHODS |
| 164 |
|
| |
| 165 |
0 |
▶ | method defer(HashRef $data) { |
|
Subroutine
defer: not called CC=2 SCAR=17.9
Pod
documented
Branch: 1 branch
| Branch | True | False | Total |
| Ref::Util::XS::is_plain_hashref($data) or Function::Parameters::_croak('In method defer: parameter 1 ($data): ' . ${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 Type::Tiny; BEGIN {${^WARNING_BITS} = "\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' ),"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($data)) |
0 |
0 |
0 |
|
| 166 |
0 |
| $self->mailbox->send($self->mailbox->term, $data); |
| 167 |
|
| |
| 168 |
0 |
| return $self; |
| 169 |
56 |
| } |
| 170 |
|
| |
| 171 |
0 |
▶ | method destroy() { |
|
Subroutine
destroy: not called CC=2 SCAR=17.9
Pod
documented
|
| 172 |
0 |
▶ | return $self if !$self->cleanup; |
Branch: 1 branch
| Branch | True | False | Total |
| unless $self->cleanup |
0 |
0 |
0 |
|
| 173 |
|
| |
| 174 |
0 |
| $self->data->drop; |
| 175 |
0 |
| $self->mailbox->drop; |
| 176 |
0 |
| $self->meta->drop; |
| 177 |
|
| |
| 178 |
0 |
| return $self; |
| 179 |
56 |
| } |
| 180 |
|
| |
| 181 |
0 |
▶ | method exercise() { |
|
Subroutine
exercise: not called CC=8 SCAR=42.8
Pod
documented
|
| 182 |
0 |
| $self->started(time); |
| 183 |
|
| |
| 184 |
0 |
| my $signals = $self->signals; |
| 185 |
|
| |
| 186 |
0 |
▶ | local $SIG{CHLD} = $signals->{CHLD} if $signals->{CHLD}; |
Branch: 1 branch
| Branch | True | False | Total |
| if $signals->{"CHLD"} |
0 |
0 |
0 |
|
| 187 |
0 |
▶ | local $SIG{HUP} = $signals->{HUP} if $signals->{HUP}; |
Branch: 1 branch
| Branch | True | False | Total |
| if $signals->{"HUP"} |
0 |
0 |
0 |
|
| 188 |
0 |
▶ | local $SIG{INT} = $signals->{INT} if $signals->{INT}; |
Branch: 1 branch
| Branch | True | False | Total |
| if $signals->{"INT"} |
0 |
0 |
0 |
|
| 189 |
0 |
▶ | local $SIG{QUIT} = $signals->{QUIT} if $signals->{QUIT}; |
Branch: 1 branch
| Branch | True | False | Total |
| if $signals->{"QUIT"} |
0 |
0 |
0 |
|
| 190 |
0 |
▶ | local $SIG{TERM} = $signals->{TERM} if $signals->{TERM}; |
Branch: 1 branch
| Branch | True | False | Total |
| if $signals->{"TERM"} |
0 |
0 |
0 |
|
| 191 |
0 |
▶ | local $SIG{USR1} = $signals->{USR1} if $signals->{USR1}; |
Branch: 1 branch
| Branch | True | False | Total |
| if $signals->{"USR1"} |
0 |
0 |
0 |
|
| 192 |
0 |
▶ | local $SIG{USR2} = $signals->{USR2} if $signals->{USR2}; |
Branch: 1 branch
| Branch | True | False | Total |
| if $signals->{"USR2"} |
0 |
0 |
0 |
|
| 193 |
|
| |
| 194 |
0 |
| $self->loop->exercise($self); |
| 195 |
|
| |
| 196 |
0 |
| $self->destroy; |
| 197 |
|
| |
| 198 |
0 |
| $self->stopped(time); |
| 199 |
|
| |
| 200 |
0 |
| return $self; |
| 201 |
56 |
| } |
| 202 |
|
| |
| 203 |
0 |
▶ | method execute() { |
|
Subroutine
execute: not called CC=8 SCAR=42.8
Pod
documented
|
| 204 |
0 |
| $self->started(time); |
| 205 |
|
| |
| 206 |
0 |
| my $signals = $self->signals; |
| 207 |
|
| |
| 208 |
0 |
▶ | local $SIG{CHLD} = $signals->{CHLD} if $signals->{CHLD}; |
Branch: 1 branch
| Branch | True | False | Total |
| if $signals->{"CHLD"} |
0 |
0 |
0 |
|
| 209 |
0 |
▶ | local $SIG{HUP} = $signals->{HUP} if $signals->{HUP}; |
Branch: 1 branch
| Branch | True | False | Total |
| if $signals->{"HUP"} |
0 |
0 |
0 |
|
| 210 |
0 |
▶ | local $SIG{INT} = $signals->{INT} if $signals->{INT}; |
Branch: 1 branch
| Branch | True | False | Total |
| if $signals->{"INT"} |
0 |
0 |
0 |
|
| 211 |
0 |
▶ | local $SIG{QUIT} = $signals->{QUIT} if $signals->{QUIT}; |
Branch: 1 branch
| Branch | True | False | Total |
| if $signals->{"QUIT"} |
0 |
0 |
0 |
|
| 212 |
0 |
▶ | local $SIG{TERM} = $signals->{TERM} if $signals->{TERM}; |
Branch: 1 branch
| Branch | True | False | Total |
| if $signals->{"TERM"} |
0 |
0 |
0 |
|
| 213 |
0 |
▶ | local $SIG{USR1} = $signals->{USR1} if $signals->{USR1}; |
Branch: 1 branch
| Branch | True | False | Total |
| if $signals->{"USR1"} |
0 |
0 |
0 |
|
| 214 |
0 |
▶ | local $SIG{USR2} = $signals->{USR2} if $signals->{USR2}; |
Branch: 1 branch
| Branch | True | False | Total |
| if $signals->{"USR2"} |
0 |
0 |
0 |
|
| 215 |
|
| |
| 216 |
0 |
| $self->loop->execute($self); |
| 217 |
|
| |
| 218 |
0 |
| $self->destroy; |
| 219 |
|
| |
| 220 |
0 |
| $self->stopped(time); |
| 221 |
|
| |
| 222 |
0 |
| return $self; |
| 223 |
56 |
| } |
| 224 |
|
| |
| 225 |
0 |
▶ | method metadata() { |
|
Subroutine
metadata: not called CC=2 SCAR=17.9
Pod
documented
|
| 226 |
|
| { |
| 227 |
0 |
▶ | name => $self->name, |
Branch: 1 branch
| Branch | True | False | Total |
| $self->parent ? : |
0 |
0 |
0 |
|
| 228 |
|
| data => $self->data->term, |
| 229 |
|
| host => $self->app->host, |
| 230 |
|
| mailbox => $self->mailbox->term, |
| 231 |
|
| parent => ($self->parent ? $self->parent->pid : undef), |
| 232 |
|
| process => $self->pid, |
| 233 |
|
| tag => $self->tag, |
| 234 |
|
| } |
| 235 |
56 |
| } |
| 236 |
|
| |
| 237 |
0 |
▶ | method recv() { |
|
Subroutine
recv: not called CC=1 SCAR=6.9
Pod
documented
|
| 238 |
0 |
| return $self->mailbox->recv; |
| 239 |
56 |
| } |
| 240 |
|
| |
| 241 |
0 |
▶ | method reply(HashRef $mail, HashRef $data) { |
|
Subroutine
reply: not called CC=3 SCAR=24.8
Pod
documented
Branch: 2 branches
| Branch | True | False | Total |
| Ref::Util::XS::is_plain_hashref($mail) or Function::Parameters::_croak('In method reply: parameter 1 ($mail): ' . ${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 Type::Tiny; BEGIN {${^WARNING_BITS} = "\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' ),"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($mail)) |
0 |
0 |
0 |
| Ref::Util::XS::is_plain_hashref($data) or Function::Parameters::_croak('In method reply: parameter 2 ($data): ' . ${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 Type::Tiny; BEGIN {${^WARNING_BITS} = "\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' ),"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($data)) |
0 |
0 |
0 |
|
| 242 |
0 |
| return $self->mailbox->send($mail->{from}, $data); |
| 243 |
56 |
| } |
| 244 |
|
| |
| 245 |
0 |
▶ | method send(Mailbox | Process | Str $to, HashRef $data) { |
|
Subroutine
send: not called CC=6 SCAR=37.4
Pod
documented
Branch: 2 branches
| Branch | True | False | Total |
| ${my $v = bless( {"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/routines.pm","line" => 26,"package" => "routines"},"deprecated" => !!0,"name" => "__ANON__","type_constraints" => [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" => "Mailbox","exception_class" => "Error::TypeTiny::Assertion","name" => "Mailbox","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\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" => 71}, 'Type::Tiny' ),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" => "Process","exception_class" => "Error::TypeTiny::Assertion","name" => "Process","parent" => {},"uniq" => 75}, 'Type::Tiny' ),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" => {},"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" => 108}, 'Type::Tiny::Union' );$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"}{"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"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"parent"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"type_constraints"}[1]{"parent"} = $v->{"type_constraints"}[0]{"parent"};$v->{"type_constraints"}[2]{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[2];$v->{"type_constraints"}[2]{"compiled_type_constraint"} = $v->{"type_constraints"}[2]{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[2]{"parent"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[2]{"parent"};$v->{"type_constraints"}[2]{"parent"}{"compiled_type_constraint"} = $v->{"type_constraints"}[2]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[2]{"parent"}{"parent"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}; \$v}->check($to) or Function::Parameters::_croak('In method send: parameter 1 ($to): ' . ${my $v = bless( {"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/routines.pm","line" => 26,"package" => "routines"},"deprecated" => !!0,"name" => "__ANON__","type_constraints" => [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" => "Mailbox","exception_class" => "Error::TypeTiny::Assertion","name" => "Mailbox","parent" => bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\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" => 71}, 'Type::Tiny' ),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" => "Process","exception_class" => "Error::TypeTiny::Assertion","name" => "Process","parent" => {},"uniq" => 75}, 'Type::Tiny' ),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" => {},"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" => 108}, 'Type::Tiny::Union' );$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"}{"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"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"};$v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"parent"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"type_constraints"}[1]{"parent"} = $v->{"type_constraints"}[0]{"parent"};$v->{"type_constraints"}[2]{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[2];$v->{"type_constraints"}[2]{"compiled_type_constraint"} = $v->{"type_constraints"}[2]{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[2]{"parent"}{"coercion"}{"type_constraint"} = $v->{"type_constraints"}[2]{"parent"};$v->{"type_constraints"}[2]{"parent"}{"compiled_type_constraint"} = $v->{"type_constraints"}[2]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"type_constraints"}[2]{"parent"}{"parent"} = $v->{"type_constraints"}[0]{"parent"}{"parent"}{"parent"}; \$v}->get_message($to)) |
0 |
0 |
0 |
| Ref::Util::XS::is_plain_hashref($data) or Function::Parameters::_croak('In method send: parameter 2 ($data): ' . ${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 Type::Tiny; BEGIN {${^WARNING_BITS} = "\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' ),"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($data)) |
0 |
0 |
0 |
|
| 246 |
0 |
▶ | if (!ref $to) { |
Branch: 3 branches
| Branch | True | False | Total |
| if (not ref $to) { } |
0 |
0 |
0 |
| elsif ($to->isa('Zing::Mailbox')) { } |
0 |
0 |
0 |
| elsif ($to->isa('Zing::Process')) { } |
0 |
0 |
0 |
|
| 247 |
0 |
| return $self->mailbox->send($self->app->term($to)->mailbox, $data); |
| 248 |
|
| } |
| 249 |
|
| elsif ($to->isa('Zing::Mailbox')) { |
| 250 |
0 |
| return $self->mailbox->send($to->term, $data); |
| 251 |
|
| } |
| 252 |
|
| elsif ($to->isa('Zing::Process')) { |
| 253 |
0 |
| return $self->mailbox->send($to->mailbox->term, $data); |
| 254 |
|
| } |
| 255 |
|
| else { |
| 256 |
0 |
| return $self->mailbox->send($self->app->term($to)->mailbox, $data); |
| 257 |
|
| } |
| 258 |
56 |
| } |
| 259 |
|
| |
| 260 |
0 |
▶ | method ping(Int $pid) { |
|
Subroutine
ping: not called CC=2 SCAR=17.9
Pod
documented
Branch: 1 branch
| Branch | True | False | Total |
| Type::Tiny::XS::Int($pid) or Function::Parameters::_croak('In method ping: parameter 1 ($pid): ' . ${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_Int","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; /\A-?[0-9]+\z/;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 361,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Int","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" => "Int","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; defined $_[0] and not ref $_[0] and &Scalar::Util::looks_like_number($_[0]) or _failed_check(12, 'Num', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ($) { package Eval::TypeTiny::Sandbox; use strict; defined $_[0] and not ref $_[0] and &Scalar::Util::looks_like_number($_[0]);},"display_name" => "to_Num","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" => 344,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Num","exception_class" => "Error::TypeTiny::Assertion","library" => "Types::Standard","name" => "Num","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; defined $_[0] and not ref $_[0] and &Scalar::Util::looks_like_number($_[0]) or _failed_check(10, 'LaxNum', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_LaxNum","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; looks_like_number $_ and ref \$_ ne 'GLOB';},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 309,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "LaxNum","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; &$maybe_load_modules('Scalar::Util', 'Scalar::Util'->VERSION ge '1.18' ? "defined($_[1]) && !ref($_[1]) && Scalar::Util::looks_like_number($_[1])" : "defined($_[1]) && !ref($_[1]) && Scalar::Util::looks_like_number($_[1]) && ref(\\($_[1])) ne 'GLOB'");},"library" => "Types::Standard","name" => "LaxNum","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_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 Type::Tiny; BEGIN {${^WARNING_BITS} = "\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' ),"sorter" => sub { package Types::Standard; no warnings; use strict; $_[0] <=> $_[1];},"type_default" => sub { package Types::Standard; no warnings; use strict; return 0;},"uniq" => 10}, 'Type::Tiny' ),"uniq" => 12}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return 0;},"uniq" => 13}, '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"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"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->{"parent"}{"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->{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($pid)) |
0 |
0 |
0 |
|
| 261 |
0 |
| return _kill 0, $pid; |
| 262 |
56 |
| } |
| 263 |
|
| |
| 264 |
0 |
▶ | method shutdown() { |
|
Subroutine
shutdown: not called CC=1 SCAR=6.9
Pod
documented
|
| 265 |
0 |
| $self->loop->stop(1); |
| 266 |
|
| |
| 267 |
0 |
| return $self; |
| 268 |
56 |
| } |
| 269 |
|
| |
| 270 |
0 |
▶ | method signal(Int $pid, Str $type = 'kill') { |
|
Subroutine
signal: not called CC=4 SCAR=30.0
Branch: 3 branches
| Branch | True | False | Total |
| @_ < 2 and $type = "kill" |
0 |
0 |
0 |
| Type::Tiny::XS::Int($pid) or Function::Parameters::_croak('In method signal: parameter 1 ($pid): ' . ${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_Int","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; /\A-?[0-9]+\z/;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 361,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Int","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" => "Int","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; defined $_[0] and not ref $_[0] and &Scalar::Util::looks_like_number($_[0]) or _failed_check(12, 'Num', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ($) { package Eval::TypeTiny::Sandbox; use strict; defined $_[0] and not ref $_[0] and &Scalar::Util::looks_like_number($_[0]);},"display_name" => "to_Num","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" => 344,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Num","exception_class" => "Error::TypeTiny::Assertion","library" => "Types::Standard","name" => "Num","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; defined $_[0] and not ref $_[0] and &Scalar::Util::looks_like_number($_[0]) or _failed_check(10, 'LaxNum', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_LaxNum","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; looks_like_number $_ and ref \$_ ne 'GLOB';},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 309,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "LaxNum","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; &$maybe_load_modules('Scalar::Util', 'Scalar::Util'->VERSION ge '1.18' ? "defined($_[1]) && !ref($_[1]) && Scalar::Util::looks_like_number($_[1])" : "defined($_[1]) && !ref($_[1]) && Scalar::Util::looks_like_number($_[1]) && ref(\\($_[1])) ne 'GLOB'");},"library" => "Types::Standard","name" => "LaxNum","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_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 Type::Tiny; BEGIN {${^WARNING_BITS} = "\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' ),"sorter" => sub { package Types::Standard; no warnings; use strict; $_[0] <=> $_[1];},"type_default" => sub { package Types::Standard; no warnings; use strict; return 0;},"uniq" => 10}, 'Type::Tiny' ),"uniq" => 12}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return 0;},"uniq" => 13}, '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"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parent"}{"parent"};$v->{"parent"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"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->{"parent"}{"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->{"parent"}{"constraint"};$v->{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parent"}{"parent"}{"parent"}{"parent"}{"complementary_type"}{"parent"}; \$v}->get_message($pid)) |
0 |
0 |
0 |
| Type::Tiny::XS::Str($type) or Function::Parameters::_croak('In method signal: parameter 2 ($type): ' . ${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($type)) |
0 |
0 |
0 |
|
| 271 |
0 |
| return _kill uc($type), $pid; |
| 272 |
56 |
| } |
| 273 |
|
| |
| 274 |
0 |
▶ | method spawn(Scheme $scheme) { |
|
Subroutine
spawn: not called CC=4 SCAR=30.0
Pod
documented
Branch: 1 branch
| Branch | True | False | Total |
| Type::Tiny::XS::AUTO::TC4($scheme) or Function::Parameters::_croak('In method spawn: parameter 1 ($scheme): ' . ${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 ;,"constraint" => sub { package Type::Tiny; use warnings; use strict; !0;},"definition_context" => {"file" => "/home/cpancover/.cpan/build/Zing-0.26-0/blib/lib/Zing/Types.pm","line" => 232,"package" => "Zing::Types"},"deprecated" => !!0,"display_name" => "Scheme","exception_class" => "Error::TypeTiny::Assertion","library" => "Zing::Types","name" => "Scheme","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/Zing-0.26-0/blib/lib/Zing/Types.pm","line" => 232,"package" => "Zing::Types"},"deprecated" => !!0,"display_name" => "Tuple[Str,ArrayRef,Int]","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( {"_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" => 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 Type::Tiny; BEGIN {${^WARNING_BITS} = "\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' ),bless( {"_is_core" => 1,"_overload_coderef" => sub { package Type::Tiny; BEGIN {${^WARNING_BITS} = "\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' ),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_Int","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; /\A-?[0-9]+\z/;},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 361,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Int","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" => "Int","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; defined $_[0] and not ref $_[0] and &Scalar::Util::looks_like_number($_[0]) or _failed_check(12, 'Num', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => sub ($) { package Eval::TypeTiny::Sandbox; use strict; defined $_[0] and not ref $_[0] and &Scalar::Util::looks_like_number($_[0]);},"display_name" => "to_Num","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" => 344,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "Num","exception_class" => "Error::TypeTiny::Assertion","library" => "Types::Standard","name" => "Num","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; defined $_[0] and not ref $_[0] and &Scalar::Util::looks_like_number($_[0]) or _failed_check(10, 'LaxNum', $_[0], 'exception_class', 'Error::TypeTiny::Assertion'); $_[0];},"_overrides_assert_return" => !!0,"coercion" => bless( {"_compiled_type_constraint_check" => do{my $o},"display_name" => "to_LaxNum","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; looks_like_number $_ and ref \$_ ne 'GLOB';},"definition_context" => {"file" => "/usr/local/lib/perl5/site_perl/5.44.0/Types/Standard.pm","line" => 309,"package" => "Types::Standard"},"deprecated" => !!0,"display_name" => "LaxNum","exception_class" => "Error::TypeTiny::Assertion","inlined" => sub { package Types::Standard; no warnings; use strict; &$maybe_load_modules('Scalar::Util', 'Scalar::Util'->VERSION ge '1.18' ? "defined($_[1]) && !ref($_[1]) && Scalar::Util::looks_like_number($_[1])" : "defined($_[1]) && !ref($_[1]) && Scalar::Util::looks_like_number($_[1]) && ref(\\($_[1])) ne 'GLOB'");},"library" => "Types::Standard","name" => "LaxNum","parent" => {},"sorter" => sub { package Types::Standard; no warnings; use strict; $_[0] <=> $_[1];},"type_default" => sub { package Types::Standard; no warnings; use strict; return 0;},"uniq" => 10}, 'Type::Tiny' ),"uniq" => 12}, 'Type::Tiny' ),"type_default" => sub { package Types::Standard; no warnings; use strict; return 0;},"uniq" => 13}, '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" => 85}, 'Type::Tiny' ),"uniq" => 86}, 'Type::Tiny' );$v->{"parent"}{"compiled_type_constraint"} = $v->{"compiled_type_constraint"};$v->{"parent"}{"parameters"}[0]{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[0];$v->{"parent"}{"parameters"}[0]{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[0]{"coercion"}{"_compiled_type_constraint_check"};$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"}{"complementary_type"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"};$v->{"parent"}{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"complementary_type"} = $v->{"parent"}{"parameters"}[0]{"parent"}{"parent"};$v->{"parent"}{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"constraint"} = $v->{"constraint"};$v->{"parent"}{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"};$v->{"parent"}{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"}{"parent"}{"constraint"} = $v->{"constraint"};$v->{"parent"}{"parameters"}[0]{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parameters"}[0]{"parent"}{"parent"}{"complementary_type"}{"parent"};$v->{"parent"}{"parameters"}[1]{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[1];$v->{"parent"}{"parameters"}[1]{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[1]{"coercion"}{"_compiled_type_constraint_check"};$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"}{"parent"} = $v->{"parent"}{"parameters"}[0]{"parent"}{"parent"};$v->{"parent"}{"parameters"}[2]{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[2];$v->{"parent"}{"parameters"}[2]{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[2]{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[2]{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[2]{"parent"};$v->{"parent"}{"parameters"}[2]{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[2]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[2]{"parent"}{"constraint"} = $v->{"constraint"};$v->{"parent"}{"parameters"}[2]{"parent"}{"parent"}{"coercion"}{"_compiled_type_constraint_check"} = $v->{"parent"}{"parameters"}[2]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[2]{"parent"}{"parent"}{"coercion"}{"type_constraint"} = $v->{"parent"}{"parameters"}[2]{"parent"}{"parent"};$v->{"parent"}{"parameters"}[2]{"parent"}{"parent"}{"compiled_type_constraint"} = $v->{"parent"}{"parameters"}[2]{"parent"}{"coercion"}{"_compiled_type_constraint_check"};$v->{"parent"}{"parameters"}[2]{"parent"}{"parent"}{"parent"} = $v->{"parent"}{"parameters"}[0];$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"}[1]; \$v}->get_message($scheme)) |
0 |
0 |
0 |
|
| 275 |
0 |
| my $size = $scheme->[2]; |
| 276 |
0 |
| my $fork = $self->app->fork(parent => $self, scheme => $scheme); |
| 277 |
|
| |
| 278 |
0 |
| $SIG{CHLD} = 'IGNORE'; |
| 279 |
|
| |
| 280 |
0 |
▶ | $fork->execute for 1..($size || 1); |
|
|
| 281 |
|
| |
| 282 |
0 |
| return $fork; |
| 283 |
56 |
| } |
| 284 |
|
| |
| 285 |
0 |
▶ | method term() { |
|
Subroutine
term: not called CC=1 SCAR=6.9
Pod
documented
|
| 286 |
0 |
| return $self->app->term($self)->process; |
| 287 |
56 |
| } |
| 288 |
|
| |
| 289 |
0 |
▶ | method winddown() { |
|
Subroutine
winddown: not called CC=1 SCAR=6.9
Pod
documented
|
| 290 |
0 |
| $self->loop->last(1); |
| 291 |
|
| |
| 292 |
0 |
| return $self; |
| 293 |
56 |
| } |
| 294 |
|
| |
| 295 |
56 |
| 1; |
| 296 |
|
| |
| 297 |
|
| =encoding utf8 |
| 298 |
|
| |
| 299 |
|
| =head1 NAME |
| 300 |
|
| |
| 301 |
|
| Zing::Process - Processing Unit |
| 302 |
|
| |
| 303 |
|
| =cut |
| 304 |
|
| |
| 305 |
|
| =head1 ABSTRACT |
| 306 |
|
| |
| 307 |
|
| Processing Unit and Actor Abstraction |
| 308 |
|
| |
| 309 |
|
| =cut |
| 310 |
|
| |
| 311 |
|
| =head1 SYNOPSIS |
| 312 |
|
| |
| 313 |
|
| use Zing::Process; |
| 314 |
|
| |
| 315 |
|
| my $process = Zing::Process->new; |
| 316 |
|
| |
| 317 |
|
| # $process->execute; |
| 318 |
|
| |
| 319 |
|
| =cut |
| 320 |
|
| |
| 321 |
|
| =head1 DESCRIPTION |
| 322 |
|
| |
| 323 |
|
| This package provides an actor abstraction which serve as a cooperative |
| 324 |
|
| concurrent computational unit in an actor-model architecture. |
| 325 |
|
| |
| 326 |
|
| =cut |
| 327 |
|
| |
| 328 |
|
| =head1 LIBRARIES |
| 329 |
|
| |
| 330 |
|
| This package uses type constraints from: |
| 331 |
|
| |
| 332 |
|
| L<Zing::Types> |
| 333 |
|
| |
| 334 |
|
| =cut |
| 335 |
|
| |
| 336 |
|
| =head1 ATTRIBUTES |
| 337 |
|
| |
| 338 |
|
| This package has the following attributes: |
| 339 |
|
| |
| 340 |
|
| =cut |
| 341 |
|
| |
| 342 |
|
| =head2 cleanup |
| 343 |
|
| |
| 344 |
|
| cleanup(Str) |
| 345 |
|
| |
| 346 |
|
| This attribute is read-only, accepts C<(Str)> values, and is optional. |
| 347 |
|
| |
| 348 |
|
| =cut |
| 349 |
|
| |
| 350 |
|
| =head2 data |
| 351 |
|
| |
| 352 |
|
| data(Data) |
| 353 |
|
| |
| 354 |
|
| This attribute is read-only, accepts C<(Data)> values, and is optional. |
| 355 |
|
| |
| 356 |
|
| =cut |
| 357 |
|
| |
| 358 |
|
| =head2 journal |
| 359 |
|
| |
| 360 |
|
| journal(Channel) |
| 361 |
|
| |
| 362 |
|
| This attribute is read-only, accepts C<(Channel)> values, and is optional. |
| 363 |
|
| |
| 364 |
|
| =cut |
| 365 |
|
| |
| 366 |
|
| =head2 log |
| 367 |
|
| |
| 368 |
|
| log(Logger) |
| 369 |
|
| |
| 370 |
|
| This attribute is read-only, accepts C<(Logger)> values, and is optional. |
| 371 |
|
| |
| 372 |
|
| =cut |
| 373 |
|
| |
| 374 |
|
| =head2 logic |
| 375 |
|
| |
| 376 |
|
| logic(Logic) |
| 377 |
|
| |
| 378 |
|
| This attribute is read-only, accepts C<(Logic)> values, and is optional. |
| 379 |
|
| |
| 380 |
|
| =cut |
| 381 |
|
| |
| 382 |
|
| =head2 loop |
| 383 |
|
| |
| 384 |
|
| loop(Loop) |
| 385 |
|
| |
| 386 |
|
| This attribute is read-only, accepts C<(Loop)> values, and is optional. |
| 387 |
|
| |
| 388 |
|
| =cut |
| 389 |
|
| |
| 390 |
|
| =head2 mailbox |
| 391 |
|
| |
| 392 |
|
| mailbox(Mailbox) |
| 393 |
|
| |
| 394 |
|
| This attribute is read-only, accepts C<(Mailbox)> values, and is optional. |
| 395 |
|
| |
| 396 |
|
| =cut |
| 397 |
|
| |
| 398 |
|
| =head2 meta |
| 399 |
|
| |
| 400 |
|
| meta(Meta) |
| 401 |
|
| |
| 402 |
|
| This attribute is read-only, accepts C<(Meta)> values, and is optional. |
| 403 |
|
| |
| 404 |
|
| =cut |
| 405 |
|
| |
| 406 |
|
| =head2 name |
| 407 |
|
| |
| 408 |
|
| name(Name) |
| 409 |
|
| |
| 410 |
|
| This attribute is read-only, accepts C<(Name)> values, and is optional. |
| 411 |
|
| |
| 412 |
|
| =cut |
| 413 |
|
| |
| 414 |
|
| =head2 parent |
| 415 |
|
| |
| 416 |
|
| parent(Maybe[Process]) |
| 417 |
|
| |
| 418 |
|
| This attribute is read-only, accepts C<(Maybe[Process])> values, and is optional. |
| 419 |
|
| |
| 420 |
|
| =cut |
| 421 |
|
| |
| 422 |
|
| =head2 pid |
| 423 |
|
| |
| 424 |
|
| pid(Int) |
| 425 |
|
| |
| 426 |
|
| This attribute is read-only, accepts C<(Int)> values, and is optional. |
| 427 |
|
| |
| 428 |
|
| =cut |
| 429 |
|
| |
| 430 |
|
| =head2 signals |
| 431 |
|
| |
| 432 |
|
| signals(HashRef[Str|CodeRef]) |
| 433 |
|
| |
| 434 |
|
| This attribute is read-only, accepts C<(HashRef[Str|CodeRef])> values, and is optional. |
| 435 |
|
| |
| 436 |
|
| =cut |
| 437 |
|
| |
| 438 |
|
| =head2 started |
| 439 |
|
| |
| 440 |
|
| started(Int) |
| 441 |
|
| |
| 442 |
|
| This attribute is read-only, accepts C<(Int)> values, and is optional. |
| 443 |
|
| |
| 444 |
|
| =cut |
| 445 |
|
| |
| 446 |
|
| =head2 stopped |
| 447 |
|
| |
| 448 |
|
| stopped(Int) |
| 449 |
|
| |
| 450 |
|
| This attribute is read-only, accepts C<(Int)> values, and is optional. |
| 451 |
|
| |
| 452 |
|
| =cut |
| 453 |
|
| |
| 454 |
|
| =head2 tag |
| 455 |
|
| |
| 456 |
|
| tag(Str) |
| 457 |
|
| |
| 458 |
|
| This attribute is read-only, accepts C<(Str)> values, and is optional. |
| 459 |
|
| |
| 460 |
|
| =cut |
| 461 |
|
| |
| 462 |
|
| =head1 METHODS |
| 463 |
|
| |
| 464 |
|
| This package implements the following methods: |
| 465 |
|
| |
| 466 |
|
| =cut |
| 467 |
|
| |
| 468 |
|
| =head2 defer |
| 469 |
|
| |
| 470 |
|
| defer(HashRef $data) : Object |
| 471 |
|
| |
| 472 |
|
| The defer method allows a process to sends a message to itself for later |
| 473 |
|
| processing. |
| 474 |
|
| |
| 475 |
|
| =over 4 |
| 476 |
|
| |
| 477 |
|
| =item defer example #1 |
| 478 |
|
| |
| 479 |
|
| # given: synopsis |
| 480 |
|
| |
| 481 |
|
| $process->defer({ task => { launch => time } }); |
| 482 |
|
| |
| 483 |
|
| =back |
| 484 |
|
| |
| 485 |
|
| =cut |
| 486 |
|
| |
| 487 |
|
| =head2 destroy |
| 488 |
|
| |
| 489 |
|
| destroy() : Object |
| 490 |
|
| |
| 491 |
|
| The destroy method de-registers the process and drops the process-specific data |
| 492 |
|
| stores. |
| 493 |
|
| |
| 494 |
|
| =over 4 |
| 495 |
|
| |
| 496 |
|
| =item destroy example #1 |
| 497 |
|
| |
| 498 |
|
| # given: synopsis |
| 499 |
|
| |
| 500 |
|
| $process->destroy; |
| 501 |
|
| |
| 502 |
|
| =back |
| 503 |
|
| |
| 504 |
|
| =cut |
| 505 |
|
| |
| 506 |
|
| =head2 execute |
| 507 |
|
| |
| 508 |
|
| execute() : Object |
| 509 |
|
| |
| 510 |
|
| The execute method executes the process event-loop indefinitely. |
| 511 |
|
| |
| 512 |
|
| =over 4 |
| 513 |
|
| |
| 514 |
|
| =item execute example #1 |
| 515 |
|
| |
| 516 |
|
| # given: synopsis |
| 517 |
|
| |
| 518 |
|
| $process->execute; |
| 519 |
|
| |
| 520 |
|
| =back |
| 521 |
|
| |
| 522 |
|
| =cut |
| 523 |
|
| |
| 524 |
|
| =head2 exercise |
| 525 |
|
| |
| 526 |
|
| exercise() : Object |
| 527 |
|
| |
| 528 |
|
| The exercise method executes the event-loop but stops after one iteration. |
| 529 |
|
| |
| 530 |
|
| =over 4 |
| 531 |
|
| |
| 532 |
|
| =item exercise example #1 |
| 533 |
|
| |
| 534 |
|
| # given: synopsis |
| 535 |
|
| |
| 536 |
|
| $process->exercise; |
| 537 |
|
| |
| 538 |
|
| =back |
| 539 |
|
| |
| 540 |
|
| =cut |
| 541 |
|
| |
| 542 |
|
| =head2 metadata |
| 543 |
|
| |
| 544 |
|
| metadata() : HashRef |
| 545 |
|
| |
| 546 |
|
| The metadata method returns metadata specific to the process. |
| 547 |
|
| |
| 548 |
|
| =over 4 |
| 549 |
|
| |
| 550 |
|
| =item metadata example #1 |
| 551 |
|
| |
| 552 |
|
| # given: synopsis |
| 553 |
|
| |
| 554 |
|
| $process->metadata; |
| 555 |
|
| |
| 556 |
|
| =back |
| 557 |
|
| |
| 558 |
|
| =cut |
| 559 |
|
| |
| 560 |
|
| =head2 ping |
| 561 |
|
| |
| 562 |
|
| ping(Int $pid) : Bool |
| 563 |
|
| |
| 564 |
|
| The ping method returns truthy if the process of the PID provided is active. |
| 565 |
|
| |
| 566 |
|
| =over 4 |
| 567 |
|
| |
| 568 |
|
| =item ping example #1 |
| 569 |
|
| |
| 570 |
|
| # given: synopsis |
| 571 |
|
| |
| 572 |
|
| $process->ping(12345); |
| 573 |
|
| |
| 574 |
|
| =back |
| 575 |
|
| |
| 576 |
|
| =cut |
| 577 |
|
| |
| 578 |
|
| =head2 recv |
| 579 |
|
| |
| 580 |
|
| recv() : Maybe[HashRef] |
| 581 |
|
| |
| 582 |
|
| The recv method is a proxy for L<Zing::Mailbox/recv> and receives a single new |
| 583 |
|
| message from the mailbox. |
| 584 |
|
| |
| 585 |
|
| =over 4 |
| 586 |
|
| |
| 587 |
|
| =item recv example #1 |
| 588 |
|
| |
| 589 |
|
| # given: synopsis |
| 590 |
|
| |
| 591 |
|
| $process->recv; |
| 592 |
|
| |
| 593 |
|
| =back |
| 594 |
|
| |
| 595 |
|
| =over 4 |
| 596 |
|
| |
| 597 |
|
| =item recv example #2 |
| 598 |
|
| |
| 599 |
|
| # given: synopsis |
| 600 |
|
| |
| 601 |
|
| my $peer = Zing::Process->new; |
| 602 |
|
| |
| 603 |
|
| $peer->send($process, { note => 'ehlo' }); |
| 604 |
|
| |
| 605 |
|
| $process->recv; |
| 606 |
|
| |
| 607 |
|
| =back |
| 608 |
|
| |
| 609 |
|
| =cut |
| 610 |
|
| |
| 611 |
|
| =head2 reply |
| 612 |
|
| |
| 613 |
|
| reply(HashRef $bag, HashRef $value) : Int |
| 614 |
|
| |
| 615 |
|
| The reply method is a proxy for L<Zing::Mailbox/reply> and sends a message to |
| 616 |
|
| the mailbox represented by the C<$bag> received. |
| 617 |
|
| |
| 618 |
|
| =over 4 |
| 619 |
|
| |
| 620 |
|
| =item reply example #1 |
| 621 |
|
| |
| 622 |
|
| # given: synopsis |
| 623 |
|
| |
| 624 |
|
| my $peer = Zing::Process->new; |
| 625 |
|
| |
| 626 |
|
| $peer->send($process, { note => 'ehlo' }); |
| 627 |
|
| |
| 628 |
|
| my $mail = $process->recv; |
| 629 |
|
| |
| 630 |
|
| $process->reply($mail, { note => 'helo' }); |
| 631 |
|
| |
| 632 |
|
| =back |
| 633 |
|
| |
| 634 |
|
| =cut |
| 635 |
|
| |
| 636 |
|
| =head2 send |
| 637 |
|
| |
| 638 |
|
| send(Mailbox | Process | Str $to, HashRef $data) : Int |
| 639 |
|
| |
| 640 |
|
| The send method is a proxy for L<Zing::Mailbox/send> and sends a new message to |
| 641 |
|
| the mailbox specified. |
| 642 |
|
| |
| 643 |
|
| =over 4 |
| 644 |
|
| |
| 645 |
|
| =item send example #1 |
| 646 |
|
| |
| 647 |
|
| # given: synopsis |
| 648 |
|
| |
| 649 |
|
| my $peer = Zing::Process->new; |
| 650 |
|
| |
| 651 |
|
| $process->send($peer, { note => 'invite' }); |
| 652 |
|
| |
| 653 |
|
| =back |
| 654 |
|
| |
| 655 |
|
| =over 4 |
| 656 |
|
| |
| 657 |
|
| =item send example #2 |
| 658 |
|
| |
| 659 |
|
| # given: synopsis |
| 660 |
|
| |
| 661 |
|
| my $peer = Zing::Process->new; |
| 662 |
|
| |
| 663 |
|
| $process->send($peer->mailbox, { note => 'invite' }); |
| 664 |
|
| |
| 665 |
|
| =back |
| 666 |
|
| |
| 667 |
|
| =over 4 |
| 668 |
|
| |
| 669 |
|
| =item send example #3 |
| 670 |
|
| |
| 671 |
|
| # given: synopsis |
| 672 |
|
| |
| 673 |
|
| my $peer = Zing::Process->new; |
| 674 |
|
| |
| 675 |
|
| $process->send($peer->mailbox->term, { note => 'invite' }); |
| 676 |
|
| |
| 677 |
|
| =back |
| 678 |
|
| |
| 679 |
|
| =cut |
| 680 |
|
| |
| 681 |
|
| =head2 shutdown |
| 682 |
|
| |
| 683 |
|
| shutdown() : Object |
| 684 |
|
| |
| 685 |
|
| The shutdown method haults the process event-loop immediately. |
| 686 |
|
| |
| 687 |
|
| =over 4 |
| 688 |
|
| |
| 689 |
|
| =item shutdown example #1 |
| 690 |
|
| |
| 691 |
|
| # given: synopsis |
| 692 |
|
| |
| 693 |
|
| $process->shutdown; |
| 694 |
|
| |
| 695 |
|
| =back |
| 696 |
|
| |
| 697 |
|
| =cut |
| 698 |
|
| |
| 699 |
|
| =head2 signal |
| 700 |
|
| |
| 701 |
|
| signal(Int $pid, Str $type = 'kill') : Int |
| 702 |
|
| |
| 703 |
|
| The signal method sends a C<kill> signal to the process of the PID provided. |
| 704 |
|
| |
| 705 |
|
| =over 4 |
| 706 |
|
| |
| 707 |
|
| =item signal example #1 |
| 708 |
|
| |
| 709 |
|
| # given: synopsis |
| 710 |
|
| |
| 711 |
|
| $process->signal(12345); |
| 712 |
|
| |
| 713 |
|
| =back |
| 714 |
|
| |
| 715 |
|
| =over 4 |
| 716 |
|
| |
| 717 |
|
| =item signal example #2 |
| 718 |
|
| |
| 719 |
|
| # given: synopsis |
| 720 |
|
| |
| 721 |
|
| $process->signal(12345, 'term'); |
| 722 |
|
| |
| 723 |
|
| =back |
| 724 |
|
| |
| 725 |
|
| =cut |
| 726 |
|
| |
| 727 |
|
| =head2 spawn |
| 728 |
|
| |
| 729 |
|
| spawn(Scheme $scheme) : Fork |
| 730 |
|
| |
| 731 |
|
| The spawn method forks a scheme and returns a L<Zing::Fork> handler. |
| 732 |
|
| |
| 733 |
|
| =over 4 |
| 734 |
|
| |
| 735 |
|
| =item spawn example #1 |
| 736 |
|
| |
| 737 |
|
| # given: synopsis |
| 738 |
|
| |
| 739 |
|
| $process->spawn(['MyApp', [], 1]); |
| 740 |
|
| |
| 741 |
|
| =back |
| 742 |
|
| |
| 743 |
|
| =cut |
| 744 |
|
| |
| 745 |
|
| =head2 term |
| 746 |
|
| |
| 747 |
|
| term() : Str |
| 748 |
|
| |
| 749 |
|
| The term method generates a term (safe string) for the datastore. |
| 750 |
|
| |
| 751 |
|
| =over 4 |
| 752 |
|
| |
| 753 |
|
| =item term example #1 |
| 754 |
|
| |
| 755 |
|
| # given: synopsis |
| 756 |
|
| |
| 757 |
|
| $process->term; |
| 758 |
|
| |
| 759 |
|
| =back |
| 760 |
|
| |
| 761 |
|
| =cut |
| 762 |
|
| |
| 763 |
|
| =head2 winddown |
| 764 |
|
| |
| 765 |
|
| winddown() : Object |
| 766 |
|
| |
| 767 |
|
| The winddown method haults the process event-loop after the current iteration. |
| 768 |
|
| |
| 769 |
|
| =over 4 |
| 770 |
|
| |
| 771 |
|
| =item winddown example #1 |
| 772 |
|
| |
| 773 |
|
| # given: synopsis |
| 774 |
|
| |
| 775 |
|
| $process->winddown; |
| 776 |
|
| |
| 777 |
|
| =back |
| 778 |
|
| |
| 779 |
|
| =cut |
| 780 |
|
| |
| 781 |
|
| =head1 AUTHOR |
| 782 |
|
| |
| 783 |
|
| Al Newkirk, C<awncorp@cpan.org> |
| 784 |
|
| |
| 785 |
|
| =head1 LICENSE |
| 786 |
|
| |
| 787 |
|
| Copyright (C) 2011-2019, Al Newkirk, et al. |
| 788 |
|
| |
| 789 |
|
| This is free software; you can redistribute it and/or modify it under the terms |
| 790 |
|
| of the The Apache License, Version 2.0, as elucidated in the L<"license |
| 791 |
|
| file"|https://github.com/iamalnewkirk/zing/blob/master/LICENSE>. |
| 792 |
|
| |
| 793 |
|
| =head1 PROJECT |
| 794 |
|
| |
| 795 |
|
| L<Wiki|https://github.com/iamalnewkirk/zing/wiki> |
| 796 |
|
| |
| 797 |
|
| L<Project|https://github.com/iamalnewkirk/zing> |
| 798 |
|
| |
| 799 |
|
| L<Initiatives|https://github.com/iamalnewkirk/zing/projects> |
| 800 |
|
| |
| 801 |
|
| L<Milestones|https://github.com/iamalnewkirk/zing/milestones> |
| 802 |
|
| |
| 803 |
|
| L<Contributing|https://github.com/iamalnewkirk/zing/blob/master/CONTRIBUTE.md> |
| 804 |
|
| |
| 805 |
|
| L<Issues|https://github.com/iamalnewkirk/zing/issues> |
| 806 |
|
| |
| 807 |
|
| =cut |