File Coverage

blib/lib/XAS/Lib/App/Service/Unix.pm
Criterion Covered Total %
statement 6 15 40.0
branch 0 2 0.0
condition n/a
subroutine 2 6 33.3
pod 4 4 100.0
total 12 27 44.4


line stmt bran cond sub pod time code
1             package XAS::Lib::App::Service::Unix;
2              
3             our $VERSION = '0.01';
4              
5 1     1   504 use POE;
  1         2  
  1         4  
6              
7             use XAS::Class
8 1         7 debug => 0,
9             version => $VERSION,
10             base => 'XAS::Base',
11             utils => 'daemonize dotid',
12             mixins => 'define_daemon get_service_config
13             install_service remove_service',
14 1     1   230 ;
  1         1  
15              
16             # ----------------------------------------------------------------------
17             # Public Methods
18             # ----------------------------------------------------------------------
19              
20             sub define_daemon {
21 0     0 1   my $self = shift;
22              
23             # become a daemon...
24             # interesting, "daemonize() if ($self->daemon);" doesn't work as expected
25              
26 0           $self->log->debug("pid = $$");
27              
28 0 0         if ($self->daemon) {
29              
30 0           daemonize();
31 0           $poe_kernel->has_forked();
32              
33             }
34              
35 0           $self->log->debug("pid = $$");
36              
37             }
38              
39             sub get_service_config {
40 0     0 1   my $self = shift;
41              
42             }
43              
44             sub install_service {
45 0     0 1   my $self = shift;
46              
47             }
48              
49             sub remove_service {
50 0     0 1   my $self = shift;
51              
52             }
53              
54             # ----------------------------------------------------------------------
55             # Private Methods
56             # ----------------------------------------------------------------------
57              
58             1;
59              
60             __END__