File Coverage

blib/lib/AnyEvent/FTP/Request.pm
Criterion Covered Total %
statement 15 20 75.0
branch n/a
condition n/a
subroutine 7 10 70.0
pod 4 5 80.0
total 26 35 74.2


line stmt bran cond sub pod time code
1             package AnyEvent::FTP::Request;
2              
3 25     25   1210 use strict;
  25         61  
  25         1044  
4 25     25   144 use warnings;
  25         82  
  25         1298  
5 25     25   465 use 5.010;
  25         102  
6 25     25   160 use overload '""' => sub { shift->as_string }, bool => sub { 1 }, fallback => 1;
  25     0   56  
  25         354  
  0         0  
  0         0  
7              
8             # ABSTRACT: Request class for asynchronous ftp server
9             our $VERSION = '0.20'; # VERSION
10              
11              
12             sub new
13             {
14 677     677 0 1894 my($class, $cmd, $args, $raw) = @_;
15 677         6614 bless { command => $cmd, args => $args, raw => $raw }, $class;
16             }
17              
18              
19 678     678 1 8240 sub command { shift->{command} }
20              
21              
22 567     567 1 2711 sub args { shift->{args} }
23              
24              
25 0     0 1   sub raw { shift->{raw} }
26              
27              
28             sub as_string
29             {
30 0     0 1   my $self = shift;
31 0           join ' ', $self->command, $self->args;
32             }
33              
34             1;
35              
36             __END__