line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#!/usr/local/ls6/bin/perl |
2
|
|
|
|
|
|
|
# -*- Mode: Perl -*- |
3
|
|
|
|
|
|
|
# Wftp.pm -- |
4
|
|
|
|
|
|
|
# ITIID : $ITI$ $Header $__Header$ |
5
|
|
|
|
|
|
|
# Author : Ulrich Pfeifer |
6
|
|
|
|
|
|
|
# Created On : Mon Mar 25 09:59:37 1996 |
7
|
|
|
|
|
|
|
# Last Modified By: Ulrich Pfeifer |
8
|
|
|
|
|
|
|
# Last Modified On: Tue Mar 26 14:26:37 1996 |
9
|
|
|
|
|
|
|
# Language : Perl |
10
|
|
|
|
|
|
|
# Update Count : 14 |
11
|
|
|
|
|
|
|
# Status : Unknown, Use with caution! |
12
|
|
|
|
|
|
|
# |
13
|
|
|
|
|
|
|
# (C) Copyright 1996, Universität Dortmund, all rights reserved. |
14
|
|
|
|
|
|
|
# |
15
|
|
|
|
|
|
|
# $Locker: pfeifer $ |
16
|
|
|
|
|
|
|
# $Log: Wftp.pm,v $ |
17
|
|
|
|
|
|
|
# Revision 0.1.1.2 1996/03/27 14:41:39 pfeifer |
18
|
|
|
|
|
|
|
# patch6: Renamed Tools::Logfile to Logfile. |
19
|
|
|
|
|
|
|
# |
20
|
|
|
|
|
|
|
# Revision 0.1.1.1 1996/03/26 13:50:10 pfeifer |
21
|
|
|
|
|
|
|
# patch2: Renamed module to Logfile and Logfile.pm to |
22
|
|
|
|
|
|
|
# patch2: Logfile/Base.pm |
23
|
|
|
|
|
|
|
# |
24
|
|
|
|
|
|
|
# Revision 0.1 1996/03/25 10:52:20 pfeifer |
25
|
|
|
|
|
|
|
# First public version. |
26
|
|
|
|
|
|
|
# |
27
|
|
|
|
|
|
|
# |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
package Logfile::Wftp; |
30
|
|
|
|
|
|
|
require Logfile::Base; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
@ISA = qw ( Logfile::Base ) ; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub next { |
35
|
1
|
|
|
1
|
0
|
3
|
my $self = shift; |
36
|
1
|
|
|
|
|
2
|
my $fh = $self->{Fh}; |
37
|
1
|
|
|
|
|
2
|
my ($host,$date,$file,$bytes); |
38
|
1
|
|
|
|
|
4
|
*S = $fh; |
39
|
1
|
|
|
|
|
12
|
$line = ; |
40
|
1
|
|
|
|
|
4
|
$date = substr($line,0,24); |
41
|
1
|
|
|
|
|
3
|
$line = substr($line,24); |
42
|
1
|
|
|
|
|
8
|
($host,$bytes,$file) = (split ' ', $line)[1,2,3]; |
43
|
|
|
|
|
|
|
#print "$date,$host,$bytes,$file\n"; |
44
|
1
|
|
|
|
|
11
|
Logfile::Base::Record->new(Host => $host, |
45
|
|
|
|
|
|
|
Date => $date, |
46
|
|
|
|
|
|
|
File => $file, |
47
|
|
|
|
|
|
|
Bytes => $bytes, |
48
|
|
|
|
|
|
|
); |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub norm { |
52
|
0
|
|
|
0
|
0
|
|
my ($self, $key, $val) = @_; |
53
|
|
|
|
|
|
|
|
54
|
0
|
0
|
|
|
|
|
if ($key eq File) { |
55
|
0
|
|
|
|
|
|
$val = join('/', (split /\//, $val)[2,3]); |
56
|
|
|
|
|
|
|
} |
57
|
0
|
|
|
|
|
|
$val; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
1; |