| 1 | package Message::Passing::Filter::Regexp::Log; | ||
| 2 | |||
| 3 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 2 | ▶ | use Config::Tiny; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 2 | ▶ | use base qw( Regexp::Log ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 2 | ▶ | use vars qw( $VERSION %DEFAULT %FORMAT %REGEXP ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 2 | $VERSION = 0.01; | |
| 11 | |||
| 12 | 2 | ▶ | sub _read_config { |
|
Subroutine
_read_config: called CC=1 SCAR=0.0
| |||
| 13 | 2 | Config::Tiny->read(shift); | |
| 14 | }; | ||
| 15 | |||
| 16 | 2 | ▶ | sub new { |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||
| 17 | 2 | my $class = shift; | |
| 18 | 2 | my $args = { @_ }; | |
| 19 | 2 | my $regexfile = delete $args->{'regexfile'}; | |
| 20 | 2 | my $cfg = &_read_config($regexfile); | |
| 21 | 2 | %DEFAULT = ( default => '', capture => [] ); | |
| 22 | 2 | %FORMAT = %{ $cfg->{FORMAT} }; | |
| 23 | 2 | %REGEXP = %{ $cfg->{REGEXP} }; | |
| 24 | 2 | my $self = $class->SUPER::new(%$args); | |
| 25 | 2 | bless $self, $class; | |
| 26 | 2 | return $self; | |
| 27 | }; | ||
| 28 | |||
| 29 | 2 | 1; | |
| 30 | __END__ | ||