CycloneDX/Advisory.pm

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