Branch Coverage

blib/lib/Filesys/Notify/Simple.pm
Criterion Covered Total %
branch 13 32 40.6


line true false branch
14 0 5 unless (ref $path eq 'ARRAY')
35 0 5 if ($^O eq 'linux' and 1 and eval { do { require Linux::Inotify2; 1 } }) { }
0 5 elsif ($^O eq 'darwin' and 1 and eval { do { require Mac::FSEvents; 1 } }) { }
0 5 elsif ($^O eq 'freebsd' || $^O eq 'openbsd' and 1 and eval { do { require Filesys::Notify::KQueue; 1 } }) { }
0 5 elsif ($^O eq 'MSWin32' and 1 and eval { do { require Win32::ChangeNotify; 1 } }) { }
0 5 elsif ($^O eq 'cygwin' and 1 and eval { do { require Win32::ChangeNotify; 1 } }) { }
58 0 0 unless $inotify->watch($path, &IN_MODIFY | &IN_CREATE | &IN_DELETE | &IN_DELETE_SELF | &IN_MOVE_SELF | &IN_MOVE)
99 0 0 if @events
125 0 0 $is_cygwin ? :
137 0 0 unless defined $idx
138 0 0 if ($idx > 0)
145 0 0 if @events
166 4 2 if @events
177 2 18 if (not exists $new->{$dir}{$path}) { }
0 18 elsif (not $new->{$dir}{$path}{'is_dir'} and $old->{$dir}{$path}{'mtime'} != $new->{$dir}{$path}{'mtime'} || $old->{$dir}{$path}{'size'} != $new->{$dir}{$path}{'size'}) { }
200 1 16 unless my $fp = eval { do { Cwd::realpath($path) } }