Branch Coverage

lib/Config/HAProxy.pm
Criterion Covered Total %
branch 35 74 47.3


line true false branch
42 0 3 unless open my $fh, '<', $self->filename
54 2 32 if ($_ eq '')
60 1 31 if (/^#.*/)
69 10 21 if ($sections{$kw}) { }
103 0 13 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 4 5 if (@_)
179 2 2 if (@_ == 1) { }
2 0 elsif (@_ % 2 == 0) { }
184 2 0 if (defined($v = delete $_{'enable'}))
187 1 1 if (defined($v = delete $_{'command'}))
190 0 2 if (defined($v = delete $_{'path'}))
193 0 2 if keys %_
199 5 4 if ($self->{'_lint'}{'enable'})
201 0 5 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