Branch Coverage

blib/lib/File/Misc.pm
Criterion Covered Total %
branch 0 248 0.0


line true false branch
169 0 0 if (defined $opts{'max'}) { }
180 0 0 unless ($fh = 'FileHandle'->new($path))
181 0 0 if $opts{'quiet'}
185 0 0 if $opts{'bin'}
188 0 0 if ($opts{'firstline'})
193 0 0 if ($stdout)
195 0 0 if ($stderr)
197 0 0 if ($out)
211 0 0 if ($stdout)
213 0 0 if ($stderr)
216 0 0 if ($max and $total > $max)
217 0 0 if ($out)
262 0 0 if (ref $path) { }
266 0 0 if ($opts->{'append'}) { }
279 0 0 unless open $out, $opentype, $path
337 0 0 unless ref $paths
354 0 0 unless ($fh = 'FileHandle'->new($path))
355 0 0 if $opts{'quiet'}
360 0 0 if $opts{'bin'}
369 0 0 if ($skipempty)
370 0 0 unless ($line =~ /\S/s)
381 0 0 if (defined $max and $max > 0 and $total > $max)
409 0 0 unless (-e $path)
548 0 0 unless (defined $base)
564 0 0 if defined $opts{'extension'}
565 0 0 $opts{'dir_slash'} ? :
569 0 0 if (defined $opts{'full_path'}) { }
0 0 elsif (defined $opts{'fullpath'}) { }
588 0 0 if (hascontent($ext_opt = $opts{$key}))
590 0 0 unless ref $ext_opt
612 0 0 if ($opts{'allow_file_root'} and not -d $dir) { }
619 0 0 unless opendir $dh, $dir
624 0 0 if $f eq '.' or $f eq '..'
627 0 0 if ($f =~ /^\./s and not $hidden)
634 0 0 if (-d $f and !(-l $f) || $follow_links) { }
0 0 elsif ($files and allowed_ext($f, \%extensions) and allowed_rx($f, $path_rx)) { }
636 0 0 if (defined $prune_file and -e "$f/$prune_file")
641 0 0 if ($dirs and allowed_ext($f, \%extensions) and allowed_rx($f, $path_rx))
645 0 0 if $recurse
660 0 0 unless ($fullpath)
672 0 0 unless defined $rx
682 0 0 unless %$exts
797 0 0 if ($str =~ s[::][/]g)
802 0 0 unless ($file =~ /\./)
808 0 0 if (-e "$lib/$str")
834 0 0 unless defined $object
835 0 0 unless defined $file_name
841 0 0 if ($opts{'verbose'})
847 0 0 if (ref $object) { }
876 0 0 if (-e $full)
882 0 0 if $verbose
898 0 0 if (-e $path) { }
907 0 0 if (defined $opts{'umask'})
913 0 0 'FileHandle'->new("> $path") ? :
916 0 0 if (defined $opts{'umask'})
949 0 0 unless (-e $dir)
953 0 0 if (defined $opts{'umask'})
962 0 0 if (defined $opts{'umask'})
992 0 0 if (-e $path)
994 0 0 if (-d $path)
1023 0 0 unless ($dir =~ m[/]s)
1067 0 0 unless (-e $root)
1068 0 0 unless mkpath($root)
1078 0 0 if ($path =~ m[/$]s) { }
1079 0 0 unless (-e $full)
1080 0 0 unless mkpath($full)
1092 0 0 if ($dir =~ s[/[^/]+$][]s)
1093 0 0 unless (-e $dir)
1094 0 0 unless mkpath($dir)
1097 0 0 if (-e $full) { }
1103 0 0 unless touch($full)
1130 0 0 if (-e $tgt) { }
1148 0 0 unless (-e $src_full_path)
1154 0 0 if (-e $tgt_full_path)
1156 0 0 if (-d $tgt_full_path) { }
1157 0 0 unless rmtree($tgt_full_path)
1164 0 0 unless unlink $tgt_full_path
1180 0 0 if (-e $tgt_full_path and -d $src_full_path and not -d $tgt_full_path)
1185 0 0 unless unlink $tgt_full_path
1189 0 0 if (not -e $tgt_full_path) { }
0 0 elsif (not -d $src_full_path) { }
1192 0 0 if (-d $src_full_path) { }
1193 0 0 unless mkpath($tgt_full_path)
1205 0 0 if ($dir =~ s[/[^/]+$][]s)
1206 0 0 unless (-e $dir)
1207 0 0 unless mkpath($dir)
1224 0 0 if (File::Compare::compare($src_full_path, $tgt_full_path))
1232 0 0 if ($copy)
1242 0 0 unless ($result)
1258 0 0 unless File::Copy::Recursive::dircopy($src, $tgt)
1278 0 0 if ($change_count and $opts{'change_message_after'})
1282 0 0 unless ($opts{'return_count'})
1293 0 0 if ($opts->{'change_message_during'} and not $opts->{'change_message_during_done'})
1394 0 0 if (defined $opts{'wait'}) { }
1400 0 0 unless (defined $exclusive)
1407 0 0 unless ($lock)
1413 0 0 if ($exclusive) { }
1419 0 0 if ($wait) { }
1420 0 0 unless flock $lock, $mode
1427 0 0 unless flock $lock, $mode
1467 0 0 unless @vals
1655 0 0 unless (defined $rv)
1658 0 0 unless ($rv =~ /^\.+$/s)
1659 0 0 if ($self->{'untaint'})
1664 0 0 if (-e "$self->{'path'}/$rv")
1665 0 0 unless ($rv =~ /^(.+)$/s)
1671 0 0 if ($self->{'fullpath'})
1725 0 0 unless (defined $parent_dir)
1738 0 0 if ($opts{'exact_path'} or $opts{'full_path'}) { }
1746 0 0 unless (-e $parent_dir)
1750 0 0 unless (-d $parent_dir)
1753 0 0 if (defined $opts{'file_name'}) { }
1769 0 0 unless ($self->{'file_name'} =~ /^([a-z0-9]+)$/is)
1774 0 0 if (defined $opts{'extension'})
1778 0 0 if (defined $opts{'prefix'})
1823 0 0 if ($self->{'auto_delete'} and -e $self->{'path'})
1824 0 0 unless unlink $self->{'path'}
1871 0 0 unless (defined $parent_dir)
1875 0 0 unless (-e $parent_dir)
1879 0 0 unless (-d $parent_dir)
1886 0 0 if (defined $opts{'tmp_name'}) { }
1902 0 0 unless mkdir $self->{'path'}
1930 0 0 if (-e $self->{'path'} and $self->{'auto_delete'})
1934 0 0 unless rmtree($self->{'path'})