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   229561 use strict;
  2         9  
  2         59  
4 2     2   11 use warnings;
  2         4  
  2         45  
5 2     2   42 use 5.010;
  2         7  
6              
7             # ABSTRACT: Dispatcher for site specific ftp commands
8             our $VERSION = '0.17'; # VERSION
9              
10             sub new
11             {
12 1     1 0 99 my($class, $client) = @_;
13 1         5 bless { client => $client }, $class;
14             }
15              
16             sub AUTOLOAD
17             {
18 3     3   7785 our $AUTOLOAD;
19 3         9 my $self = shift;
20 3         7 my $name = $AUTOLOAD;
21 3         21 $name =~ s/^.*://;
22 3         12 $name =~ s/_(.)/uc $1/eg;
  2         9  
23 3         18 my $class = join('::', qw( AnyEvent FTP Client Site ), ucfirst($name) );
24 3     1   237 eval qq{ use $class () };
  1     1   527  
  1     1   5  
  1         19  
  1         575  
  1         3  
  1         12  
  1         529  
  1         3  
  1         12  
25 3 50       13 die $@ if $@;
26 3         59 $class->new($self->{client});
27             }
28              
29             # don't autoload DESTROY
30       0     sub DESTROY { }
31              
32             1;
33              
34             __END__