Branch Coverage

blib/lib/App/CPAN/SBOM.pm
Criterion Covered Total %
branch 0 116 0.0


line true false branch
37 0 0 unless $ENV{'SBOM_DEBUG'}
52 0 0 unless &GetOptionsFromArray(\@args, \%options, ("help|h", "man", "v", "debug|d", "output|o=s", "meta=s", "distribution=s", "maxdepth=i", "vulnerabilities!", "validate!", "project-meta=s", "project-type=s", "project-author=s\@", "project-description=s", "project-directory=s", "project-license=s", "project-name=s", "project-version=s", "server-url=s", "api-key=s", "skip-tls-check", "project-id=s", "parent-project-id=s", "cyclonedx-spec-version=s", "list-spdx-licenses"))
90 0 0 if defined $options{'man'}
91 0 0 if defined $options{'help'}
95 0 0 if (defined $options{'v'})
99 0 0 if ($options{'list-spdx-licenses'})
104 0 0 unless ($options{'distribution'} or $options{'project-meta'} or $options{'project-directory'})
111 0 0 if (defined $options{'debug'})
117 0 0 if (defined $options{'distribution'})
121 0 0 unless $version
126 0 0 if (defined $options{'project-directory'} or defined $options{'project-meta'})
136 0 0 unless open my $fh, ">", $output_file
140 0 0 if ($options{'validate'})
145 0 0 if (defined $options{'server-url'} and defined $options{'api-key'})
193 0 0 if ($project_directory)
194 0 0 unless -d $project_directory
197 0 0 unless ($project_meta)
200 0 0 if (-f $meta_file)
218 0 0 if ($project_meta)
236 0 0 if $module eq "perl"
242 0 0 if ($project_license)
246 0 0 if (@{$project_author;})
264 0 0 if ($project_description)
272 0 0 if (my(@audit_deps) = $audit_discover->discover($project_directory))
308 0 0 unless ($dist_data)
329 0 0 $spdx_license ? :
342 0 0 if (my $abstract = $dist_data->abstract)
348 0 0 if ($options->{'vulnerabilities'})
358 0 0 if ($dependency->{'phase'} eq "runtime" and $dependency->{'relationship'} eq "requires")
359 0 0 if $dependency->{'module'} eq "perl"
381 0 0 if (defined $resources->{'repository'} and $resources->{'repository'}{'url'})
387 0 0 if (defined $resources->{'bugtracker'} and $resources->{'bugtracker'}{'web'})
404 0 0 if ($metadata_author =~ /(.*) <(.*)>/) { }
0 0 elsif ($metadata_author =~ /(.*), (.*)/) { }
450 0 0 if ($module)
452 0 0 if DEBUG()
458 0 0 unless ($module_data)
467 0 0 if ($version == 0)
482 0 0 if DEBUG()
486 0 0 unless ($dist_data)
500 0 0 $spdx_license ? :
508 0 0 if (my $checksum = $dist_data->checksum_sha256)
512 0 0 if (my $checksum = $dist_data->checksum_md5)
528 0 0 if (my $abstract = $dist_data->abstract)
532 0 0 unless ($bom->get_component_by_bom_ref($purl->to_string))
536 0 0 if ($add_vulns)
547 0 0 if ($depth < $maxdepth)
552 0 0 if ($dependency->{'phase'} eq "runtime" and $dependency->{'relationship'} eq "requires")
553 0 0 if $dependency->{'module'} eq "perl"
582 0 0 unless defined $result->{'dists'}{$distribution}
639 0 0 if (defined $options->{'project-id'})
643 0 0 unless (defined $options->{'project-id'})
645 0 0 if ($project_name)
649 0 0 if ($project_version)
655 0 0 if (defined $options->{'parent-project-id'})
659 0 0 defined $options->{'skip-tls-check'} ? :
670 0 0 if DEBUG()
672 0 0 unless ($response->{'success'})