X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FObject%2FRemote.pm;h=6cfb9bbef1f18c24d3f1760b1bb061dd637d8a83;hb=c6fe6fbd88a05e860ecdc8942cb86940915172ed;hp=47f2906e088cc1806353c7f3431f17df8df70170;hpb=676438a11cbf6bd49102369824c9d87f70964fd3;p=scpubgit%2FObject-Remote.git diff --git a/lib/Object/Remote.pm b/lib/Object/Remote.pm index 47f2906..6cfb9bb 100644 --- a/lib/Object/Remote.pm +++ b/lib/Object/Remote.pm @@ -2,14 +2,12 @@ package Object::Remote; use Object::Remote::MiniLoop; use Object::Remote::Handle; +use Module::Runtime qw(use_module); sub new::on { my ($class, $on, @args) = @_; - Object::Remote::Handle->new( - connection => $on, - class => $class, - args => \@args - )->proxy; + my $conn = use_module('Object::Remote::Connection')->new_from_spec($on); + return $conn->new_remote(class => $class, args => \@args); } sub new {