line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::RecordStream::Operation::fromxferlog; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = "4.0.23"; |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
563
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
6
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
23
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
5
|
use base qw(App::RecordStream::Operation); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
63
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
6
|
use App::RecordStream::Record; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
19
|
|
11
|
1
|
|
|
1
|
|
4
|
use App::RecordStream::OptionalRequire qw(Net::FTPServer::XferLog); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
12
|
|
|
|
|
|
|
App::RecordStream::OptionalRequire::require_done(); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub init { |
15
|
0
|
|
|
0
|
|
|
my $this = shift; |
16
|
0
|
|
|
|
|
|
my $args = shift; |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
|
|
|
my $spec = {}; |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
$this->parse_options($args, $spec); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub accept_line { |
24
|
0
|
|
|
0
|
|
|
my $this = shift; |
25
|
0
|
|
|
|
|
|
my $line = shift; |
26
|
|
|
|
|
|
|
|
27
|
0
|
0
|
|
|
|
|
if (my $hash = Net::FTPServer::XferLog->parse_line($line)) { |
28
|
0
|
|
|
|
|
|
my $record = App::RecordStream::Record->new($hash); |
29
|
0
|
|
|
|
|
|
$this->push_record($record); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
return 1; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub usage { |
36
|
0
|
|
|
0
|
|
|
my $this = shift; |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
return <
|
39
|
|
|
|
|
|
|
Usage: recs-fromxferlog |
40
|
|
|
|
|
|
|
__FORMAT_TEXT__ |
41
|
|
|
|
|
|
|
Each line of input (or lines of ) is parse by Net::FTPServer::XferLog to produce an output record. |
42
|
|
|
|
|
|
|
__FORMAT_TEXT__ |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
Examples: |
45
|
|
|
|
|
|
|
Get records from typical xferlog |
46
|
|
|
|
|
|
|
recs-fromxferlog < /var/log/xferlog |
47
|
|
|
|
|
|
|
USAGE |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; |