X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FObject%2FRemote.pm;h=cd3a36489ba39a5f205c8222f69e8cf495c88be0;hb=b63a955fda065430b5e0e2c37b07ba292ecc7e28;hp=35f5c03171939e2eb9af24dc994e7f1362de2426;hpb=9d804009b5363c739598a9cc4507df57a2d59c55;p=scpubgit%2FObject-Remote.git diff --git a/lib/Object/Remote.pm b/lib/Object/Remote.pm index 35f5c03..cd3a364 100644 --- a/lib/Object/Remote.pm +++ b/lib/Object/Remote.pm @@ -9,10 +9,8 @@ has connection => (is => 'ro', required => 1); has id => (is => 'rwp'); -has proxy => (is => 'lazy', weak_ref => 1); - -sub _build_proxy { - bless({ remote => $_[0] }, 'Object::Remote::Proxy'); +sub proxy { + bless({ remote => $_[0], method => 'call' }, 'Object::Remote::Proxy'); } sub BUILD { @@ -40,6 +38,11 @@ sub call { $self->_await($self->connection->send(call => $self->id, $method, @args)); } +sub call_discard { + my ($self, $method, @args) = @_; + $self->connection->send_discard(call => $self->id, $method, @args); +} + sub _await { my ($self, $future) = @_; my $loop = $self->current_loop;