| 1 | package SBOM::CycloneDX::Definitions; | ||||||||||
| 2 | |||||||||||
| 3 | 16 | ▶ | use 5.010001; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 16 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 16 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 16 | ▶ | use utf8; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 16 | ▶ | use SBOM::CycloneDX::List; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | 16 | ▶ | use Types::Standard qw(InstanceOf); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | 16 | ▶ | use Types::TypeTiny qw(ArrayLike); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | |||||||||||
| 13 | 16 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 14 | 16 | ▶ | use namespace::autoclean; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 15 | |||||||||||
| 16 | 16 | extends 'SBOM::CycloneDX::Base'; | |||||||||
| 17 | |||||||||||
| 18 | has standards => ( | ||||||||||
| 19 | is => 'rw', | ||||||||||
| 20 | isa => ArrayLike [InstanceOf ['SBOM::CycloneDX::Standard']], | ||||||||||
| 21 | 57 | ▶ | default => sub { SBOM::CycloneDX::List->new } | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 22 | 16 | ); | |||||||||
| 23 | |||||||||||
| 24 | has patents => ( | ||||||||||
| 25 | is => 'rw', | ||||||||||
| 26 | isa => ArrayLike [InstanceOf ['SBOM::CycloneDX::Patent'] | InstanceOf ['SBOM::CycloneDX::PatentFamily']], | ||||||||||
| 27 | 57 | ▶ | default => sub { SBOM::CycloneDX::List->new } | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 28 | 16 | ); | |||||||||
| 29 | |||||||||||
| 30 | 138 | ▶ | sub TO_JSON { | ||||||||
|
Subroutine
TO_JSON: called CC=3 SCAR=11.2
Pod
documented
| |||||||||||
| 31 | |||||||||||
| 32 | 138 | my $self = shift; | |||||||||
| 33 | |||||||||||
| 34 | 138 | my $json = {}; | |||||||||
| 35 | |||||||||||
| 36 | 138 | ▶ | $json->{standards} = $self->standards if @{$self->standards}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 37 | 138 | ▶ | $json->{patents} = $self->patents if @{$self->patents}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 38 | |||||||||||
| 39 | 138 | return $json; | |||||||||
| 40 | |||||||||||
| 41 | } | ||||||||||
| 42 | |||||||||||
| 43 | 16 | 1; | |||||||||
| 44 | |||||||||||
| 45 | =encoding utf-8 | ||||||||||
| 46 | |||||||||||
| 47 | =head1 NAME | ||||||||||
| 48 | |||||||||||
| 49 | SBOM::CycloneDX::Definitions - Definitions | ||||||||||
| 50 | |||||||||||
| 51 | =head1 SYNOPSIS | ||||||||||
| 52 | |||||||||||
| 53 | SBOM::CycloneDX::Definitions->new(); | ||||||||||
| 54 | |||||||||||
| 55 | |||||||||||
| 56 | =head1 DESCRIPTION | ||||||||||
| 57 | |||||||||||
| 58 | L<SBOM::CycloneDX::Definitions> is a collection of reusable objects that are | ||||||||||
| 59 | defined and may be used elsewhere in the BOM. | ||||||||||
| 60 | |||||||||||
| 61 | =head2 METHODS | ||||||||||
| 62 | |||||||||||
| 63 | L<SBOM::CycloneDX::Definitions> inherits all methods from L<SBOM::CycloneDX::Base> | ||||||||||
| 64 | and implements the following new ones. | ||||||||||
| 65 | |||||||||||
| 66 | =over | ||||||||||
| 67 | |||||||||||
| 68 | =item SBOM::CycloneDX::Definitions->new( %PARAMS ) | ||||||||||
| 69 | |||||||||||
| 70 | Properties: | ||||||||||
| 71 | |||||||||||
| 72 | =over | ||||||||||
| 73 | |||||||||||
| 74 | =item * C<standards>, The list of standards which may consist of regulations, | ||||||||||
| 75 | industry or organizational-specific standards, maturity models, best | ||||||||||
| 76 | practices, or any other requirements which can be evaluated against or | ||||||||||
| 77 | attested to. | ||||||||||
| 78 | |||||||||||
| 79 | =item * C<patents>, The list of patents which may be referenced elsewhere | ||||||||||
| 80 | |||||||||||
| 81 | =back | ||||||||||
| 82 | |||||||||||
| 83 | =item $definitions->standards | ||||||||||
| 84 | |||||||||||
| 85 | =item $definitions->patents | ||||||||||
| 86 | |||||||||||
| 87 | =back | ||||||||||
| 88 | |||||||||||
| 89 | |||||||||||
| 90 | =head1 SUPPORT | ||||||||||
| 91 | |||||||||||
| 92 | =head2 Bugs / Feature Requests | ||||||||||
| 93 | |||||||||||
| 94 | Please report any bugs or feature requests through the issue tracker | ||||||||||
| 95 | at L<https://github.com/giterlizzi/perl-SBOM-CycloneDX/issues>. | ||||||||||
| 96 | You will be notified automatically of any progress on your issue. | ||||||||||
| 97 | |||||||||||
| 98 | =head2 Source Code | ||||||||||
| 99 | |||||||||||
| 100 | This is open source software. The code repository is available for | ||||||||||
| 101 | public review and contribution under the terms of the license. | ||||||||||
| 102 | |||||||||||
| 103 | L<https://github.com/giterlizzi/perl-SBOM-CycloneDX> | ||||||||||
| 104 | |||||||||||
| 105 | git clone https://github.com/giterlizzi/perl-SBOM-CycloneDX.git | ||||||||||
| 106 | |||||||||||
| 107 | |||||||||||
| 108 | =head1 AUTHOR | ||||||||||
| 109 | |||||||||||
| 110 | =over 4 | ||||||||||
| 111 | |||||||||||
| 112 | =item * Giuseppe Di Terlizzi <gdt@cpan.org> | ||||||||||
| 113 | |||||||||||
| 114 | =back | ||||||||||
| 115 | |||||||||||
| 116 | |||||||||||
| 117 | =head1 LICENSE AND COPYRIGHT | ||||||||||
| 118 | |||||||||||
| 119 | This software is copyright (c) 2025-2026 by Giuseppe Di Terlizzi. | ||||||||||
| 120 | |||||||||||
| 121 | This is free software; you can redistribute it and/or modify it under | ||||||||||
| 122 | the same terms as the Perl 5 programming language system itself. | ||||||||||
| 123 | |||||||||||
| 124 | =cut | ||||||||||