X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit%2FObject-Remote.git;a=blobdiff_plain;f=lib%2FObject%2FRemote%2FConnection.pm;h=d64a8dd41959764da3841ea1bfff8c87604051b1;hp=3b4adfc70bd285a4f5bfa2656d3043ca03713aea;hb=783105c4013747147c7195f043961af40b9908b7;hpb=de9062cfef7f98d0efc01b114328959f2f84ada4 diff --git a/lib/Object/Remote/Connection.pm b/lib/Object/Remote/Connection.pm index 3b4adfc..d64a8dd 100644 --- a/lib/Object/Remote/Connection.pm +++ b/lib/Object/Remote/Connection.pm @@ -15,8 +15,9 @@ use POSIX ":sys_wait_h"; use Module::Runtime qw(use_module); use Scalar::Util qw(weaken blessed refaddr openhandle); use JSON::PP qw(encode_json); -use Moo; +use Future; use Carp qw(croak); +use Moo; BEGIN { router()->exclude_forwarding } @@ -58,7 +59,7 @@ has read_channel => ( ); has on_close => ( - is => 'rw', default => sub { $_[0]->_install_future_handlers(CPS::Future->new) }, + is => 'rw', default => sub { $_[0]->_install_future_handlers(Future->new) }, trigger => sub { log_trace { "Installing handlers into future via trigger" }; $_[0]->_install_future_handlers($_[1]) @@ -212,7 +213,7 @@ sub _build__json { tie @tied_array, 'Object::Remote::Tied', $self->_id_to_remote_object(@_); return \@tied_array; } - ); + ); } sub _load_if_possible { @@ -324,7 +325,7 @@ sub send_free { sub send { my ($self, $type, @call) = @_; - my $future = CPS::Future->new; + my $future = Future->new; my $remote = $self->remote_objects_by_id->{$call[0]}; unshift @call, $type => $self->_local_object_to_id($future);