File Coverage

blib/lib/SBOM/CycloneDX/DataGovernanceResponsibleParty.pm
Criterion Covered Total %
statement 20 27 74.0
branch 0 6 0.0
condition 0 3 0.0
subroutine 7 9 77.7
pod 1 2 50.0
total 28 47 59.5


line stmt bran cond sub pod time code
1             package SBOM::CycloneDX::DataGovernanceResponsibleParty;
2              
3 1     1   4761 use 5.010001;
  1         6  
4 1     1   7 use strict;
  1         3  
  1         27  
5 1     1   6 use warnings;
  1         2  
  1         53  
6 1     1   7 use utf8;
  1         2  
  1         8  
7              
8 1     1   53 use Types::Standard qw(InstanceOf);
  1         2  
  1         9  
9              
10 1     1   3553 use Moo;
  1         3  
  1         9  
11 1     1   588 use namespace::autoclean;
  1         2  
  1         12  
12              
13             extends 'SBOM::CycloneDX::Base';
14              
15             sub BUILD {
16 0     0 0   my ($self, $args) = @_;
17             Carp::croak('"organization" and "contact" cannot be used at the same time')
18 0 0 0       if exists $args->{organization} && exists $args->{contact};
19             }
20              
21             has organization => (is => 'rw', isa => InstanceOf ['SBOM::CycloneDX::OrganizationalEntity']);
22             has contact => (is => 'rw', isa => InstanceOf ['SBOM::CycloneDX::OrganizationalContact']);
23              
24             sub TO_JSON {
25              
26 0     0 1   my $self = shift;
27              
28 0           my $json = {};
29              
30 0 0         $json->{organization} = $self->organization if $self->organization;
31 0 0         $json->{contact} = $self->contact if $self->contact;
32              
33 0           return $json;
34              
35             }
36              
37             1;
38              
39             =encoding utf-8
40              
41             =head1 NAME
42              
43             SBOM::CycloneDX::DataGovernanceResponsibleParty - Data Custodians
44              
45             =head1 SYNOPSIS
46              
47             SBOM::CycloneDX::DataGovernanceResponsibleParty->new();
48              
49              
50             =head1 DESCRIPTION
51              
52             L provides the data custodians
53             are responsible for the safe custody, transport, and storage of data.
54              
55             =head2 METHODS
56              
57             L inherits all methods from L
58             and implements the following new ones.
59              
60             =over
61              
62             =item SBOM::CycloneDX::DataGovernanceResponsibleParty->new( %PARAMS )
63              
64             Properties:
65              
66             =over
67              
68             =item * C, The individual that is responsible for specific data
69             governance role(s).
70              
71             =item * C, The organization that is responsible for specific
72             data governance role(s).
73              
74             =back
75              
76             =item $data_governance_responsible_party->contact
77              
78             =item $data_governance_responsible_party->organization
79              
80             =back
81              
82              
83             =head1 SUPPORT
84              
85             =head2 Bugs / Feature Requests
86              
87             Please report any bugs or feature requests through the issue tracker
88             at L.
89             You will be notified automatically of any progress on your issue.
90              
91             =head2 Source Code
92              
93             This is open source software. The code repository is available for
94             public review and contribution under the terms of the license.
95              
96             L
97              
98             git clone https://github.com/giterlizzi/perl-SBOM-CycloneDX.git
99              
100              
101             =head1 AUTHOR
102              
103             =over 4
104              
105             =item * Giuseppe Di Terlizzi
106              
107             =back
108              
109              
110             =head1 LICENSE AND COPYRIGHT
111              
112             This software is copyright (c) 2025-2026 by Giuseppe Di Terlizzi.
113              
114             This is free software; you can redistribute it and/or modify it under
115             the same terms as the Perl 5 programming language system itself.
116              
117             =cut