X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit%2FObject-Remote.git;a=blobdiff_plain;f=lib%2FObject%2FRemote.pm;h=485821d47c46551b29f40b4024d279923c325627;hp=fc6e9557643fae60f0fb00d17a9039ee5161d9f4;hb=624b459bafc411773708e674cf54e1971eb4d231;hpb=11dbd4a02cce95ee689233d2b1d2392470518732 diff --git a/lib/Object/Remote.pm b/lib/Object/Remote.pm index fc6e955..485821d 100644 --- a/lib/Object/Remote.pm +++ b/lib/Object/Remote.pm @@ -10,6 +10,12 @@ sub new::on { return $conn->remote_object(class => $class, args => \@args); } +sub can::on { + my ($class, $on, $name) = @_; + my $conn = __PACKAGE__->connect($on); + return $conn->remote_sub(join('::', $class, $name)); +} + sub new { shift; Object::Remote::Handle->new(@_)->proxy;