line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Peep::Client::Logparser::Event; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
require 5.00503; |
4
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
41
|
|
5
|
|
|
|
|
|
|
# use warnings; # commented out for 5.005 compatibility |
6
|
1
|
|
|
1
|
|
11
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
66
|
|
7
|
1
|
|
|
1
|
|
6
|
use Data::Dumper; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
50
|
|
8
|
1
|
|
|
1
|
|
443
|
use Net::Peep::Host::Pool; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
54
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
require Exporter; |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
7
|
use vars qw{ @ISA %EXPORT_TAGS @EXPORT_OK @EXPORT $VERSION }; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
562
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
@ISA = qw(Exporter); |
15
|
|
|
|
|
|
|
%EXPORT_TAGS = ( 'all' => [ qw( ) ] ); |
16
|
|
|
|
|
|
|
@EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); |
17
|
|
|
|
|
|
|
@EXPORT = qw( ); |
18
|
|
|
|
|
|
|
$VERSION = do { my @r = (q$Revision: 1.1 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub new { |
21
|
|
|
|
|
|
|
|
22
|
10
|
|
|
10
|
0
|
15
|
my $self = shift; |
23
|
10
|
|
33
|
|
|
42
|
my $class = ref($self) || $self; |
24
|
10
|
|
|
|
|
17
|
my $this = {}; |
25
|
10
|
|
|
|
|
47
|
bless $this, $class; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
} # end sub new |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub name { |
30
|
|
|
|
|
|
|
|
31
|
10
|
|
|
10
|
0
|
11
|
my $self = shift; |
32
|
10
|
50
|
|
|
|
24
|
if (@_) { $self->{'NAME'} = shift; } |
|
10
|
|
|
|
|
56
|
|
33
|
10
|
|
|
|
|
26
|
return $self->{'NAME'}; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
} # end sub name |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub group { |
38
|
|
|
|
|
|
|
|
39
|
10
|
|
|
10
|
0
|
12
|
my $self = shift; |
40
|
10
|
50
|
|
|
|
23
|
if (@_) { $self->{'GROUP'} = shift; } |
|
10
|
|
|
|
|
27
|
|
41
|
10
|
|
|
|
|
23
|
return $self->{'GROUP'}; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
} # end sub group |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub letter { |
46
|
|
|
|
|
|
|
|
47
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
48
|
0
|
0
|
|
|
|
0
|
if (@_) { $self->{'LETTER'} = shift; } |
|
0
|
|
|
|
|
0
|
|
49
|
0
|
|
|
|
|
0
|
return $self->{'LETTER'}; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
} # end sub letter |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub location { |
54
|
|
|
|
|
|
|
|
55
|
10
|
|
|
10
|
0
|
14
|
my $self = shift; |
56
|
10
|
50
|
|
|
|
22
|
if (@_) { $self->{'LOCATION'} = shift; } |
|
10
|
|
|
|
|
26
|
|
57
|
10
|
|
|
|
|
20
|
return $self->{'LOCATION'}; |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
} # end sub location |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub priority { |
62
|
|
|
|
|
|
|
|
63
|
10
|
|
|
10
|
0
|
14
|
my $self = shift; |
64
|
10
|
50
|
|
|
|
20
|
if (@_) { $self->{'PRIORITY'} = shift; } |
|
10
|
|
|
|
|
31
|
|
65
|
10
|
|
|
|
|
23
|
return $self->{'PRIORITY'}; |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
} # end sub priority |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
sub notification { |
70
|
|
|
|
|
|
|
|
71
|
10
|
|
|
10
|
0
|
14
|
my $self = shift; |
72
|
10
|
50
|
|
|
|
21
|
if (@_) { $self->{'NOTIFICATION'} = shift; } |
|
10
|
|
|
|
|
26
|
|
73
|
10
|
|
|
|
|
21
|
return $self->{'NOTIFICATION'}; |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
} # end sub notification |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
sub regex { |
78
|
|
|
|
|
|
|
|
79
|
10
|
|
|
10
|
0
|
12
|
my $self = shift; |
80
|
10
|
50
|
|
|
|
20
|
if (@_) { $self->{'REGEX'} = shift; } |
|
10
|
|
|
|
|
36
|
|
81
|
10
|
|
|
|
|
24
|
return $self->{'REGEX'}; |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
} # end sub regex |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
sub hosts { |
86
|
|
|
|
|
|
|
|
87
|
10
|
|
|
10
|
0
|
13
|
my $self = shift; |
88
|
10
|
50
|
|
|
|
30
|
if (@_) { $self->{'HOSTS'} = shift; } |
|
10
|
|
|
|
|
29
|
|
89
|
10
|
|
|
|
|
21
|
return $self->{'HOSTS'}; |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
} # end sub hosts |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
sub pool { |
94
|
|
|
|
|
|
|
|
95
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
96
|
0
|
0
|
|
|
|
|
unless (exists $self->{'POOL'}) { |
97
|
0
|
|
0
|
|
|
|
my $hosts = $self->hosts() |
98
|
|
|
|
|
|
|
|| confess "Cannot get host pool: No hosts have been identified yet."; |
99
|
0
|
|
|
|
|
|
my $pool = new Net::Peep::Host::Pool; |
100
|
0
|
|
|
|
|
|
$pool->addHosts($hosts); |
101
|
0
|
|
|
|
|
|
$self->{'POOL'} = $pool; |
102
|
|
|
|
|
|
|
} |
103
|
0
|
|
|
|
|
|
return $self->{'POOL'}; |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
} # end sub pool |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
1; |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
__END__ |