饶琛琳 > Message-Passing-Filter-Regexp > Message::Passing::Filter::Regexp::Log

Download:
Message-Passing-Filter-Regexp-0.05.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.01   Source  

NAME ^

Message::Passing::Filter::Regexp::Log - Extension for Regexp::Log with Config::Tiny

SYNOPSIS ^

  use Message::Passing::Filter::Regexp::Log;
  my $regex = Message::Passing::Filter::Regexp::Log->new(
      regexfile => "./regexfile",
      format => ":syslog",
      capture => [qw(pri host msg time)]
  );
  my @fields = $foo->capture;

  my $re = $foo->regexp;

  while (<>) {
      my %data;
      @data{@fields} = /$re/;    # no need for /o, it's a compiled regexp
  };

DESCRIPTION ^

SEE ALSO ^

Regexp::Log::Common

AUTHOR ^

chenryn, <rao.chenlin@gmail.com<gt>

COPYRIGHT AND LICENSE ^

Copyright (C) 2012 by chenryn

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.2 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: