File Coverage

blib/lib/AnyEvent/FTP/Server/Role/Old.pm
Criterion Covered Total %
statement 23 23 100.0
branch n/a
condition n/a
subroutine 10 10 100.0
pod 0 6 0.0
total 33 39 84.6


line stmt bran cond sub pod time code
1             package AnyEvent::FTP::Server::Role::Old;
2              
3 23     23   9404 use strict;
  23         43  
  23         543  
4 23     23   88 use warnings;
  23         55  
  23         441  
5 23     23   304 use 5.010;
  23         83  
6 23     23   120 use Moo::Role;
  23         53  
  23         134  
7              
8             # ABSTRACT: Role for old archaic FTP server commands
9             our $VERSION = '0.19'; # VERSION
10              
11              
12             has syst => (
13             is => 'rw',
14             lazy => 1,
15             default => sub { 'UNIX Type: L8' }
16             );
17              
18              
19 5     5 0 33 sub help_allo { 'ALLO is not implemented (ignored)' }
20              
21             sub cmd_allo
22             {
23 4     4 0 9 my($self, $con, $req) = @_;
24 4         12 $con->send_response(202 => 'No storage allocation necessary');
25 4         14 $self->done;
26             }
27              
28              
29 5     5 0 29 sub help_noop { 'NOOP' }
30              
31             sub cmd_noop
32             {
33 6     6 0 17 my($self, $con, $req) = @_;
34 6         26 $con->send_response(200 => 'NOOP command successful');
35 6         32 $self->done;
36             }
37              
38              
39 5     5 0 16 sub help_syst { 'SYST' }
40              
41             sub cmd_syst
42             {
43 3     3 0 14 my($self, $con, $req) = @_;
44 3         58 $con->send_response(215 => $self->syst);
45 3         9 $self->done;
46             }
47              
48             1;
49              
50             __END__