File Coverage

blib/lib/SBOM/CycloneDX/Component/ConfidenceInterval.pm
Criterion Covered Total %
statement 26 31 83.8
branch 0 4 0.0
condition n/a
subroutine 9 10 90.0
pod 1 1 100.0
total 36 46 78.2


line stmt bran cond sub pod time code
1             package SBOM::CycloneDX::Component::ConfidenceInterval;
2              
3 1     1   1541 use 5.010001;
  1         5  
4 1     1   7 use strict;
  1         2  
  1         26  
5 1     1   5 use warnings;
  1         2  
  1         50  
6 1     1   6 use utf8;
  1         2  
  1         7  
7              
8 1     1   42 use SBOM::CycloneDX::List;
  1         2  
  1         33  
9              
10 1     1   7 use Types::Standard qw(Str InstanceOf);
  1         5  
  1         8  
11 1     1   1923 use Types::TypeTiny qw(ArrayLike);
  1         2  
  1         6  
12              
13 1     1   619 use Moo;
  1         3  
  1         9  
14 1     1   484 use namespace::autoclean;
  1         2  
  1         12  
15              
16             extends 'SBOM::CycloneDX::Base';
17              
18             has lower_bound => (is => 'rw', isa => Str);
19             has upper_bound => (is => 'rw', isa => Str);
20              
21              
22             sub TO_JSON {
23              
24 0     0 1   my $self = shift;
25              
26 0           my $json = {};
27              
28 0 0         $json->{lowerBound} = $self->lower_bound if $self->lower_bound;
29 0 0         $json->{upperBound} = $self->upper_bound if $self->upper_bound;
30              
31 0           return $json;
32              
33             }
34              
35             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 The confidence interval
51             of the metric.
52              
53             =head2 METHODS
54              
55             L inherits all methods from L
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, The lower bound of the confidence interval.
67              
68             =item * C, 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.
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
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
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