App::Slackeria::Config - Get config values for App::Slackeria and plugins
use App::Slackeria::Config; my $conf = App::Slackeria::Config->new(); for my $name ($conf->plugins()) { my $plugin_conf = $conf->get('config', $name); # load plugin } for my $project ($conf->projects()) { for my $name ($conf->plugins()) { my $plugin_conf = $conf->get($project, $name); # run plugin } }
version 0.12
App::Slackeria::Config uses Config::Tiny(3pm) to load config files.
Returns a new App::Slackeria::Config object. Does not take any arguments.
Returns a hashref containing the section of the config file name. If name does not exist or does not contain section, returns a reference to an empty hash. If name is not config and section does not have a name field, sets name to name in the hashref.
Loads $XDG_CONFIG_HOME/slackeria/name (defaulting to ~/.config/slackeria/name) and saves its content internally. If the config file does not exist, saves an empty hashref.
$config->get automatically calls this, so there should be no need for you to use it.
Returns an array of all projects, as listed in the projects key in the slackeria section of the config file.
Returns an array of all plugins, which is actually just a list of all sections in the config file.
Config::Tiny, File::BaseDir.
slackeria(1)
Copyright (C) 2011 by Daniel Friesel <derf@finalrewind.org>
0. You just DO WHAT THE FUCK YOU WANT TO.