Branch Coverage

blib/lib/Hub/Base/FileSystem.pm
Criterion Covered Total %
branch 20 258 7.7


line true false branch
118 0 8 unless defined $handle
119 8 0 $readonly ? :
121 0 8 if ($@ or not $flocked)
128 0 0 unless -e $lock_filename
129 0 0 if $readonly
133 0 0 if (open LOCKFILE, ">$lock_filename") { }
137 0 0 unless $readonly
153 8 0 if (defined $handle)
157 8 0 if ($filename)
161 0 8 if -e $lock_filename
186 0 0 if ($fh->open($file))
188 0 0 if $$opts{'mtime'}
189 0 0 if $$opts{'atime'}
190 0 0 if $$opts{'ctime'}
193 0 0 $$opts{'max'} ? :
271 0 0 if defined $$opts{$_} and ref $$opts{$_} ne 'ARRAY'
275 0 0 if (defined $opt_hash)
276 0 0 if (ref $opt_hash eq 'HASH') { }
284 0 0 if defined $$Hub::Base::FileSystem::Hub{'/sys/ENV/GLOBAL_IGNORE'}
286 0 0 if defined $$Hub::Base::FileSystem::Hub{'/sys/ENV/GLOBAL_EXCLUDE'}
290 0 0 unless (-d $dir)
292 0 0 if (-d $path)
311 0 0 defined $found ? :
321 0 0 unless defined $d
323 0 0 unless /^\.+$/
335 0 0 if (@{$$opts{'include'};})
338 0 0 if ($i =~ /$_/)
346 0 0 if (@{$$opts{'name'};})
349 0 0 if ($name =~ /$_/)
358 0 0 if ($i =~ /$_/)
365 0 0 if (-d $i) { }
366 0 0 if $$opts{'filesonly'}
370 0 0 if ($i =~ /$_/)
375 0 0 if ($recurse)
379 0 0 if $$opts{'dirsonly'}
383 0 0 if ($ok)
391 0 0 if ref $found eq 'ARRAY'
430 0 0 if isa($perms, 'HASH')
432 0 0 unless -d $source_dir
433 0 0 unless -d $target_parent
435 0 0 if ($$opts{'as_subdir'}) { }
0 0 elsif ($$opts{'peers'}) { }
436 0 0 if $target_dir
447 0 0 if (-d $item) { }
448 0 0 if (not -d $target or $$opts{'force'})
477 0 0 if isa($perms, 'HASH')
479 0 0 ref $source eq 'HASH' ? :
0 0 -f $source ? :
484 0 0 unless -f $file
486 0 0 if (-d $target)
491 0 0 unless ($copy)
494 0 0 if (not $target_stats or $source_stats->mtime > $target_stats->mtime)
498 0 0 if ($copy)
501 0 0 if (copy($file, $target)) { }
509 0 0 wantarray ? :
0 0 Hub::sizeof(\@result) == 1 ? :
544 0 0 unless defined $dir and -d $dir
546 0 0 if (opendir $fh, $dir)
552 0 0 if (-f $i) { }
0 0 elsif (-d $i) { }
591 0 0 if isa($perms, 'HASH')
592 0 0 $$opts{'recperms'} ? :
594 0 0 if (-d $target) { }
599 0 0 if (isa($$opts{'fmode'}, 'HASH')) { }
601 0 0 if ($$opts{'fmode'}{$ext}) { }
604 0 0 if $$opts{'fmode'}{'*'}
609 0 0 if $mode
645 0 0 if ($HAS_WIN32 and $mode ne 'SKIP') { }
651 0 0 unless ($owner)
656 0 0 if $owner
658 0 0 if $group
659 0 0 if $other
660 0 0 unless $passed
680 0 0 if (defined $owner)
681 0 0 unless (chown Hub::getuid($owner), Hub::getgid($group), $target)
686 0 0 length sprintf('%o', $mode) > 3 ? :
687 0 0 if ($mode ne 'SKIP')
688 0 0 unless (chmod $mode, $target)
704 0 0 -d $target ? :
708 0 0 if ref $mmargs eq 'ARRAY'
709 0 0 if (@mmargs)
716 0 0 if ($@)
717 0 0 unless $retval
718 0 0 if ($flag) { }
724 0 0 if ($@)
738 0 0 unless defined $path
739 0 0 if -d $path
740 0 0 if (mkdir $path) { }
741 0 0 if %$opts
755 0 0 unless my $filepath = shift()
757 0 0 if (open FILE, $filepath)
771 0 1 unless -d $dir
772 0 1 unless opendir DIR, $dir
800 0 9 if (-f $md_filename)
805 0 0 if (isa($order, 'ARRAY'))
823 8 0 if @_
827 8 0 if ($fh)
831 8 0 if defined $$opts{'asa'}
852 0 0 unless $filepath
853 0 0 unless defined $contents
857 0 0 if ($fh)
858 0 0 ref $contents eq 'SCALAR' ? :
860 0 0 if (defined $$opts{'perms'})
888 0 0 @_ ? :
889 0 0 unless $$opts{'alone'}
895 0 0 if $$opts{'inline'}
896 0 0 $$opts{'as_ref'} ? :
923 0 0 if -e $unknown
929 0 0 unless defined $_ and $_
931 0 0 if (-e $spec)
948 0 0 defined Hub::getaddr($abspath) ? :
1006 0 0 unless defined $path
1008 0 0 unless defined $dir
1009 0 0 if $path =~ s/^$dir//
1056 0 8 unless defined $_[0]
1076 0 0 $ret eq $fn ? :
1092 0 0 unless defined $real_path
1095 0 0 $real_path ? :
1109 8 32 if ($$opts{'must_exist'}) { }
1111 0 8 unless (-e $result)
1115 0 8 unless -e $result
1132 17 23 if $relative_path =~ m[^/|^[A-Za-z]:/]
1134 0 23 unless $base_dir =~ m[^/|^[A-Za-z]:/]
1155 0 0 unless $path =~ m[/]
1161 0 0 unless defined $path_parts[$idx]
1162 0 0 if $from_parts[$idx] ne $path_parts[$idx]
1183 0 0 unless $abs_path
1184 0 0 if -e $abs_path
1188 0 0 if -d $build_path