line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Logfile::EPrints::Filter; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Logfile::EPrints::Filter - base class for filters |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 SYNOPSIS |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
A minimal filter that removes all abstract requests: |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
package Logfile::EPrints::Filter::Custom; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our @ISA = qw( Logfile::EPrints::Filter ); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub abstract {} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
1; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=cut |
20
|
|
|
|
|
|
|
|
21
|
6
|
|
|
6
|
|
31
|
use strict; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
192
|
|
22
|
|
|
|
|
|
|
|
23
|
6
|
|
|
6
|
|
31
|
use vars qw( $AUTOLOAD ); |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
1150
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub new |
26
|
|
|
|
|
|
|
{ |
27
|
1
|
|
|
1
|
0
|
597
|
my( $class, %self ) = @_; |
28
|
1
|
|
|
|
|
14
|
bless \%self, $class; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub AUTOLOAD |
32
|
|
|
|
|
|
|
{ |
33
|
0
|
0
|
|
0
|
|
|
return if $AUTOLOAD =~ /[A-Z]$/; |
34
|
0
|
|
|
|
|
|
$AUTOLOAD =~ s/^.*:://; |
35
|
0
|
|
|
|
|
|
$_[0]->{handler}->$AUTOLOAD( $_[1] ); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
package Logfile::EPrints::Filter::Debug; |
39
|
|
|
|
|
|
|
|
40
|
6
|
|
|
6
|
|
29
|
use strict; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
161
|
|
41
|
|
|
|
|
|
|
|
42
|
6
|
|
|
6
|
|
175
|
use vars qw( $AUTOLOAD ); |
|
6
|
|
|
|
|
15
|
|
|
6
|
|
|
|
|
1469
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
our @ISA = qw( Logfile::EPrints::Filter ); |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub AUTOLOAD |
47
|
|
|
|
|
|
|
{ |
48
|
0
|
0
|
|
0
|
|
|
return if $AUTOLOAD =~ /[A-Z]$/; |
49
|
0
|
|
|
|
|
|
$AUTOLOAD =~ s/^.*:://; |
50
|
0
|
|
|
|
|
|
my( $self, $hit ) = @_; |
51
|
0
|
|
|
|
|
|
$self->{requests}->{$AUTOLOAD}++; |
52
|
0
|
|
|
|
|
|
for( sort keys(%{$self->{requests}}) ) { |
|
0
|
|
|
|
|
|
|
53
|
0
|
0
|
|
|
|
|
print STDERR "+" if $_ eq $AUTOLOAD; |
54
|
0
|
|
|
|
|
|
print STDERR "$_ [".$self->{requests}->{$_}."] "; |
55
|
|
|
|
|
|
|
} |
56
|
0
|
|
|
|
|
|
print STDERR "\r"; |
57
|
0
|
|
|
|
|
|
$self->{handler}->$AUTOLOAD( $hit ); |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
1; |