CycloneDX/Declarations/Conformance.pm

filter: Statementstmt 79.4% 31 / 39 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 81.8% 9 / 11 Podpod 100% 1 / 1 totaltotal 71.9% 41 / 57 CC 4 SCAR 18.6
CC
4
Cov
69%
TO_JSON
20.0
__ANON__
1.1
BEGIN
1.0
CRAP 6.4
« CycloneDX/Declarations/Affirmation.pm ↑ Summary CycloneDX/DataGovernanceResponsibleParty.pm »
1 package SBOM::CycloneDX::Declarations::Conformance;
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 Num);
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 score => (is => 'rw', isa => Num);
19 1 has rationale => (is => 'rw', isa => Str);
20 0 ▶has mitigation_strategies => (is => 'rw', isa => ArrayLike [Str], default => sub { SBOM::CycloneDX::List->new });
Subroutine __ANON__: not called CC=1 SCAR=1.2
21  
22  
23 0 ▶sub TO_JSON {
Subroutine TO_JSON: not called CC=4 SCAR=30.0
Pod documented
24  
25 0 my $self = shift;
26  
27 0 my $json = {};
28  
29 0 ▶ $json->{score} = $self->score if $self->score;
Branch: 1 branch
BranchTrueFalseTotal
if $self->score 0 0 0
30 0 ▶ $json->{rationale} = $self->rationale if $self->rationale;
Branch: 1 branch
BranchTrueFalseTotal
if $self->rationale 0 0 0
31 0 ▶ $json->{mitigationStrategies} = $self->mitigation_strategies if @{$self->mitigation_strategies};
Branch: 1 branch
BranchTrueFalseTotal
if @{$self->mitigation_strategies;} 0 0 0
32  
33 0 return $json;
34  
35 }
36  
37 1 1;
38  
39 =encoding utf-8
40  
41 =head1 NAME
42  
43 SBOM::CycloneDX::Declarations::Conformance - Conformance
44  
45 =head1 SYNOPSIS
46  
47 SBOM::CycloneDX::Declarations::Conformance->new();
48  
49  
50 =head1 DESCRIPTION
51  
52 L<SBOM::CycloneDX::Declarations::Conformance> provide the conformance of the claim
53 meeting a requirement.
54  
55 =head2 METHODS
56  
57 L<SBOM::CycloneDX::Declarations::Conformance> inherits all methods from L<SBOM::CycloneDX::Base>
58 and implements the following new ones.
59  
60 =over
61  
62 =item SBOM::CycloneDX::Declarations::Conformance->new( %PARAMS )
63  
64 Properties:
65  
66 =over
67  
68 =item * C<mitigation_strategies>, The list of `bom-ref` to the evidence
69 provided describing the mitigation strategies.
70  
71 =item * C<rationale>, The rationale for the conformance score.
72  
73 =item * C<score>, The conformance of the claim between and inclusive of 0 and
74 1, where 1 is 100% conformance.
75  
76 =back
77  
78 =item $conformance->mitigation_strategies
79  
80 =item $conformance->rationale
81  
82 =item $conformance->score
83  
84 =back
85  
86  
87 =head1 SUPPORT
88  
89 =head2 Bugs / Feature Requests
90  
91 Please report any bugs or feature requests through the issue tracker
92 at L<https://github.com/giterlizzi/perl-SBOM-CycloneDX/issues>.
93 You will be notified automatically of any progress on your issue.
94  
95 =head2 Source Code
96  
97 This is open source software. The code repository is available for
98 public review and contribution under the terms of the license.
99  
100 L<https://github.com/giterlizzi/perl-SBOM-CycloneDX>
101  
102 git clone https://github.com/giterlizzi/perl-SBOM-CycloneDX.git
103  
104  
105 =head1 AUTHOR
106  
107 =over 4
108  
109 =item * Giuseppe Di Terlizzi <gdt@cpan.org>
110  
111 =back
112  
113  
114 =head1 LICENSE AND COPYRIGHT
115  
116 This software is copyright (c) 2025-2026 by Giuseppe Di Terlizzi.
117  
118 This is free software; you can redistribute it and/or modify it under
119 the same terms as the Perl 5 programming language system itself.
120  
121 =cut
« CycloneDX/Declarations/Affirmation.pm ↑ Summary CycloneDX/DataGovernanceResponsibleParty.pm »