line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package POE::Component::Server::FTP::ControlFilter; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
########################################################################### |
4
|
|
|
|
|
|
|
### POE::Component::Server::FTP::ControlFilter |
5
|
|
|
|
|
|
|
### L.M.Orchard (deus_x@pobox.com) |
6
|
|
|
|
|
|
|
### David Davis (xantus@cpan.org) |
7
|
|
|
|
|
|
|
### |
8
|
|
|
|
|
|
|
### TODO: |
9
|
|
|
|
|
|
|
### -- |
10
|
|
|
|
|
|
|
### |
11
|
|
|
|
|
|
|
### Copyright (c) 2001 Leslie Michael Orchard. All Rights Reserved. |
12
|
|
|
|
|
|
|
### This module is free software; you can redistribute it and/or |
13
|
|
|
|
|
|
|
### modify it under the same terms as Perl itself.# |
14
|
|
|
|
|
|
|
### |
15
|
|
|
|
|
|
|
### Changes Copyright (c) 2003-2004 David Davis and Teknikill Software |
16
|
|
|
|
|
|
|
########################################################################### |
17
|
|
|
|
|
|
|
|
18
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
455
|
|
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
0
|
0
|
|
sub DEBUG { 0 } |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub new { |
23
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
24
|
0
|
|
|
|
|
|
my %args = @_; |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
|
|
|
bless({}, $class); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub get { |
30
|
0
|
|
|
0
|
0
|
|
my ($self, $raw) = @_; |
31
|
0
|
|
|
|
|
|
my @events = (); |
32
|
|
|
|
|
|
|
|
33
|
0
|
|
|
|
|
|
foreach my $input (@$raw) { |
34
|
0
|
|
|
|
|
|
$input =~ s/\n//g; |
35
|
0
|
|
|
|
|
|
$input =~ s/\r//g; |
36
|
0
|
0
|
|
|
|
|
DEBUG && print STDERR "<<< $input\n"; |
37
|
0
|
|
|
|
|
|
my ($cmd, @args) = split(/ /, $input); |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
push(@events, { cmd => uc $cmd, args =>\@args }); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
|
return \@events; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub put { |
46
|
0
|
|
|
0
|
0
|
|
my ($self, $in) = @_; |
47
|
0
|
|
|
|
|
|
my @out = (); |
48
|
|
|
|
|
|
|
|
49
|
0
|
|
|
|
|
|
foreach (@$in) { |
50
|
0
|
0
|
|
|
|
|
DEBUG && print STDERR ">>> $_\n"; |
51
|
0
|
|
|
|
|
|
push(@out, "$_\n"); |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
0
|
|
|
|
|
|
return \@out; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub get_pending { |
58
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
59
|
0
|
|
|
|
|
|
warn ref($self)." does not support the get_pending() method\n"; |
60
|
0
|
|
|
|
|
|
return; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
1; |