CycloneDX/Component/ConfidenceInterval.pm

filter: Statementstmt 85.7% 30 / 35 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 90.0% 9 / 10 Podpod 100% 1 / 1 totaltotal 80.0% 40 / 50 CC 3 SCAR 13.2
CC
3
Cov
77%
TO_JSON
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.8
« CycloneDX/Util.pm ↑ Summary CycloneDX/Vulnerability/Credits.pm »
1 package SBOM::CycloneDX::Component::ConfidenceInterval;
2  
3 1 ▶use 5.010001;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use SBOM::CycloneDX::List;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 ▶use Types::Standard qw(Str InstanceOf);
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use Types::TypeTiny qw(ArrayLike);
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 1 extends 'SBOM::CycloneDX::Base';
17  
18 1 has lower_bound => (is => 'rw', isa => Str);
19 1 has upper_bound => (is => 'rw', isa => Str);
20  
21  
22 0 ▶sub TO_JSON {
Subroutine TO_JSON: not called CC=3 SCAR=24.8
Pod documented
23  
24 0 my $self = shift;
25  
26 0 my $json = {};
27  
28 0 ▶ $json->{lowerBound} = $self->lower_bound if $self->lower_bound;
Branch: 1 branch
BranchTrueFalseTotal
if $self->lower_bound 0 0 0
29 0 ▶ $json->{upperBound} = $self->upper_bound if $self->upper_bound;
Branch: 1 branch
BranchTrueFalseTotal
if $self->upper_bound 0 0 0
30  
31 0 return $json;
32  
33 }
34  
35 1 1;
36  
37 =encoding utf-8
38  
39 =head1 NAME
40  
41 SBOM::CycloneDX::Component::ConfidenceInterval - Confidence Interval
42  
43 =head1 SYNOPSIS
44  
45 SBOM::CycloneDX::Component::ConfidenceInterval->new();
46  
47  
48 =head1 DESCRIPTION
49  
50 L<SBOM::CycloneDX::Component::ConfidenceInterval> The confidence interval
51 of the metric.
52  
53 =head2 METHODS
54  
55 L<SBOM::CycloneDX::Component::ConfidenceInterval> inherits all methods from L<SBOM::CycloneDX::Base>
56 and implements the following new ones.
57  
58 =over
59  
60 =item SBOM::CycloneDX::Component::ConfidenceInterval->new( %PARAMS )
61  
62 Properties:
63  
64 =over
65  
66 =item * C<lower_bound>, The lower bound of the confidence interval.
67  
68 =item * C<upper_bound>, The upper bound of the confidence interval.
69  
70 =back
71  
72 =item $confidence_interval->lower_bound
73  
74 =item $confidence_interval->upper_bound
75  
76 =back
77  
78  
79 =head1 SUPPORT
80  
81 =head2 Bugs / Feature Requests
82  
83 Please report any bugs or feature requests through the issue tracker
84 at L<https://github.com/giterlizzi/perl-SBOM-CycloneDX/issues>.
85 You will be notified automatically of any progress on your issue.
86  
87 =head2 Source Code
88  
89 This is open source software. The code repository is available for
90 public review and contribution under the terms of the license.
91  
92 L<https://github.com/giterlizzi/perl-SBOM-CycloneDX>
93  
94 git clone https://github.com/giterlizzi/perl-SBOM-CycloneDX.git
95  
96  
97 =head1 AUTHOR
98  
99 =over 4
100  
101 =item * Giuseppe Di Terlizzi <gdt@cpan.org>
102  
103 =back
104  
105  
106 =head1 LICENSE AND COPYRIGHT
107  
108 This software is copyright (c) 2025-2026 by Giuseppe Di Terlizzi.
109  
110 This is free software; you can redistribute it and/or modify it under
111 the same terms as the Perl 5 programming language system itself.
112  
113 =cut
« CycloneDX/Util.pm ↑ Summary CycloneDX/Vulnerability/Credits.pm »