Salvador Fandiño García > Regexp-Log-WMS > Regexp::Log::WMS

Download:
Regexp-Log-WMS-0.02.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.02   Source  

NAME ^

Regexp::Log::WMS - A regular expression parser for WMS log format.

SYNOPSIS ^

    my $foo = Regexp::Log::Common->new(
        format  => 'custom %date %cs_uri_stem',
        capture => [qw( date request )],
    );

    # the format() and capture() methods can be used to set or get
    $foo->format('custom %date %cs_uri_stem %c_rate %c_status');
    $foo->capture(qw( date cs_uri_stem ));

    # this is necessary to know in which order
    # we will receive the captured fields from the regexp
    my @fields = $foo->capture;

    # the all-powerful capturing regexp :-)
    my $re = $foo->regexp;

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

        # now munge the fields
        ...
    }

DESCRIPTION ^

Regexp::Log::WMS uses Regexp::Log as a base class, to generate regular expressions for performing the usual data munging tasks on log files that cannot be simply split().

This specific module enables the computation of regular expressions for parsing the log files created by WMS.

For more information on how to use this module, please see Regexp::Log.

ABSTRACT ^

Regexp::Log::WMS enables simple parsing of log files created by WMS.

LOG FORMAT ^

WMS Log Format

    my $foo = Regexp::Log::WMS->new( format  => ':common' );

The WMS Log Format is made up of several fields, each delimited by a single space.

BUGS, PATCHES & FIXES ^

This is a very early release of this module, so maybe you will find some bugs there, report them to me (including a patch if possible) and I will try to correct it as soon as possible.

The regular expresions generated are not specially efficient.

SEE ALSO ^

Regexp::Log, Regexp::Log::Common, Regexp::Log::RealServer

AUTHOR ^

Salvador Fandiño <sfandino@yahoo.com>.

Based on Regexp::Log::Common by Barbie <barbie@cpan.org>

COPYRIGHT AND LICENSE ^

Copyrigth (c) 2005 by Salvador Fandiño. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: