The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Apache::Yaalr - Perl module for Yet Another Apache Log Reader

SYNOPSIS

    use Apache::Yaalr qw( @potential_confs );

    my $a = Apache::Yaalr->new();

    # get operating system information
    my @os = $a->os();

    # Get information from an apache2 configuration
    my ($file, $format, $str) = $a->apache2_conf("/etc/apache2/apache2.conf");

    $a->os();          - an estimation of the operating system using uname -a if uname exists. 
                         Otherwise this uses $^O. If it cannot find the hostname or 
                         operating system, it returns unknown.

    $a->apache2_conf("/etc/apache2/apache2.conf");     <= This is not yet complete EXPERIMENTAL!

                       - this allows you to pass an apache2 configuration set and find out
                         the format string from the format you are using, as well as the 
                         type of log that has been assigned, (i.e. agent, common, combined, etc.)

DESCRIPTION

The goal of Yaalr (Yet Another Apache Log Reader) is to read Apache access logs and report back. Since the Apache web server can have its access log in different places depending on operating system, Yaalr does its best to find out what type of operating system is being used and then find the configuration files to extract the location of the log files. Along the way a lot of other potentially useful information is gathered which can also be accessed through the above interface.

EXAMPLES

use Apache::Yaalr qw( @potential_confs );

my $a = Apache::Yaalr->new(); my @os = $a->os();

# break apart the array from $^0 or uname

my ($os, $name, $rest) = split / /, $os[0]; print "\n\tLocal hostname: $name\n\tOperating system: $os\n";

SEE ALSO

More information can be found regarding Yaalr here: http://yaalr.sourceforge.net

Also Apache(1)

AUTHOR

Jeremiah Foster, <jeremiah@jeremiahfoster.com>

COPYRIGHT

Copyright (C) 2007 - 2008 by Jeremiah Foster

LICENSE

This software is dual licensed under the terms of the Artistic License and the GPL-1 as described below.

License: Artistic This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License, which comes with Perl.

    On Debian GNU/Linux systems, the complete text of the Artistic License
    can be found in /usr/share/common-licenses/Artistic

License: GPL-1+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version.

    On Debian GNU/Linux systems, the complete text of the GNU General
    Public License can be found in `/usr/share/common-licenses/GPL'