CycloneDX/PatentFamily.pm

filter: Statementstmt 73.4% 36 / 49 Branchbran 0.0% 0 / 12 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 71.4% 10 / 14 Podpod 100% 1 / 1 totaltotal 61.8% 47 / 76 CC 7 SCAR 26.3
CC
7
Cov
59%
TO_JSON
42.0
__ANON__
6.0
__ANON__
2.0
CRAP 13.9
« CycloneDX/CryptoProperties/CipherSuite.pm ↑ Summary CycloneDX/PatentAssertion.pm »
1 package SBOM::CycloneDX::PatentFamily;
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::BomRef;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use SBOM::CycloneDX::List;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 1 ▶use Types::Standard qw(Str InstanceOf);
Subroutine BEGIN: called CC=1 SCAR=0.0
12 1 ▶use Types::TypeTiny qw(ArrayLike);
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 1 extends 'SBOM::CycloneDX::Base';
18  
19 has bom_ref => (
20 is => 'rw',
21 isa => InstanceOf ['SBOM::CycloneDX::BomRef'],
22 0 ▶ coerce => sub { ref($_[0]) ? $_[0] : SBOM::CycloneDX::BomRef->new($_[0]) }
Subroutine __ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
ref $_[0] ? : 0 0 0
23 1 );
24  
25 1 has family_id => (is => 'rw', isa => Str, required => 1);
26  
27 1 has priority_application => (is => 'rw', isa => InstanceOf ['SBOM::CycloneDX::Patent::PriorityApplication']);
28  
29 has members => (
30 is => 'rw',
31 isa => ArrayLike [Str | InstanceOf ['SBOM::CycloneDX::BomRef']],
32 0 ▶ default => sub { SBOM::CycloneDX::List->new }
Subroutine __ANON__: not called CC=1 SCAR=6.9
33 1 );
34  
35 has external_references => (
36 is => 'rw',
37 isa => ArrayLike [InstanceOf ['SBOM::CycloneDX::ExternalReference']],
38 0 ▶ default => sub { SBOM::CycloneDX::List->new }
Subroutine __ANON__: not called CC=1 SCAR=6.9
39 1 );
40  
41 0 ▶sub TO_JSON {
Subroutine TO_JSON: not called CC=6 SCAR=37.4
Pod documented
42  
43 0 my $self = shift;
44  
45 0 my $json = {};
46  
47 0 ▶ $json->{'bom-ref'} = $self->bom_ref if ($self->bom_ref);
Branch: 1 branch
BranchTrueFalseTotal
if $self->bom_ref 0 0 0
48 0 ▶ $json->{familyId} = $self->family_id if ($self->family_id);
Branch: 1 branch
BranchTrueFalseTotal
if $self->family_id 0 0 0
49 0 ▶ $json->{priorityApplication} = $self->priority_application if ($self->priority_application);
Branch: 1 branch
BranchTrueFalseTotal
if $self->priority_application 0 0 0
50 0 ▶ $json->{members} = $self->members if (@{$self->members});
Branch: 1 branch
BranchTrueFalseTotal
if @{$self->members;} 0 0 0
51 0 ▶ $json->{externalReferences} = $self->external_references if (@{$self->external_references});
Branch: 1 branch
BranchTrueFalseTotal
if @{$self->external_references;} 0 0 0
52  
53 0 return $json;
54  
55 }
56  
57 1 1;
58  
59 =encoding utf-8
60  
61 =head1 NAME
62  
63 SBOM::CycloneDX::PatentFamily - Patent Family
64  
65 =head1 SYNOPSIS
66  
67 SBOM::CycloneDX::PatentFamily->new();
68  
69  
70 =head1 DESCRIPTION
71  
72 L<SBOM::CycloneDX::PatentFamily> A patent family is a group of related
73 patent applications or granted patents that cover the same or similar
74 invention. These patents are filed in multiple jurisdictions to protect the
75 invention across different regions or countries. A patent family typically
76 includes patents that share a common priority date, originating from the
77 same initial application, and may vary slightly in scope or claims to
78 comply with regional legal frameworks. Fields align with WIPO ST.96
79 standards where applicable.
80  
81 =head2 METHODS
82  
83 L<SBOM::CycloneDX::PatentFamily> inherits all methods from L<SBOM::CycloneDX::Base>
84 and implements the following new ones.
85  
86 =over
87  
88 =item SBOM::CycloneDX::PatentFamily->new( %PARAMS )
89  
90 Properties:
91  
92 =over
93  
94 =item * C<bom_ref>, An identifier which can be used to reference the object
95 elsewhere in the BOM. Every C<bom-ref> must be unique within the BOM.
96  
97 For a patent, it might be a good idea to use a patent number as the BOM
98 reference ID.
99  
100 =item * C<external_references>, External references provide a way to document
101 systems, sites, and information that may be relevant but are not included
102 with the BOM. They may also establish specific relationships within or
103 external to the BOM.
104  
105 =item * C<family_id>, The unique identifier for the patent family, aligned
106 with the C<id> attribute in WIPO ST.96 v8.0's C<PatentFamilyType>. Refer to
107 L<PatentFamilyType in ST.96|https://www.wipo.int/standards/XMLSchema/ST96/V8_0/Patent/PatentFa
108 milyType.xsd>.
109  
110 =item * C<members>, A collection of patents or applications that belong to
111 this family, each identified by a C<bom-ref> pointing to a patent object
112 defined elsewhere in the BOM.
113  
114 =item * C<priority_application>, The "priority_application" contains the
115 essential data necessary to identify and reference an earlier patent filing for
116 priority rights. In line with WIPO ST.96 guidelines, it includes the
117 jurisdiction (office code), application number, and filing date-the three key
118 elements that uniquely specify the priority application in a global patent
119 context.
120  
121 See L<SBOM::CycloneDX::Patent::PriorityApplication>.
122  
123 =back
124  
125 =item $patent_family->bom_ref
126  
127 =item $patent_family->external_references
128  
129 =item $patent_family->family_id
130  
131 =item $patent_family->members
132  
133 =item $patent_family->priority_application
134  
135 =back
136  
137  
138 =head1 SUPPORT
139  
140 =head2 Bugs / Feature Requests
141  
142 Please report any bugs or feature requests through the issue tracker
143 at L<https://github.com/giterlizzi/perl-SBOM-CycloneDX/issues>.
144 You will be notified automatically of any progress on your issue.
145  
146 =head2 Source Code
147  
148 This is open source software. The code repository is available for
149 public review and contribution under the terms of the license.
150  
151 L<https://github.com/giterlizzi/perl-SBOM-CycloneDX>
152  
153 git clone https://github.com/giterlizzi/perl-SBOM-CycloneDX.git
154  
155  
156 =head1 AUTHOR
157  
158 =over 4
159  
160 =item * Giuseppe Di Terlizzi <gdt@cpan.org>
161  
162 =back
163  
164  
165 =head1 LICENSE AND COPYRIGHT
166  
167 This software is copyright (c) 2025-2026 by Giuseppe Di Terlizzi.
168  
169 This is free software; you can redistribute it and/or modify it under
170 the same terms as the Perl 5 programming language system itself.
171  
172 =cut
« CycloneDX/CryptoProperties/CipherSuite.pm ↑ Summary CycloneDX/PatentAssertion.pm »