CycloneDX/Component/GraphicsCollection.pm

filter: Statementstmt 81.0% 30 / 37 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 81.8% 9 / 11 Podpod 100% 1 / 1 totaltotal 75.4% 40 / 53 CC 3 SCAR 12.9
CC
3
Cov
73%
TO_JSON
12.0
__ANON__
2.0
BEGIN
1.0
CRAP 3.6
« CycloneDX/Component/QuantitativeAnalysis.pm ↑ Summary CycloneDX/Annotation.pm »
1 package SBOM::CycloneDX::Component::GraphicsCollection;
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::List;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 ▶use Types::Standard qw(Str InstanceOf);
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use Types::TypeTiny qw(ArrayLike);
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 1 extends 'SBOM::CycloneDX::Base';
17  
18 1 has description => (is => 'rw', isa => Str);
19  
20 has collection => (
21 is => 'rw',
22 isa => ArrayLike [InstanceOf ['SBOM::CycloneDX::Component::Graphic']],
23 0 ▶ default => sub { SBOM::CycloneDX::List->new }
Subroutine __ANON__: not called CC=1 SCAR=6.9
24 1 );
25  
26  
27 0 ▶sub TO_JSON {
Subroutine TO_JSON: not called CC=3 SCAR=24.8
Pod documented
28  
29 0 my $self = shift;
30  
31 0 my $json = {};
32  
33 0 ▶ $json->{description} = $self->description if $self->description;
Branch: 1 branch
BranchTrueFalseTotal
if $self->description 0 0 0
34 0 ▶ $json->{collection} = $self->collection if @{$self->collection};
Branch: 1 branch
BranchTrueFalseTotal
if @{$self->collection;} 0 0 0
35  
36 0 return $json;
37  
38 }
39  
40 1 1;
41  
42 =encoding utf-8
43  
44 =head1 NAME
45  
46 SBOM::CycloneDX::Component::GraphicsCollection - Graphics Collection
47  
48 =head1 SYNOPSIS
49  
50 SBOM::CycloneDX::Component::GraphicsCollection->new();
51  
52  
53 =head1 DESCRIPTION
54  
55 L<SBOM::CycloneDX::Component::GraphicsCollection> provides a collection of graphics
56 that represent various measurements.
57  
58 =head2 METHODS
59  
60 L<SBOM::CycloneDX::Component::GraphicsCollection> inherits all methods from L<SBOM::CycloneDX::Base>
61 and implements the following new ones.
62  
63 =over
64  
65 =item SBOM::CycloneDX::Component::GraphicsCollection->new( %PARAMS )
66  
67 Properties:
68  
69 =over
70  
71 =item * C<collection>, A collection of graphics.
72  
73 =item * C<description>, A description of this collection of graphics.
74  
75 =back
76  
77 =item $graphics_collection->collection
78  
79 =item $graphics_collection->description
80  
81 =back
82  
83  
84 =head1 SUPPORT
85  
86 =head2 Bugs / Feature Requests
87  
88 Please report any bugs or feature requests through the issue tracker
89 at L<https://github.com/giterlizzi/perl-SBOM-CycloneDX/issues>.
90 You will be notified automatically of any progress on your issue.
91  
92 =head2 Source Code
93  
94 This is open source software. The code repository is available for
95 public review and contribution under the terms of the license.
96  
97 L<https://github.com/giterlizzi/perl-SBOM-CycloneDX>
98  
99 git clone https://github.com/giterlizzi/perl-SBOM-CycloneDX.git
100  
101  
102 =head1 AUTHOR
103  
104 =over 4
105  
106 =item * Giuseppe Di Terlizzi <gdt@cpan.org>
107  
108 =back
109  
110  
111 =head1 LICENSE AND COPYRIGHT
112  
113 This software is copyright (c) 2025-2026 by Giuseppe Di Terlizzi.
114  
115 This is free software; you can redistribute it and/or modify it under
116 the same terms as the Perl 5 programming language system itself.
117  
118 =cut
« CycloneDX/Component/QuantitativeAnalysis.pm ↑ Summary CycloneDX/Annotation.pm »