| 1 | package SBOM::CycloneDX::Vulnerability::Reference; | ||
| 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(Str InstanceOf); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 1 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | 1 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | |||
| 13 | 1 | extends 'SBOM::CycloneDX::Base'; | |
| 14 | |||
| 15 | 1 | has id => (is => 'rw', isa => Str, required => 1); | |
| 16 | 1 | has source => (is => 'rw', isa => InstanceOf ['SBOM::CycloneDX::Vulnerability::Source'], required => 1); | |
| 17 | |||
| 18 | 0 | ▶ | sub TO_JSON { |
|
Subroutine
TO_JSON: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 19 | |||
| 20 | 0 | my $self = shift; | |
| 21 | |||
| 22 | 0 | my $json = {id => $self->id, source => $self->source}; | |
| 23 | |||
| 24 | 0 | return $json; | |
| 25 | |||
| 26 | } | ||
| 27 | |||
| 28 | 1 | 1; | |
| 29 | |||
| 30 | =encoding utf-8 | ||
| 31 | |||
| 32 | =head1 NAME | ||
| 33 | |||
| 34 | SBOM::CycloneDX::Vulnerability::Reference - Vulnerability reference | ||
| 35 | |||
| 36 | =head1 SYNOPSIS | ||
| 37 | |||
| 38 | SBOM::CycloneDX::Vulnerability::Reference->new(); | ||
| 39 | |||
| 40 | |||
| 41 | =head1 DESCRIPTION | ||
| 42 | |||
| 43 | L<SBOM::CycloneDX::Vulnerability::Reference> provide the vulnerability reference object. | ||
| 44 | |||
| 45 | =head2 METHODS | ||
| 46 | |||
| 47 | L<SBOM::CycloneDX::Vulnerability::Reference> inherits all methods from L<SBOM::CycloneDX::Base> | ||
| 48 | and implements the following new ones. | ||
| 49 | |||
| 50 | =over | ||
| 51 | |||
| 52 | =item SBOM::CycloneDX::Vulnerability::Reference->new( %PARAMS ) | ||
| 53 | |||
| 54 | Properties: | ||
| 55 | |||
| 56 | =over | ||
| 57 | |||
| 58 | =item * C<id>, An identifier that uniquely identifies the vulnerability. | ||
| 59 | |||
| 60 | =item * C<source>, The source that published the vulnerability. | ||
| 61 | |||
| 62 | =back | ||
| 63 | |||
| 64 | =item $reference->id | ||
| 65 | |||
| 66 | =item $reference->source | ||
| 67 | |||
| 68 | =back | ||
| 69 | |||
| 70 | |||
| 71 | =head1 SUPPORT | ||
| 72 | |||
| 73 | =head2 Bugs / Feature Requests | ||
| 74 | |||
| 75 | Please report any bugs or feature requests through the issue tracker | ||
| 76 | at L<https://github.com/giterlizzi/perl-SBOM-CycloneDX/issues>. | ||
| 77 | You will be notified automatically of any progress on your issue. | ||
| 78 | |||
| 79 | =head2 Source Code | ||
| 80 | |||
| 81 | This is open source software. The code repository is available for | ||
| 82 | public review and contribution under the terms of the license. | ||
| 83 | |||
| 84 | L<https://github.com/giterlizzi/perl-SBOM-CycloneDX> | ||
| 85 | |||
| 86 | git clone https://github.com/giterlizzi/perl-SBOM-CycloneDX.git | ||
| 87 | |||
| 88 | |||
| 89 | =head1 AUTHOR | ||
| 90 | |||
| 91 | =over 4 | ||
| 92 | |||
| 93 | =item * Giuseppe Di Terlizzi <gdt@cpan.org> | ||
| 94 | |||
| 95 | =back | ||
| 96 | |||
| 97 | |||
| 98 | =head1 LICENSE AND COPYRIGHT | ||
| 99 | |||
| 100 | This software is copyright (c) 2025-2026 by Giuseppe Di Terlizzi. | ||
| 101 | |||
| 102 | This is free software; you can redistribute it and/or modify it under | ||
| 103 | the same terms as the Perl 5 programming language system itself. | ||
| 104 | |||
| 105 | =cut | ||