Branch Coverage

lib/Config/HAProxy.pm
Criterion Covered Total %
branch 22 74 29.7


line true false branch
42 0 2 unless open my $fh, '<', $self->filename
54 2 28 if ($_ eq '')
60 1 27 if (/^#.*/)
69 9 18 if ($sections{$kw}) { }
103 0 11 if @{$self->{'_stack'};} == 1
132 0 4 if (ref $file eq 'GLOB') { }
135 0 4 unless open $fh, '>', $file
143 39 13 if ($_{'indent'})
144 3 36 if ($node->is_comment) { }
145 1 2 if ($_{'reindent_comments'})
152 12 24 if ($_{'tabstop'}) { }
156 13 0 if ($i < @{$_{'tabstop'};})
157 1 12 if (($off = $_{'tabstop'}[$i] - length($s)) <= 0)
172 4 0 unless ref $file eq 'GLOB'
178 0 0 if (@_)
179 0 0 if (@_ == 1) { }
0 0 elsif (@_ % 2 == 0) { }
184 0 0 if (defined($v = delete $_{'enable'}))
187 0 0 if (defined($v = delete $_{'command'}))
190 0 0 if (defined($v = delete $_{'path'}))
193 0 0 if keys %_
199 0 0 if ($self->{'_lint'}{'enable'})
201 0 0 if ($self->{'_lint'}{'path'})
203 0 0 unless ('File::Spec'->file_name_is_absolute($prog))
206 0 0 if (-x $name)
211 0 0 if ($args)
223 0 0 if @_ % 2
228 0 0 unless $self->tree
229 0 0 unless $self->tree->is_dirty
234 0 0 if (my $cmd = $self->lint)
237 0 0 unless ($ok)
239 0 0 if ($errbuf and @$errbuf)
245 0 0 if $dry_run
249 0 0 unless rename $tempfile, $self->filename
268 0 0 if (-f $backup)
269 0 0 unless unlink $backup
272 0 0 unless rename $self->filename, $self->backup_name