line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Message::Passing::Filter::Regexp::Log; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
52725
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
40
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
226
|
|
5
|
1
|
|
|
1
|
|
1008
|
use Config::Tiny; |
|
1
|
|
|
|
|
1374
|
|
|
1
|
|
|
|
|
38
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
8
|
use base qw( Regexp::Log ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
2109
|
|
8
|
1
|
|
|
1
|
|
1826
|
use vars qw( $VERSION %DEFAULT %FORMAT %REGEXP ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
219
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
$VERSION = 0.01; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub _read_config { |
13
|
1
|
|
|
1
|
|
12
|
Config::Tiny->read(shift); |
14
|
|
|
|
|
|
|
}; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub new { |
17
|
1
|
|
|
1
|
1
|
17
|
my $class = shift; |
18
|
1
|
|
|
|
|
5
|
my $args = { @_ }; |
19
|
1
|
|
|
|
|
4
|
my $regexfile = delete $args->{'regexfile'}; |
20
|
1
|
|
|
|
|
5
|
my $cfg = &_read_config($regexfile); |
21
|
1
|
|
|
|
|
512
|
%DEFAULT = ( default => '', capture => [] ); |
22
|
1
|
|
|
|
|
3
|
%FORMAT = %{ $cfg->{FORMAT} }; |
|
1
|
|
|
|
|
7
|
|
23
|
1
|
|
|
|
|
3
|
%REGEXP = %{ $cfg->{REGEXP} }; |
|
1
|
|
|
|
|
10
|
|
24
|
1
|
|
|
|
|
14
|
my $self = $class->SUPER::new(%$args); |
25
|
1
|
|
|
|
|
185
|
bless $self, $class; |
26
|
1
|
|
|
|
|
16
|
return $self; |
27
|
|
|
|
|
|
|
}; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
__END__ |