NAME
Config::Record - loading of configuration records
SYNOPSIS
use Config::Record;
my $config = Config::Record->new(file => $filename);
my $config = Config::Record->new(file => $filehandle);
my $param = $config->param($key, [$default]);
DESCRIPTION
This module provides for loading and saving of simple configuration file records. Entries in the configuration file are essentially key,value pairs, with the key and values separated by a single equals symbol. The key
consists only of alphanumeric characters. There are three types of values, scalar values can contain anything except newlines. Trailing whitespace will be trimmed unless the value is surrounded in double quotes. eg
foo = Wizz
foo = "Wizz.... "
Array values consist of a single right round bracket, following by one value
per line, terminated by a single left round bracket. eg
foo = (
Wizz
"Wizz... "
)
Hash values consist of a single right curly bracket, followed by one key,value pair per line, terminated by a single left curly bracket. eg
foo = {
one = Wizz
two = "Wizz.... "
}
Arrays and hashes can be nested to arbitrary depth. While array entries can be optionally separated by commas, howevere, this still does not allow more than one entry per line. Likewise lines can be terminated by a redundant semicolon if desired.
EXAMPLE
name = Foo
title = "Wizz bang wallop"
eek = (
OOhh
Aahhh
Wizz
)
people = (
{
forename = John
surnamne = Doe
}
{
forename = Some
surname = One
}
)
wizz = {
foo = "Elk"
ooh = "fds"
}
METHODS
my $cache = Config::Record->new(file => $file);
Creates a new config object, loading parameters from the file specified by the file
parameter. The file
parameter can either be a string representing a fully qualified filename, or a IO::Handle object.
AUTHORS
Daniel Berrange <dan@berrange.com>
COPYRIGHT
Copyright (C) 2000-2004 Daniel P. Berrange <dan@berrange.com>
SEE ALSO
2 POD Errors
The following errors were encountered while parsing the POD:
- Around line 79:
You can't have =items (as at line 83) unless the first thing after the =over is an =item
- Around line 89:
=back doesn't take any parameters, but you said =back 4