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   56 use strictures 1;
  15         95  
  15         676  
4 15     15   1368 use Carp qw(croak);
  15         21  
  15         2881  
5              
6             sub AUTOLOAD {
7 113     113   16359 my $self = shift;
8 113         937 (my $method) = (our $AUTOLOAD =~ /([^:]+)$/);
9 113         296 my $to_fire = $self->{method};
10 113 100 50     594 if ((caller(0)||'') eq 'start') {
11 4         11 $to_fire = "start::${to_fire}";
12             }
13              
14 113 50       2524 unless ($self->{remote}->is_valid) {
15 0         0 croak "Attempt to use Object::Remote::Proxy backed by an invalid handle";
16             }
17              
18 113         911 $self->{remote}->$to_fire($method => @_);
19             }
20              
21       0     sub DESTROY { }
22              
23             1;