Bot::Cobalt::Core::Role::EasyAccessors
## Inside a Bot::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;
Bot::Cobalt core interface role providing simple methods for accessing some of the configuration state tracked by Bot::Cobalt::Core.
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.
$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).
$core->cfg->plugins->plugin( $core->get_plugin_alias($self) );
Jon Portnoy <avenj@cobaltirc.org>
To install Bot::Cobalt, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bot::Cobalt
CPAN shell
perl -MCPAN -e shell install Bot::Cobalt
For more information on module installation, please visit the detailed CPAN module installation guide.