
Youri::Config - Youri configuration handler

use Youri::Config;
my $app = Youri::Config->new(
options => {
help => '|h!'
},
directories => [ '/etc/youri', "$ENV{HOME}/.youri" ],
file => 'app.conf',
);
# get command line argument
my $foo = $app->get_arg('foo');
# get configuration file parameter
my $bar = $app->get_param('bar');

This class handle configuration for all YOURI applications.
The command line specification is used to manage arguments through Getopt::Long. Unless --config argument is given, the list of directories is then scanned for a file with given name, and halt as soon as it find one. If no readable file is found, an exception is thrown. The file is then processed through YAML::AppConfig. If parsing fails, an exception is thrown.

In addition to the application-specific optional or mandatory parameters, all YOURI applications support the following optional top-level parameters:
A list of additional configuration files.
An arbitrary variable, usable everywhere else in the file.
All YOURI application heavily rely on plugins defined in their configuration files. A plugin definition is composed from the following parameters:

Creates and returns a new Youri::Config object.

Returns the command-line argument $arg.
Returns the configuration file parameter $param.

Copyright (C) 2002-2006, YOURI project
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.