Michael Schilli > Gaim-Log-Parser-0.09 > Gaim::Log::Parser

Download:
Gaim-Log-Parser-0.09.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View Bugs
Report a bug
Module Version: 0.09   Source   Latest Release: Gaim-Log-Parser-0.14

NAME ^

Gaim::Log::Parser - Parse Gaim's Log Files

SYNOPSIS ^

    use Gaim::Log::Parser;

    my $parser = Gaim::Log::Parser->new(file => $filename);

    while(my $msg = $parser->next_message()) {
        print $msg->as_string();
    }

DESCRIPTION ^

Gaim::Log::Parser parses Gaim's log files. In the 1.4+ series, they are organized in the following way:

    .gaim/logs/protocol/local_user/comm_partner/2005-10-29.230219.txt

Methods

my $parser = Gaim::Log::Parser-new(file => $filename)>

Create a new log parser.

The parser will interpret the message time stamps according to a selected time zone.

By default, the time zone is assumed to be 'local' which will try all kinds of tricks to determine the local time zone. If this is not what you want, a time zone for DateTime::TimeZone can be provided, e.g. "America/Los_Angeles".

my $msg = $parser->next_message()

Return the next message in the log. Returns an object of type Gaim::Log::Message. Check its documentation for details.

my $dt = $parser->datetime()

Retrieve the DateTime object used internally by Gaim::Log::Parser. Can be used to obtain the the start date of the parsed log file or the time zone used.

SEE ALSO ^

Gaim::Log::Finder, Gaim::Log::Message in this distribution

LEGALESE ^

Copyright 2005-2007 by Mike Schilli, all rights reserved. This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR ^

Mike Schilli <cpan@perlmeister.com>