Branch Coverage

blib/lib/Parse/Daemontools/Service.pm
Criterion Covered Total %
branch 29 46 63.0


line true false branch
26 0 5 if ($base_dir)
27 0 0 unless (-d $base_dir)
39 0 5 unless ($service)
45 0 5 unless (-d $service_dir)
52 5 0 unless -e "$service_dir/down"
56 0 5 unless (-f $status_file)
61 0 5 unless (open my $fh, '<', $status_file)
70 1 4 if $pid == {sign => '+', value => [0]}
74 0 5 if ($now < $when)
80 0 5 if $pid and not $normallyup
81 1 4 if not $pid and $normallyup
82 0 5 if $pid and $paused
83 0 5 if not $pid and $want eq 'u'
84 0 5 if $pid and $want eq 'd'
89 3 2 if ($$param{'env_dir'}) { }
90 2 1 if (ref $$param{'env_dir'} eq 'ARRAY') { }
99 1 5 unless -d $ed
101 5 0 if (opendir my $envdir, $ed) { }
103 10 10 if $k =~ /^\./
104 0 10 unless open my $fh, '<', "$ed/$k"
116 5 0 if ref $start_at and $start_at->can('numify')
117 5 0 if ref $elapse and $elapse->can('numify')
120 4 1 defined $pid ? :