| 1 | package SBOM::CycloneDX::Issue; | ||||||||||
| 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 Enum 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 type => (is => 'rw', isa => Enum [qw(defect enhancement security)], required => 1); | |||||||||
| 19 | 1 | has id => (is => 'rw', isa => Str); | |||||||||
| 20 | 1 | has name => (is => 'rw', isa => Str); | |||||||||
| 21 | 1 | has description => (is => 'rw', isa => Str); | |||||||||
| 22 | 1 | has source => (is => 'rw', isa => InstanceOf ['SBOM::CycloneDX::Source']); | |||||||||
| 23 | 0 | ▶ | has references => (is => 'rw', isa => ArrayLike [Str], default => sub { SBOM::CycloneDX::List->new }); | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||
| 24 | |||||||||||
| 25 | sub TO_JSON { | ||||||||||
| 26 | |||||||||||
| 27 | 0 | ▶ | my $self = shift; | ||||||||
|
Subroutine
TO_JSON: not called CC=6 SCAR=37.4
Pod
documented
| |||||||||||
| 28 | |||||||||||
| 29 | 0 | my $json = {type => $self->type}; | |||||||||
| 30 | |||||||||||
| 31 | 0 | ▶ | $json->{id} = $self->id if $self->id; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 32 | 0 | ▶ | $json->{name} = $self->name if $self->name; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 33 | 0 | ▶ | $json->{description} = $self->description if $self->description; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 34 | 0 | ▶ | $json->{source} = $self->source if $self->source; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 35 | 0 | ▶ | $json->{references} = $self->references if @{$self->references}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 36 | |||||||||||
| 37 | 0 | return $json; | |||||||||
| 38 | |||||||||||
| 39 | } | ||||||||||
| 40 | |||||||||||
| 41 | 1 | 1; | |||||||||
| 42 | |||||||||||
| 43 | =encoding utf-8 | ||||||||||
| 44 | |||||||||||
| 45 | =head1 NAME | ||||||||||
| 46 | |||||||||||
| 47 | SBOM::CycloneDX::Issue - An individual issue that has been resolved | ||||||||||
| 48 | |||||||||||
| 49 | =head1 SYNOPSIS | ||||||||||
| 50 | |||||||||||
| 51 | $release_notes->resolves->add( | ||||||||||
| 52 | SBOM::CycloneDX::Issue->new( | ||||||||||
| 53 | type => 'security', | ||||||||||
| 54 | source => SBOM::CycloneDX::Source->new( | ||||||||||
| 55 | name => 'NVD', | ||||||||||
| 56 | url => 'https://nvd.nist.gov/vuln/detail/CVE-2021-44228' | ||||||||||
| 57 | ) | ||||||||||
| 58 | ) | ||||||||||
| 59 | ); | ||||||||||
| 60 | |||||||||||
| 61 | =head1 DESCRIPTION | ||||||||||
| 62 | |||||||||||
| 63 | L<SBOM::CycloneDX::Issue> provides an individual issue that has been resolved. | ||||||||||
| 64 | |||||||||||
| 65 | =head2 METHODS | ||||||||||
| 66 | |||||||||||
| 67 | L<SBOM::CycloneDX::Issue> inherits all methods from L<SBOM::CycloneDX::Base> | ||||||||||
| 68 | and implements the following new ones. | ||||||||||
| 69 | |||||||||||
| 70 | =over | ||||||||||
| 71 | |||||||||||
| 72 | =item SBOM::CycloneDX::Issue->new( %PARAMS ) | ||||||||||
| 73 | |||||||||||
| 74 | Properties: | ||||||||||
| 75 | |||||||||||
| 76 | =over | ||||||||||
| 77 | |||||||||||
| 78 | =item * C<type>, Specifies the type of issue (C<defect>, C<enhancement> or C<security>) | ||||||||||
| 79 | |||||||||||
| 80 | =item * C<id>, The identifier of the issue assigned by the source of the issue | ||||||||||
| 81 | |||||||||||
| 82 | =item * C<name>, The name of the issue | ||||||||||
| 83 | |||||||||||
| 84 | =item * C<description>, A description of the issue | ||||||||||
| 85 | |||||||||||
| 86 | =item * C<source>, The source of the issue where it is documented. See L<SBOM::CycloneDX::Source> | ||||||||||
| 87 | |||||||||||
| 88 | =item * C<references>, A collection of URL's for reference. Multiple URLs are allowed. | ||||||||||
| 89 | |||||||||||
| 90 | =back | ||||||||||
| 91 | |||||||||||
| 92 | =item $issue->type | ||||||||||
| 93 | |||||||||||
| 94 | =item $issue->id | ||||||||||
| 95 | |||||||||||
| 96 | =item $issue->name | ||||||||||
| 97 | |||||||||||
| 98 | =item $issue->description | ||||||||||
| 99 | |||||||||||
| 100 | =item $issue->source | ||||||||||
| 101 | |||||||||||
| 102 | =item $issue->references | ||||||||||
| 103 | |||||||||||
| 104 | =back | ||||||||||
| 105 | |||||||||||
| 106 | =head1 SUPPORT | ||||||||||
| 107 | |||||||||||
| 108 | =head2 Bugs / Feature Requests | ||||||||||
| 109 | |||||||||||
| 110 | Please report any bugs or feature requests through the issue tracker | ||||||||||
| 111 | at L<https://github.com/giterlizzi/perl-SBOM-CycloneDX/issues>. | ||||||||||
| 112 | You will be notified automatically of any progress on your issue. | ||||||||||
| 113 | |||||||||||
| 114 | =head2 Source Code | ||||||||||
| 115 | |||||||||||
| 116 | This is open source software. The code repository is available for | ||||||||||
| 117 | public review and contribution under the terms of the license. | ||||||||||
| 118 | |||||||||||
| 119 | L<https://github.com/giterlizzi/perl-SBOM-CycloneDX> | ||||||||||
| 120 | |||||||||||
| 121 | git clone https://github.com/giterlizzi/perl-SBOM-CycloneDX.git | ||||||||||
| 122 | |||||||||||
| 123 | |||||||||||
| 124 | =head1 AUTHOR | ||||||||||
| 125 | |||||||||||
| 126 | =over 4 | ||||||||||
| 127 | |||||||||||
| 128 | =item * Giuseppe Di Terlizzi <gdt@cpan.org> | ||||||||||
| 129 | |||||||||||
| 130 | =back | ||||||||||
| 131 | |||||||||||
| 132 | |||||||||||
| 133 | =head1 LICENSE AND COPYRIGHT | ||||||||||
| 134 | |||||||||||
| 135 | This software is copyright (c) 2025-2026 by Giuseppe Di Terlizzi. | ||||||||||
| 136 | |||||||||||
| 137 | This is free software; you can redistribute it and/or modify it under | ||||||||||
| 138 | the same terms as the Perl 5 programming language system itself. | ||||||||||
| 139 | |||||||||||
| 140 | =cut | ||||||||||