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   13638 use strict;
  23         51  
  23         994  
4 23     23   117 use warnings;
  23         41  
  23         1281  
5 23     23   369 use 5.010;
  23         1617  
6 23     23   127 use Moo::Role;
  23         45  
  23         176  
7              
8             # ABSTRACT: Role for old archaic FTP server commands
9             our $VERSION = '0.20'; # 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 28 sub help_allo { 'ALLO is not implemented (ignored)' }
20              
21             sub cmd_allo
22             {
23 4     4 0 10 my($self, $con, $req) = @_;
24 4         20 $con->send_response(202 => 'No storage allocation necessary');
25 4         20 $self->done;
26             }
27              
28              
29 5     5 0 23 sub help_noop { 'NOOP' }
30              
31             sub cmd_noop
32             {
33 6     6 0 21 my($self, $con, $req) = @_;
34 6         44 $con->send_response(200 => 'NOOP command successful');
35 6         29 $self->done;
36             }
37              
38              
39 5     5 0 26 sub help_syst { 'SYST' }
40              
41             sub cmd_syst
42             {
43 3     3 0 9 my($self, $con, $req) = @_;
44 3         125 $con->send_response(215 => $self->syst);
45 3         16 $self->done;
46             }
47              
48             1;
49              
50             __END__