my $code_container = $self->_id_to_remote_object(@_);
sub { $code_container->call(@_) };
}
+ )->filter_json_single_key_object(
+ __scalar_ref__ => sub {
+ my $value = shift;
+ return \$value;
+ }
);
}
my ($self, $type, @call) = @_;
my $future = CPS::Future->new;
+ my $remote = $self->remote_objects_by_id->{$call[0]};
unshift @call, $type => $self->_local_object_to_id($future);
my $outstanding = $self->outstanding_futures;
$outstanding->{$future} = $future;
- $future->on_ready(sub { delete $outstanding->{$future} });
+ $future->on_ready(sub {
+ undef($remote);
+ delete $outstanding->{$future}
+ });
$self->_send(\@call);
Object::Remote::CodeContainer->new(code => $data)
);
return +{ __remote_code__ => $id };
+ } elsif ($ref eq 'SCALAR') {
+ return +{ __scalar_ref__ => $$data };
} else {
die "Can't collapse reftype $ref";
}
}
1;
+
+=head1 NAME
+
+Object::Remote::Connection - An underlying connection for L<Object::Remote>
+
+=head1 LAME
+
+Shipping prioritised over writing this part up. Blame mst.
+
+=cut