
Bot::Cobalt::Core::Role::EasyAccessors - Easy configuration accessors

## Inside a Cobalt plugin: # Current plugin alias: my $current_alias = $core->get_plugin_alias($self); ## Channels hash for specified context: my $chan_cf_hash = $core->get_channels_cfg($context); ## opts() hash for specified plugin object or alias: my $plugin_cf = $core->get_plugin_cfg($self); ## Core configuration object (Bot::Cobalt::Conf::File::Core): my $core_cf = $core->get_core_cfg;

Simple methods for accessing some of the configuration state tracked by Bot::Cobalt::Core.
You might prefer Bot::Cobalt::Core::Sugar when writing plugins.
Returns the channel configuration hash for the specified context (or an empty hash).
Same as:
$core->cfg->channels->context($context) || {};
Returns the core's Bot::Cobalt::Conf::File::Core object.
Same as:
$core->cfg->core
Takes an object (or a stringified object, but this happens automatically) and returns the registered alias for the plugin if it is loaded.
Retrieves the current 'opts()' configuration hash for the specified plugin (or an empty hash).
Takes either a plugin object (as a reference only) or a plugin alias (as a string).
Same as:
$core->cfg->plugins->plugin(
$core->get_plugin_alias($self)
);

Jon Portnoy <avenj@cobaltirc.org>