File Coverage

blib/lib/Object/Remote/Proxy.pm
Criterion Covered Total %
statement 13 14 92.8
branch 3 4 75.0
condition 1 2 50.0
subroutine 3 4 75.0
pod n/a
total 20 24 83.3


line stmt bran cond sub pod time code
1             package Object::Remote::Proxy;
2              
3 15     15   84 use strictures 1;
  15         116  
  15         618  
4 15     15   1932 use Carp qw(croak);
  15         27  
  15         3661  
5              
6             sub AUTOLOAD {
7 113     113   33272 my $self = shift;
8 113         1096 (my $method) = (our $AUTOLOAD =~ /([^:]+)$/);
9 113         339 my $to_fire = $self->{method};
10 113 100 50     693 if ((caller(0)||'') eq 'start') {
11 4         12 $to_fire = "start::${to_fire}";
12             }
13              
14 113 50       3308 unless ($self->{remote}->is_valid) {
15 0         0 croak "Attempt to use Object::Remote::Proxy backed by an invalid handle";
16             }
17              
18 113         981 $self->{remote}->$to_fire($method => @_);
19             }
20              
21       0     sub DESTROY { }
22              
23             1;