View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
David Tiberio > Logfile-Access-1.30 > Logfile::Access



Annotate this POD


Open  2
View/Report Bugs
Module Version: 1.30   Source  


Logfile::Access - Perl extension for common log format web server logs


  use Logfile::Access;

        my $log = new Logfile::Access;

        open (IN, $filename);
        while (<IN>)
          warn $log->remote_host;
        close IN;


        A module for parsing common log format web server access log files.


        new() - defines new logfile row object

        load_mime_types() - loads mime types for filename extensions
        parse() - parses a common log format row

        print() - outputs the data to a common log format row

remote_host related functions

        class_a() - returns the Class A of the remote_host

        class_b() - returns the Class B of the remote_host

        class_c() - returns the Class C of the remote_host

        tld() - returns the top level domain of the remote_host

        country_name() - returns the country name

        domain() - return the domain of the remote_host

        remote_host() - returns / sets the remote host

authentication related functions

        logname() - returns / sets the logname

        user() - returns / sets the user name

date and time related functions

        date() - returns / sets the CLF date

        mday() - returns / sets the day of the month

        month() - returns / sets the abbreviated name of the month

        year() - returns / sets the year

        time() - returns / sets the time

        hour() - returns / sets the hour

        minute() - returns / sets the minute

        second() - returns / sets the seconds

        offset() - returns / sets the GMT offset

request object related functions

        method() - returns / sets the request method

        scheme() - returns the request object scheme

        query_string() - returns the query string from the requets object

        path() - returns the object path

        mime_type() - returns the object mime type

        unescape_object() - returns the unescaped object string

        escape_object() - returns the escaped object string

        object() - returns / sets the requets object

        protocol() - returns / sets the request protocol

response code related functions

        response_code() - returns / sets the numeric response code

        content_length() - returns / sets the content length in bytes

        http_referer() - returns / sets the http referer

        http_user_agent() - returns / sets the http user agent string


None by default.


        use Locale::Country;
        use URI;
        use URI::Escape;



David Tiberio, <>


Copyright 2004 David Tiberio,

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

syntax highlighting: