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   107 use strictures 1;
  15         147  
  15         718  
4 15     15   2100 use Carp qw(croak);
  15         57  
  15         4490  
5              
6             sub AUTOLOAD {
7 113     113   36364 my $self = shift;
8 113         1588 (my $method) = (our $AUTOLOAD =~ /([^:]+)$/);
9 113         1393 my $to_fire = $self->{method};
10 113 100 50     862 if ((caller(0)||'') eq 'start') {
11 4         12 $to_fire = "start::${to_fire}";
12             }
13              
14 113 50       3610 unless ($self->{remote}->is_valid) {
15 0         0 croak "Attempt to use Object::Remote::Proxy backed by an invalid handle";
16             }
17              
18 113         1003 $self->{remote}->$to_fire($method => @_);
19             }
20              
21       0     sub DESTROY { }
22              
23             1;