Branch Coverage

lib/Ubic/Daemon/PidState.pm
Criterion Covered Total %
branch 15 40 37.5


line true false branch
28 0 729 if not -d $dir and -s $dir
29 406 323 if -d $dir and -s "$dir/pid"
37 0 150 if (-e $dir and not -d $dir)
39 0 0 unless unlink $dir
41 103 47 unless (-d $dir)
42 0 103 unless mkdir $dir
54 406 0 if ($content =~ /\A pid \s+ (\d+) \n guid \s+ (.+) (?: \n daemon \s+ (\d+) )? \Z/x) { }
0 0 elsif ($content eq '') { }
71 406 0 if (-d $dir) { }
74 0 406 unless ($open_success)
75 0 0 if ($!{'ENOENT'}) { }
87 0 0 if (-f $dir and not -s $dir)
90 0 0 unless open my $fh, '<', $dir
92 0 0 if ($content =~ /\A (\d+) \Z/x) { }
106 353 0 if (-d $dir) { }
119 22 0 if (-d $dir) { }
120 5 17 if (-e "$dir/pid")
121 0 5 unless unlink "$dir/pid"
125 0 0 unless unlink $dir
132 0 0 unless (-d $dir)