Branch Coverage

blib/lib/FusionInventory/Agent/Inventory.pm
Criterion Covered Total %
branch 31 72 43.0


line true false branch
133 0 61 if $params{'statedir'}
147 0 0 unless my $content = $self->getContent
148 0 0 exists $content->{$section} ? :
154 0 0 unless $section = $self->getSection($section)
155 0 0 exists $section->{$field} ? :
161 0 1 unless $content
164 2 1 if (ref $content->{$section} eq 'ARRAY') { }
172 1 0 if ($section eq 'HARDWARE')
176 0 0 if ($section eq 'BIOS')
180 0 0 if ($section eq 'ACCESSLOG')
196 1 5297 unless $entry
201 1 5296 unless $fields
204 1 28009 unless ($fields->{$field})
210 3927 24082 unless (defined $entry->{$field})
218 312 23770 if ($checks->{$field})
221 2 310 unless $value =~ /$checks->{$field}/
227 0 5296 if ($params{'noDuplicated'})
229 0 0 if $self->{'seen'}{$section}{$md5}
233 368 4928 if ($section eq 'STORAGES')
235 358 10 unless $entry->{'SERIALNUMBER'}
245 1 0 if ($cpus)
257 0 1 if ($interfaces)
271 0 1 if ($users)
275 0 0 if ($user->{'LOGIN'} =~ /(\S+)\\(\S+)/) { }
300 0 7 unless ($fields{'HARDWARE'}{$field})
306 0 7 unless $args->{$field}
317 0 0 unless ($fields{'OPERATINGSYSTEM'}{$field})
337 0 0 unless ($fields{'BIOS'}{$field})
351 0 0 unless ($fields{'ACCESSLOG'}{$field})
366 61 0 unless $tag
402 0 3 if ($self->{'last_state_file'})
403 0 0 if (-f $self->{'last_state_file'}) { }
409 0 0 if (ref $self->{'last_state_content'} ne 'HASH')
427 31 20 if $self->{'last_state_content'}{$section} and $self->{'last_state_content'}{$section} eq $hash
447 0 0 unless (defined $self->{'last_state_content'})
450 0 0 if ($self->{'last_state_file'}) { }