File Coverage

blib/lib/Logfile/Wftp.pm
Criterion Covered Total %
statement 13 13 100.0
branch 2 2 100.0
condition n/a
subroutine 2 2 100.0
pod 0 2 0.0
total 17 19 89.4


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 23     23 0 29 my $self = shift;
36 23         49 my $fh = $self->{Fh};
37 23         25 my ($host,$date,$file,$bytes);
38 23         42 *S = $fh;
39 23         72 $line = ;
40 23         44 $date = substr($line,0,24);
41 23         41 $line = substr($line,24);
42 23         115 ($host,$bytes,$file) = (split ' ', $line)[1,2,3];
43             #print "$date,$host,$bytes,$file\n";
44 23         152 Logfile::Base::Record->new(Host => $host,
45             Date => $date,
46             File => $file,
47             Bytes => $bytes,
48             );
49             }
50              
51             sub norm {
52 115     115 0 161 my ($self, $key, $val) = @_;
53              
54 115 100       231 if ($key eq File) {
55 23         105 $val = join('/', (split /\//, $val)[2,3]);
56             }
57 115         342 $val;
58             }
59              
60             1;