Logfile::EPrints::Hit - Generic 'hit' object
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).
use Logfile::EPrints::Hit; my $hit = Logfile::EPrints::Hit->new; $hit->date( '2006-05-01 23:10:05' ); print $hit->date;
Load the Maxmind country database located at FILENAME.
Load the Maxmind organisation database located at FILENAME.
IP address (or hostname if IP address could not be found).
Hostname (undef if the address is an IP without a reverse DNS entry).
Apache formatted date/time.
Date/time formatted as yyyymmddHHMMSS.
Request string.
HTTP server code.
HTTP server response size.
User agent referrer.
User agent string.
Request method (GET, HEAD etc.).
Requested page - probably won't include the virtual host!
HTTP version requested (HTTP/1.1 etc).
Country that the IP is probably in, must call load_country_db first.
Organisation that the IP belongs to, must call load_org_db first.
Returns the title from the homepage()
Returns the homepage for the user's network.
Logfile::EPrints::Hit::Combined - Parse combined format logs like those generated from Apache
use Logfile::EPrints::Hit; my $hit = Logfile::EPrints::Hit::Combined->new($line); printf("%s requested %s\n", $hit->hostname, $hit->page);
Tim Brody - <tdb01r@ecs.soton.ac.uk>
To install Logfile::EPrints, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Logfile::EPrints
CPAN shell
perl -MCPAN -e shell install Logfile::EPrints
For more information on module installation, please visit the detailed CPAN module installation guide.