start and await_all working
[scpubgit/Object-Remote.git] / lib / Object / Remote / Proxy.pm
index af6a902..3c46eeb 100644 (file)
@@ -5,10 +5,11 @@ use strictures 1;
 sub AUTOLOAD {
   my $self = shift;
   (my $method) = (our $AUTOLOAD =~ /([^:]+)$/);
+  my $to_fire = $self->{method};
   if ((caller(0)||'') eq 'start') {
-    $method = "start::${method}";
+    $to_fire = "start::${to_fire}";
   }
-  $self->{remote}->${\$self->{method}}($method => @_);
+  $self->{remote}->$to_fire($method => @_);
 }
 
 sub DESTROY { }