CycloneDX/Declarations/Assessor.pm

filter: Statementstmt 80.0% 28 / 35 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 8 / 10 Podpod 100% 1 / 1 totaltotal 68.5% 37 / 54 CC 5 SCAR 19.7
CC
5
Cov
65%
TO_JSON
20.0
__ANON__
6.0
BEGIN
1.0
CRAP 7.1
« CycloneDX/Vulnerability/ProofOfConcept.pm ↑ Summary CycloneDX/IdentifiableAction.pm »
1 package SBOM::CycloneDX::Declarations::Assessor;
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::BomRef;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 ▶use Types::Standard qw(Str Bool InstanceOf);
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 1 extends 'SBOM::CycloneDX::Base';
16  
17 has bom_ref => (
18 is => 'rw',
19 isa => InstanceOf ['SBOM::CycloneDX::BomRef'],
20 0 ▶ coerce => sub { ref($_[0]) ? $_[0] : SBOM::CycloneDX::BomRef->new($_[0]) }
Subroutine __ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
ref $_[0] ? : 0 0 0
21 1 );
22  
23 1 has third_party => (is => 'rw', isa => Bool);
24 1 has organization => (is => 'rw', isa => InstanceOf ['SBOM::CycloneDX::OrganizationalEntity']);
25  
26 0 ▶sub TO_JSON {
Subroutine TO_JSON: not called CC=4 SCAR=30.0
Pod documented
27  
28 0 my $self = shift;
29  
30 0 my $json = {};
31  
32 0 ▶ $json->{'bom-ref'} = $self->bom_ref if $self->bom_ref;
Branch: 1 branch
BranchTrueFalseTotal
if $self->bom_ref 0 0 0
33 0 ▶ $json->{thirdParty} = $self->third_party if $self->third_party;
Branch: 1 branch
BranchTrueFalseTotal
if $self->third_party 0 0 0
34 0 ▶ $json->{organization} = $self->organization if $self->organization;
Branch: 1 branch
BranchTrueFalseTotal
if $self->organization 0 0 0
35  
36 0 return $json;
37  
38 }
39  
40 1 1;
41  
42 =encoding utf-8
43  
44 =head1 NAME
45  
46 SBOM::CycloneDX::Declarations::Assessor - Assessor
47  
48 =head1 SYNOPSIS
49  
50 SBOM::CycloneDX::Declarations::Assessor->new();
51  
52  
53 =head1 DESCRIPTION
54  
55 L<SBOM::CycloneDX::Declarations::Assessor> provides the assessor who evaluates
56 claims and determines conformance to requirements and confidence in that
57 assessment.
58  
59 =head2 METHODS
60  
61 L<SBOM::CycloneDX::Declarations::Assessor> inherits all methods from L<SBOM::CycloneDX::Base>
62 and implements the following new ones.
63  
64 =over
65  
66 =item SBOM::CycloneDX::Declarations::Assessor->new( %PARAMS )
67  
68 Properties:
69  
70 =over
71  
72 =item * C<bom_ref>, An identifier which can be used to reference the object
73 elsewhere in the BOM. Every C<bom_ref> must be unique within the BOM.
74  
75 =item * C<organization>, The entity issuing the assessment.
76  
77 =item * C<third_party>, The boolean indicating if the assessor is outside the
78 organization generating claims. A value of false indicates a self assessor.
79  
80 =back
81  
82 =item $assessor->bom_ref
83  
84 =item $assessor->organization
85  
86 =item $assessor->third_party
87  
88 =back
89  
90  
91 =head1 SUPPORT
92  
93 =head2 Bugs / Feature Requests
94  
95 Please report any bugs or feature requests through the issue tracker
96 at L<https://github.com/giterlizzi/perl-SBOM-CycloneDX/issues>.
97 You will be notified automatically of any progress on your issue.
98  
99 =head2 Source Code
100  
101 This is open source software. The code repository is available for
102 public review and contribution under the terms of the license.
103  
104 L<https://github.com/giterlizzi/perl-SBOM-CycloneDX>
105  
106 git clone https://github.com/giterlizzi/perl-SBOM-CycloneDX.git
107  
108  
109 =head1 AUTHOR
110  
111 =over 4
112  
113 =item * Giuseppe Di Terlizzi <gdt@cpan.org>
114  
115 =back
116  
117  
118 =head1 LICENSE AND COPYRIGHT
119  
120 This software is copyright (c) 2025-2026 by Giuseppe Di Terlizzi.
121  
122 This is free software; you can redistribute it and/or modify it under
123 the same terms as the Perl 5 programming language system itself.
124  
125 =cut
« CycloneDX/Vulnerability/ProofOfConcept.pm ↑ Summary CycloneDX/IdentifiableAction.pm »