Branch Coverage

blib/lib/Net/Daemon.pm
Criterion Covered Total %
branch 0 174 0.0


line true false branch
175 0 0 if $$o{'description'}
201 0 0 unless (-f $file)
205 0 0 if ($@)
208 0 0 if (not $copts or ref $copts ne 'HASH')
234 0 0 $attr ? :
239 0 0 if ($args)
243 0 0 unless (&Getopt::Long::GetOptions($options, @optList))
248 0 0 if ($$options{'help'})
251 0 0 if ($$options{'version'})
258 0 0 if ($file)
265 0 0 if ($$self{'childs'}) { }
0 0 elsif (not defined $$self{'mode'}) { }
268 0 0 if (eval { do { require threads } }) { }
0 0 elsif (eval { do { require Thread } }) { }
274 0 0 if ($^O ne 'MSWin32')
276 0 0 if (defined $pid)
277 0 0 unless ($pid)
282 0 0 if ($fork) { }
290 0 0 if ($$self{'mode'} eq 'ithreads') { }
0 0 elsif ($$self{'mode'} eq 'threads') { }
0 0 elsif ($$self{'mode'} eq 'fork') { }
0 0 elsif ($$self{'mode'} eq 'single') { }
303 0 0 unless exists $$self{'catchint'}
305 0 0 if ($$self{'childs'})
339 0 0 $$self{'proto'} eq 'unix' ? :
344 0 0 if ($$self{'clients'})
346 0 0 if ($$self{'proto'} eq 'unix') { }
356 0 0 @addrs ? :
358 0 0 if $name
359 0 0 if $aliases
363 0 0 unless ($$client{'mask'})
367 0 0 ref $$client{'mask'} ? :
375 0 0 if $$self{'mode'} eq 'threads'
379 0 0 if ($alias =~ /$mask/)
387 0 0 unless ($found and $$found{'accept'})
432 0 0 if @_
473 0 0 if ($$self{'mode'} eq 'single') { }
0 0 elsif ($$self{'mode'} eq 'threads') { }
0 0 elsif ($$self{'mode'} eq 'ithreads') { }
481 0 0 unless 'Thread'->new($startfunc, $self, $method, @args)
489 0 0 unless 'threads'->new($startfunc, $self, $method, @args)
493 0 0 unless defined $pid
494 0 0 if $pid
519 0 0 if (not $self->Accept) { }
526 0 0 if $@
533 0 0 if $$self{'mode'} eq 'fork' or $$self{'childs'}
543 0 0 if $reaper
545 0 0 unless ($$self{'socket'})
546 0 0 $$self{'localpath'} ? :
548 0 0 if ($$self{'proto'} eq 'unix') { }
549 0 0 unless my $path = $$self{'localpath'}
552 0 0 if -e $path
555 0 0 unless $$self{'socket'} = 'IO::Socket::UNIX'->new('Local', $path, 'Listen', $$self{'listen'} || 10)
561 0 0 unless $$self{'socket'} = 'IO::Socket::INET'->new('LocalAddr', $$self{'localaddr'}, 'LocalPort', $$self{'localport'}, 'Proto', $$self{'proto'} || 'tcp', 'Listen', $$self{'listen'} || 10, 'Reuse', 1)
572 0 0 if ((my $pidfile = $$self{'pidfile'} || '') ne 'none')
575 0 0 unless open OUT, ">$pidfile" and print OUT "$$\n" and close OUT
581 0 0 if (my $dir = $$self{'chroot'})
583 0 0 unless (chroot $dir)
587 0 0 if (my $group = $$self{'group'})
590 0 0 unless ($group =~ /^\d+$/)
591 0 0 if (defined(my $gid = getgrnam $group)) { }
599 0 0 if (my $user = $$self{'user'})
602 0 0 unless ($user =~ /^\d+$/)
603 0 0 if (defined(my $uid = getpwnam $user)) { }
612 0 0 if ($$self{'childs'})
618 0 0 unless defined $pid
619 0 0 unless ($pid)
626 0 0 if ($pid)
643 0 0 if (@pids)
645 0 0 if @pids
651 0 0 $$self{'loop-timeout'} ? :
660 0 0 if ($time)
663 0 0 if $t < 0
667 0 0 if ($nfound < 0) { }
0 0 elsif ($nfound) { }
668 0 0 if (not $child_pid and $! != 4 || !$$self{'catchint'})
675 0 0 if (not $client) { }
676 0 0 if (not $child_pid and $! != 4 || !$$self{'catchint'})
682 0 0 if ($$self{'debug'})
683 0 0 $$self{'proto'} eq 'unix' ? :
693 0 0 if $sth
694 0 0 if ($$self{'mode'} eq 'fork')
699 0 0 if ($time)
701 0 0 if ($t >= $time)
703 0 0 if ($$self{'loop-child'}) { }
717 0 0 if $socket
723 0 0 if $socket