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   86 use strictures 1;
  15         150  
  15         594  
4 15     15   1479 use Carp qw(croak);
  15         46  
  15         3375  
5              
6             sub AUTOLOAD {
7 113     113   19843 my $self = shift;
8 113         975 (my $method) = (our $AUTOLOAD =~ /([^:]+)$/);
9 113         313 my $to_fire = $self->{method};
10 113 100 50     500 if ((caller(0)||'') eq 'start') {
11 4         10 $to_fire = "start::${to_fire}";
12             }
13              
14 113 50       2260 unless ($self->{remote}->is_valid) {
15 0         0 croak "Attempt to use Object::Remote::Proxy backed by an invalid handle";
16             }
17              
18 113         626 $self->{remote}->$to_fire($method => @_);
19             }
20              
21       0     sub DESTROY { }
22              
23             1;