Tim Brody > Logfile-EPrints-1.20 > Logfile::EPrints::Hit::Combined

Download:
Logfile-EPrints-1.20.tar.gz

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Source  

Logfile::EPrints::Hit - Generic 'hit' object

DESCRIPTION ^

This object represents a single entry in a log file and doesn't proscribe any particular schema.

This uses the 'AUTOLOAD' mechanism to allow any variable to be defined as a method.

'Hit' objects are passed between filters that may add additional functionality (e.g. by subclassing the hit object).

SYNOPSIS ^

        use Logfile::EPrints::Hit;

        my $hit = Logfile::EPrints::Hit->new;
        $hit->date( '2006-05-01 23:10:05' );

        print $hit->date;

CLASS METHODS ^

Logfile::EPrints::Hit::Combined::load_country_db( FILENAME [, FLAGS ] )

Load the Maxmind country database located at FILENAME.

Logfile::EPrints::Hit::Combined::load_org_db( FILENAME [, FLAGS ] )

Load the Maxmind organisation database located at FILENAME.

METHODS ^

address()

IP address (or hostname if IP address could not be found).

hostname()

Hostname (undef if the address is an IP without a reverse DNS entry).

date()

Apache formatted date/time.

datetime()

Date/time formatted as yyyymmddHHMMSS.

userid_identd()
identd()
request()

Request string.

code()

HTTP server code.

size()

HTTP server response size.

referrer()

User agent referrer.

agent()

User agent string.

method()

Request method (GET, HEAD etc.).

page()

Requested page - probably won't include the virtual host!

version()

HTTP version requested (HTTP/1.1 etc).

country()

Country that the IP is probably in, must call load_country_db first.

organisation()

Organisation that the IP belongs to, must call load_org_db first.

institution()

Returns the title from the homepage()

homepage()

Returns the homepage for the user's network.

NAME ^

Logfile::EPrints::Hit::Combined - Parse combined format logs like those generated from Apache

SYNOPSIS ^

        use Logfile::EPrints::Hit;

        my $hit = Logfile::EPrints::Hit::Combined->new($line);

        printf("%s requested %s\n",
                $hit->hostname,
                $hit->page);

AUTHOR ^

Tim Brody - <tdb01r@ecs.soton.ac.uk>

syntax highlighting: