Branch Coverage

blib/lib/Sys/OsRelease.pm
Criterion Covered Total %
branch 56 78 71.7


line true false branch
78 11 16 unless ($class->defined_instance)
90 27 13 exists $_instances{$class} && $_instances{$class}->isa($class) ? :
97 11 0 if ($class->defined_instance)
99 11 0 if ($class->can("_cleanup_instance"))
140 795 0 $can_fc ? :
149 0 11 unless ($class->isa("Sys::OsRelease"))
150 0 0 ref $class ? :
156 9 2 if (scalar @params > 0)
157 0 9 if (ref $params[0] eq 'HASH') { }
166 9 2 exists $obj{'_config'}{'search_path'} ? :
167 8 3 exists $obj{'_config'}{'file_name'} ? :
169 10 0 if (-r "$search_dir/$file_name")
177 10 1 if (defined $osrelease_path)
183 10 0 if (open my $fh, "<", $osrelease_path)
186 0 119 if (substr($line, -1, 1) eq "\r")
191 0 119 if ($line =~ /^ \s+ # /x or $line =~ /^ \s+ $/x)
196 25 2 if ($line =~ /^ ([A-Z0-9_]+) = "(.*)" $/x or $line =~ /^ ([A-Z0-9_]+) = '(.*)' $/x or $line =~ /^ ([A-Z0-9_]+) = (.*) $/x)
200 0 117 if $1 eq "_config"
222 978 15 ref $coo ? :
232 0 11 unless ($self->isa("Sys::OsRelease"))
251 2 2 unless ($self->has_config("platform"))
252 1 1 if ($self->has_attr("id"))
255 1 1 if ($self->has_attr("id_like"))
257 0 1 if ($self->has_config("common_id"))
259 0 0 ref $cids eq 'ARRAY' ? :
267 1 0 if (exists $common_id{$like})
275 1 1 unless ($self->has_config("platform"))
288 1 0 if (exists $self->{'_config'}{'osrelease_path'})
299 200 141 exists $$self{fold_case($key)} ? :
315 5 6 exists $self->{'_config'}{$key} ? :
323 3 4 if (defined $value)
338 11 117 if $key eq "_config"
344 0 242 if $std_attr eq "_config"
346 103 139 if $self->has_attr($fc_attr)
358 256 0 ref $self ? :
362 11 245 unless (exists $self->{'_config'}{'accessor'})
367 117 139 if (exists $self->{$name}) { }
387 256 0 ref $self ? :
388 256 0 if (exists $self->{'_config'}{'accessor'}{$name})