)->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);
use strictures 1;
use Test::More;
+use Sys::Hostname qw(hostname);
use Object::Remote::Connector::Local;
use Object::Remote;
is($x, 1, "Callback called callback");
+is(
+ $connection->get_remote_sub('Sys::Hostname::hostname')->(),
+ hostname(),
+ 'Remote sub call ok'
+);
+
done_testing;