Branch Coverage

blib/lib/AnyEvent/Filesys/Watcher.pm
Criterion Covered Total %
branch 60 84 71.4


line true false branch
33 1 31 if (exists $args{'cb'} and not exists $args{'callback'})
37 0 32 if (exists $args{'dirs'} and not exists $args{'directories'})
41 16 16 if ($backend_class) { }
16 0 elsif ($^O eq 'linux') { }
0 0 elsif ($^O eq 'darwin') { }
0 0 elsif ($^O eq 'MSWin32') { }
0 0 elsif ($^O =~ /bsd/) { }
43 15 1 unless ($backend_class =~ s/^\+//)
67 1 31 if ($@)
68 0 1 if ($@ =~ /^Can't locate $backend_module in \@INC/)
91 0 32 if (exists $args{'dirs'} and not exists $args{'directories'})
95 0 32 if (exists $args{'cb'} and not exists $args{'callback'})
99 0 32 unless (exists $args{'callback'})
104 0 32 if (builtin::reftype($args{'callback'}) ne "CODE")
109 0 32 if (exists $args{'raw_events'} and builtin::reftype($args{'raw_events'}) ne "CODE")
114 32 0 unless (exists $args{'base_dir'})
118 0 32 unless (exists $args{'directories'})
122 32 0 unless exists $args{'interval'}
124 21 11 unless ref $args{'directories'}
125 19 13 if (exists $args{'filter'} and defined $args{'filter'} and length $args{'filter'}) { }
155 0 47 if (@_ > 1)
165 0 52 if (@_ > 1)
178 43 8 ref $args[0] eq 'ARRAY' ? :
186 3 404 unless my(%stat) = $self->_stat($path)
198 0 407 if ("MSWin32" eq $^O or "cygwin" eq $^O or "os2" eq $^O or "dos" eq $^O)
212 12 75 if (not exists $new_fs->{$path}) { }
14 61 elsif ($self->__isPathModified($old_fs->{$path}, $new_fs->{$path})) { }
230 15 75 unless (exists $old_fs->{$path})
246 18 10 if (@_ > 1)
256 32 0 if (@_ > 1)
266 3 44 if ($self->{'__raw_events'})
275 47 0 if (@events)
277 47 0 if @events
313 42 28 if (@_ > 1)
327 1 18 unless (ref $filter)
332 2 17 if ('REGEXP' eq $reftype) { }
0 17 elsif ($reftype ne 'CODE') { }
357 3 404 unless @stat
372 5 70 if $new_path->{'mode'} != $old_path->{'mode'}
373 33 37 if $new_path->{'is_directory'}
374 6 31 if $new_path->{'mtime'} != $old_path->{'mtime'}
375 3 28 if $new_path->{'size'} != $old_path->{'size'}