Branch Coverage

blib/lib/FusionInventory/Agent/Config.pm
Criterion Covered Total %
branch 32 70 45.7


line true false branch
74 5 2 if (defined $params{'options'}{'conf-file'})
94 0 1 $FusionInventory::Agent::Config::OSNAME eq 'MSWin32' ? :
1 1 $config ? :
8 2 $confFile ? :
101 0 10 if ($backend eq 'registry')
102 0 0 unless $FusionInventory::Agent::Config::OSNAME eq 'MSWin32'
108 10 0 if ($backend eq 'file')
116 0 0 if ($backend eq 'none')
143 0 0 unless my $machKey = $Registry->Open('LMachine', {'Access', Win32::TieRegistry::KEY_READ()})
150 0 0 unless $rawKey =~ m[^/(\S+)]
158 0 0 if (exists $default->{$key}) { }
169 8 2 $params->{'file'} ? :
171 10 0 if ($file) { }
172 0 10 unless -f $file
173 0 10 unless -r $file
179 0 10 unless (open $handle, '<', $file)
186 52 217 if ($line =~ /([\w-]+)\s*=\s*(.+)/)
195 52 0 if (exists $default->{$key}) { }
218 10 0 unless defined $self->{$old}
220 0 0 if $old =~ /^no-/ and not $self->{$old}
228 0 0 if ($handler->{'new'})
229 0 0 if (ref $handler->{'new'} eq 'HASH') { }
0 0 elsif (ref $handler->{'new'} eq 'ARRAY') { }
233 0 0 if ($value =~ /^\+(\S+)/) { }
236 0 0 $self->{$key} ? :
258 0 10 if ($self->{'logfile'})
263 0 0 if ($self->{'ca-cert-file'} and $self->{'ca-cert-dir'})
268 0 10 if ($self->{'logger'} =~ /file/i and not $self->{'logfile'})
285 25 45 if ($self->{$option} and ref $self->{$option} eq '') { }
294 0 10 if $self->{'ca-cert-file'}
296 0 10 if $self->{'ca-cert-dir'}
298 0 10 if $self->{'logfile'}
304 4 6 if ($self->{'conf-reload-interval'} != 0)
305 2 2 if ($self->{'conf-reload-interval'} < 0) { }
1 1 elsif ($self->{'conf-reload-interval'} < $confReloadIntervalMinValue) { }