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