update Makefile.PL with better metadata
[scpubgit/Object-Remote.git] / lib / Object / Remote / Proxy.pm
CommitLineData
9e72f0cf 1package Object::Remote::Proxy;
2
3use strictures 1;
5add5e29 4use Carp qw(croak);
9e72f0cf 5
6sub AUTOLOAD {
7 my $self = shift;
8 (my $method) = (our $AUTOLOAD =~ /([^:]+)$/);
3f1f1e66 9 my $to_fire = $self->{method};
dc28afe8 10 if ((caller(0)||'') eq 'start') {
3f1f1e66 11 $to_fire = "start::${to_fire}";
dc28afe8 12 }
55c0d020 13
5add5e29 14 unless ($self->{remote}->is_valid) {
15 croak "Attempt to use Object::Remote::Proxy backed by an invalid handle";
16 }
55c0d020 17
3f1f1e66 18 $self->{remote}->$to_fire($method => @_);
9e72f0cf 19}
20
21sub DESTROY { }
22
231;