type()

get_key

Purpose: To find individual key values parsed from test results
Input: The search key, the 'datum' the key is stored in
Output: Data stored under the search key, or the search key if not found

parse($input, [$name[, $path]])

Call this routine to perform the parsing process. $input can be any of the following:

* A text string
* A filename of an external log file to parse
* An open file handle (e.g. \*STDIN)

If you are dealing with a very large file, then using the filename approach will be more memory efficient. If you wish to use this program in a pipe context, then the file handle style will be more suitable.

This routine simply iterates over each newline-separated line of text, calling _parse_line. Note that the default _parse_line() routine does nothing particularly interesting, so you will probably wish to subclass Test::Parser and provide your own implementation of parse_line() to do what you need.

The 'name' argument allows you to specify the log filename or other indication of the source of the parsed data. 'path' allows specification of the location of this file within the test run directory. By default, if $input is a filename, 'name' and 'path' will be taken from that, else they'll be left blank.

If the filename contains multiple test records, parse() simply parses the first one it finds, and then returns the constant Test::Parser::END_OF_RECORD. If your input file contains multiple records, you probably want to call parse in the GLOB fashion. E.g.,