From: Matt S Trout Date: Mon, 11 Jun 2012 23:18:25 +0000 (+0100) Subject: $conn->remote_sub obsoletes SubCaller X-Git-Tag: v0.001001~19 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d7bc7bc9fa23f43aeb89a6b31fa90f5665ffaa16;p=scpubgit%2FObject-Remote.git $conn->remote_sub obsoletes SubCaller --- diff --git a/lib/Object/Remote/SubCaller.pm b/lib/Object/Remote/SubCaller.pm deleted file mode 100644 index ff5fb40..0000000 --- a/lib/Object/Remote/SubCaller.pm +++ /dev/null @@ -1,18 +0,0 @@ -package Object::Remote::SubCaller; - -use Module::Runtime qw(use_module); - -sub new { bless({}, ref($_[0])||$_[0]) } - -sub call { - my ($self, $name, @args) = @_; - my ($pkg, $sub_name) = $name =~ /^(.+)::([^:]+)$/ - or die "Couldn't split ${name} into package and sub"; - if (my $sub = use_module($pkg)->can($sub_name)) { - return $sub->(@args); - } else { - die "No subroutine ${sub_name} in package ${pkg}"; - } -} - -1;