| 1 | package POE::Filter::IASLog; | ||||||||||||||||||||||||||||
| 2 | 2 | $POE::Filter::IASLog::VERSION = '1.10'; | |||||||||||||||||||||||||||
| 3 | #ABSTRACT: A POE Filter for Microsoft IAS-formatted log entries. | ||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||
| 5 | 2 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | 2 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | 2 | ▶ | use Parse::IASLog; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | 2 | ▶ | use base qw(POE::Filter); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | 1 | ▶ | sub new { | ||||||||||||||||||||||||||
|
Subroutine
new: called CC=4 SCAR=14.5
Pod
documented
| |||||||||||||||||||||||||||||
| 11 | 1 | my $class = shift; | |||||||||||||||||||||||||||
| 12 | 1 | my %opts = @_; | |||||||||||||||||||||||||||
| 13 | 1 | $opts{lc $_} = delete $opts{$_} for keys %opts; | |||||||||||||||||||||||||||
| 14 | 1 | ▶ | $opts{enumerate} = 1 unless defined $opts{enumerate} and !$opts{enumerate}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $opts{"enumerate"} and not $opts{"enumerate"}
MC/DC0%0/2
defined $opts{"enumerate"} and not $opts{"enumerate"}
defined $opts{"enumerate"}
not $opts{"enumerate"}
Truth table33%1/3
A and not(B)
A= defined $opts{"enumerate"}B= not $opts{"enumerate"}
| |||||||||||||||||||||||||||||
| 15 | 1 | $opts{BUFFER} = []; | |||||||||||||||||||||||||||
| 16 | 1 | $opts{IAS} = Parse::IASLog->new( enumerate => $opts{enumerate} ); | |||||||||||||||||||||||||||
| 17 | 1 | return bless \%opts, $class; | |||||||||||||||||||||||||||
| 18 | } | ||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | 2 | ▶ | sub get_one_start { | ||||||||||||||||||||||||||
|
Subroutine
get_one_start: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 21 | 2 | my ($self, $raw) = @_; | |||||||||||||||||||||||||||
| 22 | 2 | push @{ $self->{BUFFER} }, $_ for @$raw; | |||||||||||||||||||||||||||
| 23 | } | ||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||
| 25 | 4 | ▶ | sub get_one { | ||||||||||||||||||||||||||
|
Subroutine
get_one: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||||||||||
| 26 | 4 | my $self = shift; | |||||||||||||||||||||||||||
| 27 | 4 | my $events = []; | |||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||
| 29 | 4 | my $event = shift @{ $self->{BUFFER} }; | |||||||||||||||||||||||||||
| 30 | 4 | ▶ | if ( defined $event ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 31 | 2 | my $record = $self->{IAS}->parse($event); | |||||||||||||||||||||||||||
| 32 | 2 | ▶ | push @$events, $record if $record; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 33 | } | ||||||||||||||||||||||||||||
| 34 | 4 | return $events; | |||||||||||||||||||||||||||
| 35 | } | ||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||
| 37 | 0 | ▶ | sub get_pending { | ||||||||||||||||||||||||||
|
Subroutine
get_pending: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 38 | 0 | my $self = shift; | |||||||||||||||||||||||||||
| 39 | 0 | return $self->{BUFFER}; | |||||||||||||||||||||||||||
| 40 | } | ||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||
| 42 | 0 | ▶ | sub put { | ||||||||||||||||||||||||||
|
Subroutine
put: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 43 | 0 | return; | |||||||||||||||||||||||||||
| 44 | } | ||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||
| 46 | 1 | ▶ | sub clone { | ||||||||||||||||||||||||||
|
Subroutine
clone: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 47 | 1 | my $self = shift; | |||||||||||||||||||||||||||
| 48 | 1 | my $nself = { }; | |||||||||||||||||||||||||||
| 49 | 1 | $nself->{$_} = $self->{$_} for keys %{ $self }; | |||||||||||||||||||||||||||
| 50 | 1 | $nself->{BUFFER} = [ ]; | |||||||||||||||||||||||||||
| 51 | 1 | return bless $nself, ref $self; | |||||||||||||||||||||||||||
| 52 | } | ||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||
| 54 | 2 | qq[I see log people]; | |||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||
| 56 | __END__ | ||||||||||||||||||||||||||||