Bump version and update Changes
[app-fonbot-daemon.git] / lib / App / FonBot / Daemon.pm
CommitLineData
8dc70d07
MG
1package App::FonBot::Daemon;
2
b8d4a547 3our $VERSION = '0.001';
8dc70d07
MG
4
5use 5.014000;
6use strict;
7use warnings;
8
9use Log::Log4perl qw//;
10use POE;
11
12use App::FonBot::Plugin::Config;
13use App::FonBot::Plugin::Common;
14use App::FonBot::Plugin::OFTC;
15use App::FonBot::Plugin::BitlBee;
16use App::FonBot::Plugin::HTTPD;
2f9aba44 17use App::FonBot::Plugin::Email;
8dc70d07
MG
18
19use sigtrap qw/die normal-signals/;
20
2f9aba44 21use constant PLUGINS => map { "App::FonBot::Plugin::$_" } qw/Config Common OFTC BitlBee HTTPD Email/;
8dc70d07
MG
22
23##################################################
24
25sub run{
962dff7b
MG
26 Log::Log4perl->init('/etc/fonbotd/log4perl.conf');
27 chdir '/var/lib/fonbot';
28 $_->init for PLUGINS;
29 POE::Kernel->run;
8dc70d07
MG
30}
31
32sub finish{
962dff7b 33 $_->fini for reverse PLUGINS
8dc70d07
MG
34}
35
361;
37
38__END__
39
40=head1 NAME
41
42App::FonBot::Daemon - FonBot daemon
43
44=head1 SYNOPSIS
45
46 use App::FonBot::Daemon;
47 App::FonBot::Daemon::run;
48 END { App::FonBot::Daemon::finish }
49
50=head1 DESCRIPTION
51
52This module is the entry point of the FonBot Daemon
53
54=head1 FUNCTIONS
55
56=over
57
58=item B<run>
59
60Runs the FonBot daemon
61
62=item B<finish>
63
64Runs the plugin finalizers
65
66=back
67
68=head1 AUTHOR
69
70Marius Gavrilescu C<< <marius@ieval.ro> >>
71
72=head1 COPYRIGHT AND LICENSE
73
b8d4a547 74Copyright 2013-2015 Marius Gavrilescu
8dc70d07
MG
75
76This file is part of fonbotd.
77
78fonbotd is free software: you can redistribute it and/or modify
79it under the terms of the GNU Affero General Public License as published by
80the Free Software Foundation, either version 3 of the License, or
81(at your option) any later version.
82
83fonbotd is distributed in the hope that it will be useful,
84but WITHOUT ANY WARRANTY; without even the implied warranty of
85MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
86GNU Affero General Public License for more details.
87
88You should have received a copy of the GNU Affero General Public License
89along with fonbotd. If not, see <http://www.gnu.org/licenses/>
90
91
92=cut
This page took 0.014547 seconds and 4 git commands to generate.