From: Matt S Trout Date: Mon, 18 Jun 2012 01:03:59 +0000 (+0100) Subject: clean up calling system X-Git-Tag: v0.001001~16 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=851521760304bfebba51c93e5a3b26af2d76d225;p=scpubgit%2FObject-Remote.git clean up calling system --- diff --git a/lib/Object/Remote/CodeContainer.pm b/lib/Object/Remote/CodeContainer.pm index 948e63b..4f293c8 100644 --- a/lib/Object/Remote/CodeContainer.pm +++ b/lib/Object/Remote/CodeContainer.pm @@ -4,6 +4,9 @@ use Moo; has code => (is => 'ro', required => 1); -sub call { shift->code->(@_) } +sub call { + my $self = shift; + $self->code->(@_) +} 1; diff --git a/lib/Object/Remote/Connection.pm b/lib/Object/Remote/Connection.pm index 4490e44..5a2f524 100644 --- a/lib/Object/Remote/Connection.pm +++ b/lib/Object/Remote/Connection.pm @@ -131,7 +131,7 @@ sub register_class_call_handler { $self->local_objects_by_id->{'class_call_handler'} = Object::Remote::CodeContainer->new( code => sub { - my ($class, $method) = splice @_, 0, 2; + my ($class, $method) = (shift, shift); use_module($class)->$method(@_); } ); diff --git a/xt/bridged-remote.t b/xt/bridged-remote.t index abfbcd5..f78f7d6 100644 --- a/xt/bridged-remote.t +++ b/xt/bridged-remote.t @@ -9,7 +9,7 @@ use TestClass; use Object::Remote; is exception { - my $bridge = TestBridge->new::on('localhost'); + my $bridge = TestBridge->new::on('-'); is $bridge->result, 23; }, undef, 'no error during bridge access'; diff --git a/xt/lib/TestBridge.pm b/xt/lib/TestBridge.pm index 7a8b82a..27b649d 100644 --- a/xt/lib/TestBridge.pm +++ b/xt/lib/TestBridge.pm @@ -6,7 +6,7 @@ use Object::Remote; has object => (is => 'lazy'); -sub _build_object { TestClass->new::on('root@') } +sub _build_object { TestClass->new::on('-') } sub result { (shift)->object->result }