NAME

Siebel::Srvrmgr::Log::Enterprise - module to read a Siebel Enterprise log file

SYNOPSIS

    use Siebel::Srvrmgr::Log::Enterprise;
    my $enterprise_log = Siebel::Srvrmgr::Log::Enterprise->new( { path => File::Spec->catfile('somewhere', 'under', 'the', 'rainbow')} );
	my $next = $enterprise_log->read();

	while (my $line = $next->()) {

        # do something

	}

DESCRIPTION

A class that knows how to read Siebel Enterprise log files: it knows the header details and how to safely read lines from the file.

ATTRIBUTES

path

A string with the complete pathname to the Siebel Enterprise log file.

This attribute is required during object creation.

eol

A string identifying the character(s) used as end-of-line in the Siebel Enterprise log file is configured.

This attribute is read-only, this class will automatically try to define the field separator being used.

fs

A string identifying the character(s) used to separate the fields ("fs" stands for "field separator") in the Siebel Enterprise log file is configured.

This attribute is read-only, this class will automatically try to define the EOL being used.

fh

The file handle reference to the Siebel Enterprise log file, after was opened.

filename

The complete path to the temporary filename that this class uses to store the lines of the Siebel Enterprise Log file.

The header of the Siebel Enterprise log file, without the BOM.

SEE ALSO

METHODS

read

Reads the Siebel Enterprise log file, returning a iterator over the lines of the file.

The method will try to read the file as safely as possible, copying it to a temporary location before reading.

Several attributes will be defined during the file reading, automatically whenever it is possible. In some cases, if unable to define those attributes, an exception will be raised.

DEMOLISH

During object termination, the associated temporary log file will be closed and removed automatically, if available.

AUTHOR

Alceu Rodrigues de Freitas Junior, <arfreitas@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 of Alceu Rodrigues de Freitas Junior, <arfreitas@cpan.org>

This file is part of Siebel Monitoring Tools.

Siebel Monitoring Tools 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 3 of the License, or (at your option) any later version.

Siebel Monitoring Tools is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Siebel Monitoring Tools. If not, see <http://www.gnu.org/licenses/>.