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