NAME
App::Milter::Limit::Config - Milter Limit configuration object
VERSION
version 0.53
SYNOPSIS
# pass config file name first time.
my $conf = App::Milter::Limit::Config->instance('/etc/mail/milter-limit.conf');
# after that, just call instance()
$conf = App::Milter::Limit::Config->instance();
# global config section
my $global = $conf->global;
my $limit = $global->{limit};
# log section
my $log_conf = $conf->section('log');
my $ident = $log_conf->{identity};
# driver section
my $driver = $conf->section('driver');
my $home = $driver->{home};
DESCRIPTION
App::Milter::Limit::Config
is holds the configuration data for milter-limit. The configuration data is read from an ini-style config file as a Config::Tiny
object.
METHODS
instance $config_file
reads the ini style configuration from $config_file
and returns the Config::Tiny
object
instance
get the configuration Config::Tiny object.
global
get global configuration section (hashref)
section
get the configuration for the given section name
set_defaults $section, %defaults
set default values for a config section. This will fill in the values from %defaults
in the given $section
name if the keys are not already set. Most likely you would call this as part of your plugin's init()
method to set plugin specific defaults.
SEE ALSO
SOURCE
The development version is on github at https://github.com/mschout/milter-limit and may be cloned from git://github.com/mschout/milter-limit.git
BUGS
Please report any bugs or feature requests to bug-app-milter-limit@rt.cpan.org or through the web interface at: http://rt.cpan.org/Public/Dist/Display.html?Name=App-Milter-Limit
AUTHOR
Michael Schout <mschout@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2010 by Michael Schout.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.