The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Log::Deep::Line - Encapsulates one line from a log file

VERSION

This documentation refers to Log::Deep::Line version 0.3.1.

SYNOPSIS

   use Log::Deep::Line;

   # create a new line object
   my $line = Log::Deep::Line->new( { show => {}, ... }, $line_text, $file );

DESCRIPTION

SUBROUTINES/METHODS

new ( $options, $line, $file )

Param: $options - hash ref - Configuration options for this line

Param: $line - string - The original text of the log line

Param: $file - Log::Deep::File - Object continuing the log file of interest

Return: Log::Deep::Line - New log deep object

Description: Create a new object from a line ($line) of the log file ($file)

parse ( $line, $file )

Param: $line - string - The original text of the log line

Param: $file - Log::Deep::File - Object continuing the log file of interest

Description: Parses the log line

id ( )

Return: The session id for this log line

Description: Gets the session id for the log line. Will be undef if the log line did not parse correctly.

colour ( [ $colour ] )

Param: $colour - string - A string containing the foreground and background colour to use for this line. The format is 'colour on_colour'.

Return: string - The colour set for this log line

Description: Gets the current colour for this log line and optionally sets the colour.

show ( )

Return: bool - True if the log line should be shown.

Description: Determines if the log line should be shown.

text ( )

Return: The processed text of the line (sans the DATA section).

Description: Processes log line for out putting to a terminal.

data ( )

Return: The contents of the DATA section as specified by the display option

Description: Out puts the DATA section of the log line.

data_missing ($field, $data)

Param: $field - string - The name of the field of data

Param: $data - any - All the data

Return: Array - all the lines to be out put

Description: Returns that there was no data or that the data was undefined

data_sub_fields ($field, $data)

Param: $field - string - The name of the field of data

Param: $data - any - The data being displayed

Return: Array - all the lines to be out put

Description: Shows only the sub keys of $data that are defined to be displayed

data_scalar ($field, $data)

Param: $field - string - The name of the field of data

Param: $data - any - The data being displayed

Return: Array - all the lines to be out put

Description: Just shows the simple data

DIAGNOSTICS

CONFIGURATION AND ENVIRONMENT

DEPENDENCIES

INCOMPATIBILITIES

BUGS AND LIMITATIONS

There are no known bugs in this module.

Please report problems to Ivan Wills (ivan.wills@gmail.com).

Patches are welcome.

AUTHOR

Ivan Wills - (ivan.wills@gmail.com)

LICENSE AND COPYRIGHT

Copyright (c) 2009 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077). All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. This program 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.