NAME

Bot::Net::Config - the configuration for your bot net

SYNOPSIS

my $config = Bot::Net->config;

my $bot_config    = $config->bot('CopyBot');
my $server_config = $config->server('MasterHost');

head1 DESCRIPTION

This module loads and stores the configuration for your bot net. The bot net configuration is typically stored in etc/config.yml of your bot net application directory. However, you can have multiple configurations, which can be specified to the spawn command using the --config option.

METHODS

new

You should not need to call this method directory. Instead:

my $config = Bot::Net->config;

will call the constructor as needed.

net [ KEY ]

The main configuration file for your Bot::Net application is stored in etc/net.yml. This returns a single value from that file if a KEY is specified or returns the entire configuration if no key is given.

net_file

Returns the path to the main configuration file for your Bot::Net application, which is stored in etc/net.yml.

load_config TYPE NAME

Reloads one of the configuration files. You normally won't need to call this method, it will be called automatically.

save_config

Saves a configuration file. This can be useful when making changes to the configuration from within a bot that you would liked saved for future use.

server_file NAME

Returns the location of the configuration for the server named NAME.

server NAME

Returns the configuration for the named server.

bot_file NAME

Returns the location of the bot configuration file for the named bot.

bot NAME

Returns teh configuration for the named bot. This will include the default configuration and bot-specific overrides.

AUTHORS

Andrew Sterling Hanenkamp <hanenkamp@cpan.org>

COPYRIGHT AND LICENSE

Copyright 2007 Boomer Consulting, Inc. All Rights Reserved.

This program is free software and may be modified and distributed under the same terms as Perl itself.