
Config::Record - loading of configuration records

use Config::Record;
my $config = Config::Record->new(filename => $filename,
cache => $cache,
locales => [ "en_EN", "en_US"],
path => \@path,
data => \%data);
my $param = $config->param($key, [$default]);

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.

name = Foo
title = "Wizz bang wallop"
eek = (
OOhh
Aahhh
Wizz
)
people = (
{
forename = John
surnamne = Doe
}
{
forename = Some
surname = One
}
)
wizz = {
foo = "Elk"
ooh = "fds"
}

my $cache = Config::Record->new(filename => $filename, [cache => $cache], [locale => $locale], [path => \@path]);
Creates a new config object, loading parameters from the file specified by the
filenameparameter. Thecacheparameter optionally specifies an instance of theCache::Cacheinterface to be used for caching the contents of a file.

Daniel Berrange <dan@berrange.com>

Copyright (C) 2000-2004 Daniel P. Berrange <dan@berrange.com>
