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=3e35d53a605d3b1ab11d299d1646530b7551a7ce;hp=a5ad3021563fac8e1f74aa09a08c15122cab48df;hb=c6fe6fbd88a05e860ecdc8942cb86940915172ed;hpb=82964de1dc8f9d772069de31db1d62dcb90af1a7 diff --git a/lib/Object/Remote/Connection.pm b/lib/Object/Remote/Connection.pm index a5ad302..3e35d53 100644 --- a/lib/Object/Remote/Connection.pm +++ b/lib/Object/Remote/Connection.pm @@ -106,6 +106,12 @@ sub new_remote { )->proxy; } +sub get_remote_sub { + my ($self, $sub) = @_; + my ($pkg, $name) = $sub =~ m/^(.*)::([^:]+)$/; + return await_future($self->send(class_call => $pkg, 0, can => $name)); +} + sub register_remote { my ($self, $remote) = @_; weaken($self->remote_objects_by_id->{$remote->id} = $remote);