Commit | Line | Data |
9e72f0cf |
1 | package Object::Remote; |
2 | |
3 | use Object::Remote::MiniLoop; |
676438a1 |
4 | use Object::Remote::Handle; |
e144d525 |
5 | use Module::Runtime qw(use_module); |
9e72f0cf |
6 | |
84b04178 |
7 | sub new::on { |
8 | my ($class, $on, @args) = @_; |
e144d525 |
9 | my $conn = use_module('Object::Remote::Connection')->new_from_spec($on); |
10 | return $conn->new_remote(class => $class, args => \@args); |
84b04178 |
11 | } |
12 | |
676438a1 |
13 | sub new { |
14 | shift; |
15 | Object::Remote::Handle->new(@_)->proxy; |
9e72f0cf |
16 | } |
17 | |
18 | sub current_loop { |
19 | our $Current_Loop ||= Object::Remote::MiniLoop->new |
20 | } |
21 | |
9e72f0cf |
22 | 1; |