File Coverage

blib/lib/SBOM/CycloneDX/CryptoProperties/RelatedCryptographicAsset.pm
Criterion Covered Total %
statement 20 25 80.0
branch 0 4 0.0
condition n/a
subroutine 7 8 87.5
pod 1 1 100.0
total 28 38 73.6


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