File Coverage

blib/lib/App/FonBot/Daemon.pm
Criterion Covered Total %
statement 13 15 86.6
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 18 20 90.0


line stmt bran cond sub pod time code
1             package App::FonBot::Daemon;
2              
3             our $VERSION = '0.000_4';
4              
5 1     1   49026 use 5.014000;
  1         8  
  1         48  
6 1     1   7 use strict;
  1         2  
  1         45  
7 1     1   6 use warnings;
  1         6  
  1         159  
8              
9 1     1   2073 use Log::Log4perl qw//;
  1         61794  
  1         19  
10 1     1   464 use POE;
  0            
  0            
11              
12             use App::FonBot::Plugin::Config;
13             use App::FonBot::Plugin::Common;
14             use App::FonBot::Plugin::OFTC;
15             use App::FonBot::Plugin::BitlBee;
16             use App::FonBot::Plugin::HTTPD;
17              
18             use sigtrap qw/die normal-signals/;
19              
20             use constant PLUGINS => map { "App::FonBot::Plugin::$_" } qw/Config Common OFTC BitlBee HTTPD/;
21              
22             ##################################################
23              
24             sub run{
25             Log::Log4perl->init('/etc/fonbotd/log4perl.conf');
26             chdir '/var/lib/fonbot';
27             $_->init for PLUGINS;
28             POE::Kernel->run;
29             }
30              
31             sub finish{
32             $_->fini for reverse PLUGINS
33             }
34              
35             1;
36              
37             __END__