File Coverage

blib/lib/AnyEvent/FTP/Server/Context/FSRO.pm
Criterion Covered Total %
statement 11 16 68.7
branch 0 2 0.0
condition n/a
subroutine 4 5 80.0
pod 0 1 0.0
total 15 24 62.5


line stmt bran cond sub pod time code
1             package AnyEvent::FTP::Server::Context::FSRO;
2              
3 2     2   1007 use strict;
  2         6  
  2         74  
4 2     2   13 use warnings;
  2         4  
  2         58  
5 2     2   44 use 5.010;
  2         8  
6 2     2   10 use Moo;
  2         5  
  2         17  
7              
8             extends 'AnyEvent::FTP::Server::Context::FSRW';
9              
10             # ABSTRACT: FTP Server client context class with read-only access
11             our $VERSION = '0.17'; # VERSION
12              
13              
14             sub cmd_stor
15             {
16 0     0 0   my($self, $con, $req) = @_;
17 0 0         unless(defined $self->data)
18 0           { $con->send_response(425 => 'Unable to build data connection') }
19             else
20 0           { $con->send_response(553 => "Permission denied") }
21 0           $self->done;
22             }
23              
24              
25             *cmd_appe = \&cmd_stor;
26              
27              
28             *cmd_stou = \&cmd_stor;
29             1;
30              
31             __END__