File Coverage

blib/lib/SBOM/CycloneDX/IdentifiableAction.pm
Criterion Covered Total %
statement 23 29 79.3
branch 0 6 0.0
condition n/a
subroutine 8 9 88.8
pod 1 1 100.0
total 32 45 71.1


line stmt bran cond sub pod time code
1             package SBOM::CycloneDX::IdentifiableAction;
2              
3 1     1   2987 use 5.010001;
  1         5  
4 1     1   8 use strict;
  1         4  
  1         50  
5 1     1   6 use warnings;
  1         3  
  1         110  
6 1     1   8 use utf8;
  1         2  
  1         13  
7              
8 1     1   38 use SBOM::CycloneDX::List;
  1         2  
  1         60  
9              
10 1     1   9 use Types::Standard qw(Str InstanceOf);
  1         2  
  1         14  
11              
12 1     1   6996 use Moo;
  1         5  
  1         16  
13 1     1   692 use namespace::autoclean;
  1         5  
  1         20  
14              
15             extends 'SBOM::CycloneDX::Base';
16              
17             has timestamp => (
18             is => 'rw',
19             isa => InstanceOf ['SBOM::CycloneDX::Timestamp'],
20             coerce => sub { ref($_[0]) ? $_[0] : SBOM::CycloneDX::Timestamp->new($_[0]) }
21             );
22              
23             has name => (is => 'rw', isa => Str);
24             has email => (is => 'rw', isa => Str);
25              
26             sub TO_JSON {
27              
28 0     0 1   my $self = shift;
29              
30 0           my $json = {};
31              
32 0 0         $json->{timestamp} = $self->timestamp if $self->timestamp;
33 0 0         $json->{name} = $self->name if $self->name;
34 0 0         $json->{email} = $self->email if $self->email;
35              
36 0           return $json;
37              
38             }
39              
40             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 specifies an individual commit.
56              
57             =head2 METHODS
58              
59             L inherits all methods from L
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, The email address of the individual who performed the
71             action
72              
73             =item * C, The name of the individual who performed the action
74              
75             =item * C, 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.
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
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
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