Branch Coverage

blib/lib/SBOM/CycloneDX.pm
Criterion Covered Total %
branch 23 46 50.0


line true false branch
148 6 0 unless $dependency->ref eq $target_ref
161 12 0 unless ($exists)
176 0 0 if $component->purl and $component->purl eq $purl
186 0 0 if $component->bom_ref and $component->bom_ref eq $bom_ref
199 0 0 if $affect->ref eq $bom_ref
214 0 0 if ($vulnerability->id eq $cve_id)
234 148 208 if ($spec_version > "1.5")
238 356 0 if $self->serial_number
239 356 0 if $self->version
240 128 228 if %{$self->metadata->TO_JSON;}
241 188 168 if @{$self->components;}
242 0 356 if @{$self->services;}
243 0 356 if @{$self->external_references;}
244 42 314 if @{$self->dependencies;}
245 0 356 if @{$self->compositions;}
246 0 356 if @{$self->vulnerabilities;}
247 0 356 if @{$self->annotations;}
248 0 356 if @{$self->formulation;}
249 0 356 if %{$self->declarations->TO_JSON;}
250 0 356 if %{$self->definitions->TO_JSON;}
251 0 356 if @{$self->citations;}
252 0 356 if @{$self->properties;}
253 0 356 if %{$self->signature;}