File Coverage

blib/lib/SBOM/CycloneDX/Metadata/DistributionConstraint.pm
Criterion Covered Total %
statement 23 27 85.1
branch 0 2 0.0
condition n/a
subroutine 8 9 88.8
pod 1 1 100.0
total 32 39 82.0


line stmt bran cond sub pod time code
1             package SBOM::CycloneDX::Metadata::DistributionConstraint;
2              
3 1     1   1839 use 5.010001;
  1         3  
4 1     1   27 use strict;
  1         3  
  1         22  
5 1     1   3 use warnings;
  1         2  
  1         53  
6 1     1   4 use utf8;
  1         2  
  1         9  
7              
8 1     1   94 use SBOM::CycloneDX::Enum;
  1         3  
  1         75  
9              
10 1     1   5 use Types::Standard qw(Enum Str);
  1         3  
  1         11  
11              
12 1     1   1632 use Moo;
  1         2  
  1         10  
13 1     1   486 use namespace::autoclean;
  1         2  
  1         16  
14              
15             extends 'SBOM::CycloneDX::Base';
16              
17             has tlp => (is => 'rw', default => 'CLEAR', isa => Enum [SBOM::CycloneDX::Enum->values('TLP_CLASSIFICATION')]);
18              
19             sub TO_JSON {
20              
21 0     0 1   my $self = shift;
22              
23 0           my $json = {};
24              
25 0 0         $json->{tlp} = $self->tlp if $self->tlp;
26              
27 0           return $json;
28              
29             }
30              
31             1;
32              
33             =encoding utf-8
34              
35             =head1 NAME
36              
37             SBOM::CycloneDX::Metadata::DistributionConstraint - Distribution Constraints
38              
39             =head1 SYNOPSIS
40              
41             SBOM::CycloneDX::Metadata::DistributionConstraint->new();
42              
43              
44             =head1 DESCRIPTION
45              
46             L Conditions and
47             constraints governing the sharing and distribution of the data or
48             components described by this BOM.
49              
50             =head2 METHODS
51              
52             L inherits all methods from L
53             and implements the following new ones.
54              
55             =over
56              
57             =item SBOM::CycloneDX::Metadata::DistributionConstraint->new( %PARAMS )
58              
59             Properties:
60              
61             =over
62              
63             =item * C, The Traffic Light Protocol (TLP) classification that controls
64             the sharing and distribution of the data that the BOM describes.
65              
66             The default classification is C.
67              
68             =back
69              
70             =item $distribution_constraint->tlp
71              
72             Traffic Light Protocol (TLP) is a classification system for identifying the
73             potential risk associated with artefact, including whether it is subject to
74             certain types of legal, financial, or technical threats. Refer to
75             L for further information.
76              
77             The default classification is C.
78              
79             =over
80              
81             =item * C, The information is not subject to any restrictions as regards
82             the sharing.
83              
84             =item * C, The information is subject to limited disclosure, and
85             recipients can share it within their community but not via publicly accessible
86             channels.
87              
88             =item * C, The information is subject to limited disclosure, and
89             recipients can only share it on a need-to-know basis within their organization
90             and with clients.
91              
92             =item * C, The information is subject to limited disclosure,
93             and recipients can only share it on a need-to-know basis within their
94             organization.
95              
96             =item * C, The information is subject to restricted distribution to
97             individual recipients only and must not be shared.
98              
99             =back
100              
101             =back
102              
103              
104             =head1 SUPPORT
105              
106             =head2 Bugs / Feature Requests
107              
108             Please report any bugs or feature requests through the issue tracker
109             at L.
110             You will be notified automatically of any progress on your issue.
111              
112             =head2 Source Code
113              
114             This is open source software. The code repository is available for
115             public review and contribution under the terms of the license.
116              
117             L
118              
119             git clone https://github.com/giterlizzi/perl-SBOM-CycloneDX.git
120              
121              
122             =head1 AUTHOR
123              
124             =over 4
125              
126             =item * Giuseppe Di Terlizzi
127              
128             =back
129              
130              
131             =head1 LICENSE AND COPYRIGHT
132              
133             This software is copyright (c) 2025-2026 by Giuseppe Di Terlizzi.
134              
135             This is free software; you can redistribute it and/or modify it under
136             the same terms as the Perl 5 programming language system itself.
137              
138             =cut