@@ -16,9 +16,10 @@ $^W = 1;
sub new
{
- my $type = shift;
+ my ($type, %args) = @_;
my $self = {
- debug => $_[0],
+ cfg => $args{cfg},
+ debug => $args{debug},
normalline => '',
actionline => '',
thirdline => '',
@@ -7,9 +7,10 @@ $^W = 1;
normalline => '^\[\d+ \S+\/(\d+):\d+\] <([^>]+)> (.*)',
actionline => '^\[\d+ \S+\/(\d+):\d+\] \* (\S+) (.*)',
thirdline => '^\[\d+ \S+\/(\d+):(\d+)\] ([<>@!]) (.*)'
+ cfg => $args->{cfg},
+ debug => $args->{debug},
normalline => '^\[(\d+):\d+\] <([^>]+)> (.*)',
actionline => '^\[(\d+):\d+\] Action: (\S+) (.*)',
thirdline => '^\[(\d+):(\d+)\] (\S+) (\S+) (\S+) (\S+)(.*)',
actionline => '^\[(\d+):\d+\] \* (\S+) (.*)',
thirdline => '^\[(\d+):(\d+)\] (\S+) (\S+) (\S+) (\S+) (\S+) (\S+)(.*)',
normalline => '^(\d+):\d+ <[@+ ]?([^>]+)> (.*)',
actionline => '^(\d+):\d+ \* (\S+) (.*)',
thirdline => '^(\d+):(\d+) -\!- (\S+) (\S+) (\S+) (\S+) (\S+)(.*)',
normalline => '^\[(\d+):\d+[^ ]+ <([^>]+)> (.*)',
actionline => '^\[(\d+):\d+[^ ]+ \* (\S+) (.*)',
thirdline => '^\[(\d+):(\d+)[^ ]+ \*\*\* (\S+) (\S+) (\S+) (\S+) (\S+)(.*)',
normalline => '^\S+ \S+ \d+ (\d+):\d+:\d+ \d+ <([^>]+)> (?!\001ACTION)(.*)',
actionline => '^\S+ \S+ \d+ (\d+):\d+:\d+ \d+ <([^>]+)> \001ACTION (.*)\001$',
thirdline => '^\S+ \S+ \d+ (\d+):(\d+):\d+ \d+ (\S+) (\S+) ?(\S*) ?(\S*) ?(.*)',
normalline => '^\d+-\d+-\d+-(\d+)-\d+-\d+:[^:]+::([^!]+)[^:]+:(.*)',
actionline => '^\d+-\d+-\d+-(\d+)-\d+-\d+:[^:]+::([^!]+)[^:]+:\001ACTION (.*)',
thirdline => '^\d+-\d+-\d+-(\d+)-(\d+)-\d+:[^:]+::([^!]+)[^ ]+ (\w+) (.*)',
normalline => '^(\d+):\d+:\d+ <([^>\s]+)>\s+(.*)',
actionline => '^(\d+):\d+:\d+ \*\s+(\S+) (.*)',
thirdline => '^(\d+):(\d+):\d+ .--\s+(\S+) (\S+) (\S+) (\S+) (\S+) (\S+) (.*)',
@@ -38,7 +38,10 @@ sub _choose_format
eval <<_END;
use lib '$self->{cfg}->{modules_dir}';
use Pisg::Parser::Format::$format;
-\$self->{parser} = new Pisg::Parser::Format::$format(\$self->{debug});
+\$self->{parser} = new Pisg::Parser::Format::$format(
+ debug => \$self->{debug},
+ cfg => \$self->{cfg},
+);
_END
if ($@) {
print STDERR "Could not load parser for '$format': $@\n";