CycloneDX/Vulnerability/Credits.pm

filter: Statementstmt 75.0% 27 / 36 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 72.7% 8 / 11 Podpod 100% 1 / 1 totaltotal 69.2% 36 / 52 CC 3 SCAR 13.1
CC
3
Cov
68%
TO_JSON
12.0
__ANON__
2.0
__ANON__
2.0
CRAP 3.7
« CycloneDX/Component/ConfidenceInterval.pm ↑ Summary CycloneDX/Component/SWID.pm »
1 package SBOM::CycloneDX::Vulnerability::Credits;
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 Types::Standard qw(InstanceOf);
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use Types::TypeTiny qw(ArrayLike);
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 1 extends 'SBOM::CycloneDX::Base';
15  
16 has organizations => (
17 is => 'rw',
18 isa => ArrayLike [InstanceOf ['SBOM::CycloneDX::OrganizationalEntity']],
19 0 ▶ default => sub { SBOM::CycloneDX::List->new }
Subroutine __ANON__: not called CC=1 SCAR=6.9
20 1 );
21  
22 has individuals => (
23 is => 'rw',
24 isa => ArrayLike [InstanceOf ['SBOM::CycloneDX::OrganizationalContact']],
25 0 ▶ default => sub { SBOM::CycloneDX::List->new }
Subroutine __ANON__: not called CC=1 SCAR=6.9
26 1 );
27  
28 0 ▶sub TO_JSON {
Subroutine TO_JSON: not called CC=3 SCAR=24.8
Pod documented
29  
30 0 my $self = shift;
31  
32 0 my $json = {};
33  
34 0 ▶ $json->{organizations} = $self->organizations if @{$self->organizations};
Branch: 1 branch
BranchTrueFalseTotal
if @{$self->organizations;} 0 0 0
35 0 ▶ $json->{individuals} = $self->individuals if @{$self->individuals};
Branch: 1 branch
BranchTrueFalseTotal
if @{$self->individuals;} 0 0 0
36  
37 0 return $json;
38  
39 }
40  
41 1 1;
42  
43 =encoding utf-8
44  
45 =head1 NAME
46  
47 SBOM::CycloneDX::Vulnerability::Credits - Credits
48  
49 =head1 SYNOPSIS
50  
51 SBOM::CycloneDX::Vulnerability::Credits->new();
52  
53  
54 =head1 DESCRIPTION
55  
56 L<SBOM::CycloneDX::Vulnerability::Credits> provides the individuals or organizations
57 credited with the discovery of the vulnerability.
58  
59 =head2 METHODS
60  
61 L<SBOM::CycloneDX::Vulnerability::Credits> inherits all methods from L<SBOM::CycloneDX::Base>
62 and implements the following new ones.
63  
64 =over
65  
66 =item SBOM::CycloneDX::Vulnerability::Credits->new( %PARAMS )
67  
68 Properties:
69  
70 =over
71  
72 =item * C<individuals>, The individuals, not associated with organizations,
73 that are credited with vulnerability discovery.
74  
75 =item * C<organizations>, The organizations credited with vulnerability
76 discovery.
77  
78 =back
79  
80 =item $credits->individuals
81  
82 =item $credits->organizations
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
122  
« CycloneDX/Component/ConfidenceInterval.pm ↑ Summary CycloneDX/Component/SWID.pm »