line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package POE::Filter::IASLog; |
2
|
|
|
|
|
|
|
$POE::Filter::IASLog::VERSION = '1.10'; |
3
|
|
|
|
|
|
|
#ABSTRACT: A POE Filter for Microsoft IAS-formatted log entries. |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
13025
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
21
|
|
6
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
19
|
|
7
|
1
|
|
|
1
|
|
725
|
use Parse::IASLog; |
|
1
|
|
|
|
|
6485
|
|
|
1
|
|
|
|
|
106
|
|
8
|
1
|
|
|
1
|
|
6
|
use base qw(POE::Filter); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
677
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub new { |
11
|
1
|
|
|
1
|
1
|
13
|
my $class = shift; |
12
|
1
|
|
|
|
|
3
|
my %opts = @_; |
13
|
1
|
|
|
|
|
7
|
$opts{lc $_} = delete $opts{$_} for keys %opts; |
14
|
1
|
50
|
33
|
|
|
8
|
$opts{enumerate} = 1 unless defined $opts{enumerate} and !$opts{enumerate}; |
15
|
1
|
|
|
|
|
2
|
$opts{BUFFER} = []; |
16
|
1
|
|
|
|
|
7
|
$opts{IAS} = Parse::IASLog->new( enumerate => $opts{enumerate} ); |
17
|
1
|
|
|
|
|
12
|
return bless \%opts, $class; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub get_one_start { |
21
|
2
|
|
|
2
|
1
|
4764
|
my ($self, $raw) = @_; |
22
|
2
|
|
|
|
|
6
|
push @{ $self->{BUFFER} }, $_ for @$raw; |
|
2
|
|
|
|
|
8
|
|
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub get_one { |
26
|
4
|
|
|
4
|
1
|
14
|
my $self = shift; |
27
|
4
|
|
|
|
|
5
|
my $events = []; |
28
|
|
|
|
|
|
|
|
29
|
4
|
|
|
|
|
3
|
my $event = shift @{ $self->{BUFFER} }; |
|
4
|
|
|
|
|
6
|
|
30
|
4
|
100
|
|
|
|
10
|
if ( defined $event ) { |
31
|
2
|
|
|
|
|
8
|
my $record = $self->{IAS}->parse($event); |
32
|
2
|
50
|
|
|
|
116
|
push @$events, $record if $record; |
33
|
|
|
|
|
|
|
} |
34
|
4
|
|
|
|
|
5
|
return $events; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub get_pending { |
38
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
39
|
0
|
|
|
|
|
0
|
return $self->{BUFFER}; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub put { |
43
|
0
|
|
|
0
|
1
|
0
|
return; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub clone { |
47
|
1
|
|
|
1
|
1
|
4
|
my $self = shift; |
48
|
1
|
|
|
|
|
2
|
my $nself = { }; |
49
|
1
|
|
|
|
|
1
|
$nself->{$_} = $self->{$_} for keys %{ $self }; |
|
1
|
|
|
|
|
8
|
|
50
|
1
|
|
|
|
|
2
|
$nself->{BUFFER} = [ ]; |
51
|
1
|
|
|
|
|
3
|
return bless $nself, ref $self; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
qq[I see log people]; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
__END__ |