Branch Coverage

blib/lib/File/Unsaved.pm
Criterion Covered Total %
branch 17 36 47.2


line true false branch
95 1 5 unless -f $path
103 3 2 unless -l $spath
105 1 1 if ($target =~ /\A(.+)\@(.+)\.(\d+):(\d+)\z/) { }
1 0 elsif ($target =~ /\A(.+)\@(.+)\.(\d+)\z/) { }
108 0 1 if ($check_pid)
109 0 0 unless kill 0, $res->{'pid'}
110 0 0 if ($check_proc_name and eval { do { require Proc::Find; 1 } })
112 0 0 unless Proc::Find::proc_exists('pid', $res->{'pid'}, 'name', qr/\b(emacs)\b/)
120 0 1 if ($check_pid)
121 0 0 unless kill 0, $res->{'pid'}
122 0 0 if ($check_proc_name and eval { do { require Proc::Find; 1 } })
125 0 0 unless $findres
137 1 2 unless -f $spath
138 0 2 if -M $spath > -M $path
139 0 2 unless open my $fh, '<', $spath
140 0 2 unless sysseek $fh, 1007, 0
141 1 1 unless sysread $fh, my $data, 1
142 0 1 unless $data eq 'U'