line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package POE::Filter::IASLog; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
52802
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
84
|
|
4
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
61
|
|
5
|
2
|
|
|
2
|
|
9054
|
use Parse::IASLog; |
|
2
|
|
|
|
|
19159
|
|
|
2
|
|
|
|
|
377
|
|
6
|
2
|
|
|
2
|
|
24
|
use base qw(POE::Filter); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
2141
|
|
7
|
2
|
|
|
2
|
|
6935
|
use vars qw($VERSION); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
760
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
$VERSION = '1.08'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new { |
12
|
1
|
|
|
1
|
1
|
14
|
my $class = shift; |
13
|
1
|
|
|
|
|
4
|
my %opts = @_; |
14
|
1
|
|
|
|
|
9
|
$opts{lc $_} = delete $opts{$_} for keys %opts; |
15
|
1
|
50
|
33
|
|
|
9
|
$opts{enumerate} = 1 unless defined $opts{enumerate} and !$opts{enumerate}; |
16
|
1
|
|
|
|
|
4
|
$opts{BUFFER} = []; |
17
|
1
|
|
|
|
|
9
|
$opts{IAS} = Parse::IASLog->new( enumerate => $opts{enumerate} ); |
18
|
1
|
|
|
|
|
18
|
return bless \%opts, $class; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub get_one_start { |
22
|
2
|
|
|
2
|
1
|
12601
|
my ($self, $raw) = @_; |
23
|
2
|
|
|
|
|
5
|
push @{ $self->{BUFFER} }, $_ for @$raw; |
|
2
|
|
|
|
|
11
|
|
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub get_one { |
27
|
4
|
|
|
4
|
1
|
21
|
my $self = shift; |
28
|
4
|
|
|
|
|
5
|
my $events = []; |
29
|
|
|
|
|
|
|
|
30
|
4
|
|
|
|
|
6
|
my $event = shift @{ $self->{BUFFER} }; |
|
4
|
|
|
|
|
8
|
|
31
|
4
|
100
|
|
|
|
16
|
if ( defined $event ) { |
32
|
2
|
|
|
|
|
10
|
my $record = $self->{IAS}->parse($event); |
33
|
2
|
50
|
|
|
|
183
|
push @$events, $record if $record; |
34
|
|
|
|
|
|
|
} |
35
|
4
|
|
|
|
|
9
|
return $events; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub get_pending { |
39
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
40
|
0
|
|
|
|
|
0
|
return $self->{BUFFER}; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub put { |
44
|
0
|
|
|
0
|
1
|
0
|
return; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub clone { |
48
|
1
|
|
|
1
|
1
|
5
|
my $self = shift; |
49
|
1
|
|
|
|
|
3
|
my $nself = { }; |
50
|
1
|
|
|
|
|
2
|
$nself->{$_} = $self->{$_} for keys %{ $self }; |
|
1
|
|
|
|
|
11
|
|
51
|
1
|
|
|
|
|
3
|
$nself->{BUFFER} = [ ]; |
52
|
1
|
|
|
|
|
4
|
return bless $nself, ref $self; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1; |
56
|
|
|
|
|
|
|
__END__ |