File Coverage

blib/lib/AnyEvent/FTP/Client/Site.pm
Criterion Covered Total %
statement 29 29 100.0
branch 1 2 50.0
condition n/a
subroutine 8 9 88.8
pod 0 1 0.0
total 38 41 92.6


line stmt bran cond sub pod time code
1             package AnyEvent::FTP::Client::Site;
2              
3 2     2   156643 use strict;
  2         5  
  2         80  
4 2     2   11 use warnings;
  2         4  
  2         90  
5 2     2   35 use 5.010;
  2         6  
6              
7             # ABSTRACT: Dispatcher for site specific ftp commands
8             our $VERSION = '0.20'; # VERSION
9              
10             sub new
11             {
12 1     1 0 208292 my($class, $client) = @_;
13 1         5 bless { client => $client }, $class;
14             }
15              
16             sub AUTOLOAD
17             {
18 3     3   7665 our $AUTOLOAD;
19 3         7 my $self = shift;
20 3         7 my $name = $AUTOLOAD;
21 3         20 $name =~ s/^.*://;
22 3         13 $name =~ s/_(.)/uc $1/eg;
  2         17  
23 3         14 my $class = join('::', qw( AnyEvent FTP Client Site ), ucfirst($name) );
24 3     1   240 eval qq{ use $class () };
  1     1   567  
  1     1   5  
  1         34  
  1         577  
  1         3  
  1         11  
  1         522  
  1         2  
  1         36  
25 3 50       19 die $@ if $@;
26 3         66 $class->new($self->{client});
27             }
28              
29             # don't autoload DESTROY
30       0     sub DESTROY { }
31              
32             1;
33              
34             __END__