NAME
OpenFrame::Config - Simple OpenFrame configuration
SYNOPSIS
use OpenFrame::Config;
my $config = OpenFrame::Config->new();
my $value = $config->getKey('fred');
$config->setKey('rainy', 'yes');
DESCRIPTION
This module is a simple configuration interview for OpenFrame. All OpenFrame configuration will use this module.
[Insert more docs here]
METHODS
new
This is the constructor.
my $config = OpenFrame::Config->new();
writeConfig
The configuration file will be automatically written out when the object goes out of scope. However, this can be forced by using the writeConfig method:
$config->writeConfig();
setKey
The setKey() method adds additional information to the configuration. It takes a key and a value:
$config->setKey('rainy', 'yes');
isKey
The isKey() method returns whether a key is part of the configuration, much like the exists() function for Perl hashes. It takes a key:
my $is_it_rainy = $config->isKey('rainy');
getKey
The getKey() method returns information from the configuration. It takes a key:
my $value = $config->getKey('rainy');
deleteKey
The deleteKey() method deletes information from the configuration. It takes a key:
$config->deleteKey('rainy');
sourceFile
The sourceFile() method returns the filename that the configuration is saved in.
my $filename = $config->sourceFile();
AUTHOR
James A. Duncan <jduncan@fotango.com>, Leon Brocard <leon@fotango.com>
COPYRIGHT
Copyright (C) 2001, Fotango Ltd.
This module is free software; you can redistribute it or modify it under the same terms as Perl itself.