Branch Coverage

blib/lib/Path/Class/File.pm
Criterion Covered Total %
branch 39 68 57.3


line true false branch
21 24 134 if (length $dirs)
25 154 4 @dirs ? :
37 18 0 if defined $self->{'dir'}
44 4 298 unless defined $self->{'dir'}
50 20 1 if defined $self->{'dir'}
57 0 0 unless defined $self->{'dir'}
63 0 8 if @_
70 0 0 unless $_[0]->open('r')
71 0 19 unless $_[0]->open('w')
72 0 0 unless $_[0]->open('a')
76 0 19 if (-e $self) { }
86 0 13 unless my $fh = $self->open($iomode)
88 6 7 if (wantarray)
90 4 2 if $args{'chomped'} or $args{'chomp'}
92 2 4 if (my $splitter = $args{'split'})
101 0 7 if $args{'split'}
104 0 7 if ($args{'chomped'} or $args{'chomp'})
119 0 6 unless my $fh = $self->open($iomode)
121 1 5 if (ref $_[0] eq 'ARRAY') { }
124 0 4 unless print $fh $_[0][$i]
129 0 5 unless print $fh $_[0]
133 0 6 unless close $fh
150 1 1 ref $content eq 'ARRAY' ? :
158 0 7 unless -e $file
165 1 1 if (eval { do { $dest->isa('Path::Class::File') } }) { }
1 0 elsif (eval { do { $dest->isa('Path::Class::Dir') } }) { }
0 0 elsif (ref $dest) { }
167 0 1 if -d $dest
170 0 1 if -f $dest
171 0 1 unless -d $dest
177 0 2 if (not Perl::OSType::is_os_type('Unix')) { }
180 0 0 unless File::Copy::cp($self->stringify, "$dest")
184 0 2 unless system('cp', $self->stringify, "$dest") == 0
194 1 0 if (File::Copy::move($self->stringify, "$dest")) { }