Branch Coverage

blib/lib/Connector/Builtin/File/Path.pm
Criterion Covered Total %
branch 27 42 64.2


line true false branch
53 0 0 unless (-d $self->{'LOCATION'})
68 0 6 unless (-r $filename)
85 1 1 if (scalar @path == 0)
99 1 3 if (scalar @path == 0)
119 10 2 if ($self->content) { }
123 4 6 if ref $data eq ""
125 0 10 unless $template->process(\$self->content, $data, \$content)
127 0 2 if (ref $data ne "")
134 1 11 if ($mode eq "fail" and -f $filename)
138 1 10 if ($mode eq "silent" and -f $filename)
142 2 8 if (my $mode = $self->mode)
143 1 1 if ($mode =~ /\A[0-7]{4}\z/) { }
152 0 9 if (my $user = $self->user)
153 0 0 unless $uid = getpwnam $user
157 0 9 if (my $group = $self->group)
158 0 0 unless $gid = getgrnam $group
161 1 8 if ($mode eq 'append' and -f $filename) { }
162 0 1 unless open FILE, ">>", $filename
164 2 6 unless open FILE, ">", $filename
170 0 7 if ($gid)
171 0 0 unless chown $uid, $gid, $filename