App-RoboBot

 view release on metacpan or  search on metacpan

lib/App/RoboBot/Config.pm  view on Meta::CPAN

package App::RoboBot::Config;
$App::RoboBot::Config::VERSION = '4.004';
use v5.20;

use namespace::autoclean;

use Moose;
use MooseX::SetOnce;

use Config::Any::Merge;
use DBD::Pg;
use DBIx::DataStore;
use File::HomeDir;
use Log::Log4perl;
use Log::Log4perl::Appender::Screen;
use Try::Tiny;

use App::RoboBot::NetworkFactory;
use App::RoboBot::Channel;
use App::RoboBot::Nick;

has 'bot' => (
    is       => 'ro',
    isa      => 'App::RoboBot',
    required => 1,
);

has 'config_paths' => (
    is        => 'rw',
    isa       => 'ArrayRef[Str]',
    traits    => [qw( SetOnce )],
    predicate => 'has_config_paths',
);

has 'config' => (
    is        => 'rw',
    isa       => 'HashRef',
    predicate => 'has_config',
);

has 'networks' => (
    is  => 'rw',
    isa => 'HashRef',
);

has 'channels' => (
    is  => 'rw',
    isa => 'ArrayRef[App::RoboBot::Channel]',
);

has 'plugins' => (
    is      => 'rw',
    isa     => 'HashRef',
    default => sub { {} },
);

has 'db' => (
    is => 'rw',
    isa => 'DBIx::DataStore',
    traits => [qw( SetOnce )],
);

sub load_config {
    my ($self) = @_;



( run in 0.900 second using v1.01-cache-2.11-cpan-39bf76dae61 )