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