CycloneDX/IdentifiableAction.pm

filter: Statementstmt 80.0% 28 / 35 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 8 / 10 Podpod 100% 1 / 1 totaltotal 68.5% 37 / 54 CC 5 SCAR 19.7
CC
5
Cov
65%
TO_JSON
20.0
__ANON__
6.0
BEGIN
1.0
CRAP 7.1
« CycloneDX/Declarations/Assessor.pm ↑ Summary CycloneDX/Patent/PriorityApplication.pm »
1 package SBOM::CycloneDX::IdentifiableAction;
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  
12 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 1 extends 'SBOM::CycloneDX::Base';
16  
17 has timestamp => (
18 is => 'rw',
19 isa => InstanceOf ['SBOM::CycloneDX::Timestamp'],
20 0 ▶ coerce => sub { ref($_[0]) ? $_[0] : SBOM::CycloneDX::Timestamp->new($_[0]) }
Subroutine __ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
ref $_[0] ? : 0 0 0
21 1 );
22  
23 1 has name => (is => 'rw', isa => Str);
24 1 has email => (is => 'rw', isa => Str);
25  
26 0 ▶sub TO_JSON {
Subroutine TO_JSON: not called CC=4 SCAR=30.0
Pod documented
27  
28 0 my $self = shift;
29  
30 0 my $json = {};
31  
32 0 ▶ $json->{timestamp} = $self->timestamp if $self->timestamp;
Branch: 1 branch
BranchTrueFalseTotal
if $self->timestamp 0 0 0
33 0 ▶ $json->{name} = $self->name if $self->name;
Branch: 1 branch
BranchTrueFalseTotal
if $self->name 0 0 0
34 0 ▶ $json->{email} = $self->email if $self->email;
Branch: 1 branch
BranchTrueFalseTotal
if $self->email 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::IdentifiableAction - Identifiable Action
47  
48 =head1 SYNOPSIS
49  
50 SBOM::CycloneDX::IdentifiableAction->new();
51  
52  
53 =head1 DESCRIPTION
54  
55 L<SBOM::CycloneDX::IdentifiableAction> specifies an individual commit.
56  
57 =head2 METHODS
58  
59 L<SBOM::CycloneDX::IdentifiableAction> inherits all methods from L<SBOM::CycloneDX::Base>
60 and implements the following new ones.
61  
62 =over
63  
64 =item SBOM::CycloneDX::IdentifiableAction->new( %PARAMS )
65  
66 Properties:
67  
68 =over
69  
70 =item * C<email>, The email address of the individual who performed the
71 action
72  
73 =item * C<name>, The name of the individual who performed the action
74  
75 =item * C<timestamp>, The timestamp in which the action occurred
76  
77 =back
78  
79 =item $identifiable_action->email
80  
81 =item $identifiable_action->name
82  
83 =item $identifiable_action->timestamp
84  
85 =back
86  
87  
88 =head1 SUPPORT
89  
90 =head2 Bugs / Feature Requests
91  
92 Please report any bugs or feature requests through the issue tracker
93 at L<https://github.com/giterlizzi/perl-SBOM-CycloneDX/issues>.
94 You will be notified automatically of any progress on your issue.
95  
96 =head2 Source Code
97  
98 This is open source software. The code repository is available for
99 public review and contribution under the terms of the license.
100  
101 L<https://github.com/giterlizzi/perl-SBOM-CycloneDX>
102  
103 git clone https://github.com/giterlizzi/perl-SBOM-CycloneDX.git
104  
105  
106 =head1 AUTHOR
107  
108 =over 4
109  
110 =item * Giuseppe Di Terlizzi <gdt@cpan.org>
111  
112 =back
113  
114  
115 =head1 LICENSE AND COPYRIGHT
116  
117 This software is copyright (c) 2025-2026 by Giuseppe Di Terlizzi.
118  
119 This is free software; you can redistribute it and/or modify it under
120 the same terms as the Perl 5 programming language system itself.
121  
122 =cut
« CycloneDX/Declarations/Assessor.pm ↑ Summary CycloneDX/Patent/PriorityApplication.pm »