| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
|
2
|
|
|
|
|
|
|
## Meta CPAN API - ~/lib/Net/API/CPAN/Cve.pm |
|
3
|
|
|
|
|
|
|
## Version v0.1.0 |
|
4
|
|
|
|
|
|
|
## Copyright(c) 2023 DEGUEST Pte. Ltd. |
|
5
|
|
|
|
|
|
|
## Author: Jacques Deguest <jack@deguest.jp> |
|
6
|
|
|
|
|
|
|
## Created 2023/07/25 |
|
7
|
|
|
|
|
|
|
## Modified 2023/09/26 |
|
8
|
|
|
|
|
|
|
## All rights reserved |
|
9
|
|
|
|
|
|
|
## |
|
10
|
|
|
|
|
|
|
## |
|
11
|
|
|
|
|
|
|
## This program is free software; you can redistribute it and/or modify it |
|
12
|
|
|
|
|
|
|
## under the same terms as Perl itself. |
|
13
|
|
|
|
|
|
|
##---------------------------------------------------------------------------- |
|
14
|
|
|
|
|
|
|
# This module file has been automatically generated. Any change made here will be lost. |
|
15
|
|
|
|
|
|
|
# Edit the script in ./build/build_modules.pl instead |
|
16
|
|
|
|
|
|
|
package Net::API::CPAN::Cve; |
|
17
|
|
|
|
|
|
|
BEGIN |
|
18
|
|
|
|
|
|
|
{ |
|
19
|
2
|
|
|
2
|
|
224768
|
use strict; |
|
|
2
|
|
|
|
|
13
|
|
|
|
2
|
|
|
|
|
62
|
|
|
20
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
64
|
|
|
21
|
2
|
|
|
2
|
|
13
|
use parent qw( Net::API::CPAN::Generic ); |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
12
|
|
|
22
|
2
|
|
|
2
|
|
126
|
use vars qw( $VERSION ); |
|
|
2
|
|
|
|
|
17
|
|
|
|
2
|
|
|
|
|
99
|
|
|
23
|
2
|
|
|
2
|
|
36
|
our $VERSION = 'v0.1.0'; |
|
24
|
|
|
|
|
|
|
}; |
|
25
|
|
|
|
|
|
|
|
|
26
|
2
|
|
|
2
|
|
13
|
use strict; |
|
|
2
|
|
|
|
|
3
|
|
|
|
2
|
|
|
|
|
37
|
|
|
27
|
2
|
|
|
2
|
|
8
|
use warnings; |
|
|
2
|
|
|
|
|
3
|
|
|
|
2
|
|
|
|
|
912
|
|
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub init |
|
30
|
|
|
|
|
|
|
{ |
|
31
|
1
|
|
|
1
|
1
|
9195
|
my $self = shift( @_ ); |
|
32
|
1
|
50
|
|
|
|
70
|
$self->{affected_versions} = undef unless( CORE::exists( $self->{affected_versions} ) ); |
|
33
|
1
|
50
|
|
|
|
4
|
$self->{cpansa_id} = undef unless( CORE::exists( $self->{cpansa_id} ) ); |
|
34
|
1
|
50
|
|
|
|
3
|
$self->{cves} = undef unless( CORE::exists( $self->{cves} ) ); |
|
35
|
1
|
50
|
|
|
|
4
|
$self->{description} = undef unless( CORE::exists( $self->{description} ) ); |
|
36
|
1
|
50
|
|
|
|
4
|
$self->{distribution} = undef unless( CORE::exists( $self->{distribution} ) ); |
|
37
|
1
|
|
|
|
|
2
|
$self->{object} = 'cve'; |
|
38
|
1
|
50
|
|
|
|
4
|
$self->{references} = undef unless( CORE::exists( $self->{references} ) ); |
|
39
|
1
|
50
|
|
|
|
6
|
$self->{releases} = undef unless( CORE::exists( $self->{releases} ) ); |
|
40
|
1
|
50
|
|
|
|
3
|
$self->{reported} = undef unless( CORE::exists( $self->{reported} ) ); |
|
41
|
1
|
50
|
|
|
|
3
|
$self->{severity} = undef unless( CORE::exists( $self->{severity} ) ); |
|
42
|
1
|
50
|
|
|
|
4
|
$self->{versions} = undef unless( CORE::exists( $self->{versions} ) ); |
|
43
|
1
|
|
|
|
|
2
|
$self->{_init_strict_use_sub} = 1; |
|
44
|
1
|
|
|
|
|
2
|
$self->{_exception_class} = 'Net::API::CPAN::Exception'; |
|
45
|
1
|
50
|
|
|
|
6
|
$self->SUPER::init( @_ ) || return( $self->pass_error ); |
|
46
|
1
|
|
|
|
|
5
|
$self->{fields} = [qw( |
|
47
|
|
|
|
|
|
|
affected_versions cpansa_id cves description distribution references releases |
|
48
|
|
|
|
|
|
|
reported severity versions |
|
49
|
|
|
|
|
|
|
)]; |
|
50
|
1
|
|
|
|
|
2
|
return( $self ); |
|
51
|
|
|
|
|
|
|
} |
|
52
|
|
|
|
|
|
|
|
|
53
|
1
|
|
|
1
|
1
|
4409
|
sub affected_versions { return( shift->_set_get_scalar_as_object( 'affected_versions', @_ ) ); } |
|
54
|
|
|
|
|
|
|
|
|
55
|
1
|
|
|
1
|
1
|
54996
|
sub cpansa_id { return( shift->_set_get_scalar_as_object( 'cpansa_id', @_ ) ); } |
|
56
|
|
|
|
|
|
|
|
|
57
|
1
|
|
|
1
|
1
|
1027
|
sub cves { return( shift->_set_get_scalar_as_object( 'cves', @_ ) ); } |
|
58
|
|
|
|
|
|
|
|
|
59
|
1
|
|
|
1
|
1
|
964
|
sub description { return( shift->_set_get_scalar_as_object( 'description', @_ ) ); } |
|
60
|
|
|
|
|
|
|
|
|
61
|
1
|
|
|
1
|
1
|
1049
|
sub distribution { return( shift->_set_get_scalar_as_object( 'distribution', @_ ) ); } |
|
62
|
|
|
|
|
|
|
|
|
63
|
0
|
|
|
0
|
1
|
0
|
sub object { return( shift->_set_get_scalar_as_object( 'object', @_ ) ); } |
|
64
|
|
|
|
|
|
|
|
|
65
|
1
|
|
|
1
|
1
|
1164
|
sub references { return( shift->_set_get_scalar_as_object( 'references', @_ ) ); } |
|
66
|
|
|
|
|
|
|
|
|
67
|
1
|
|
|
1
|
1
|
1088
|
sub releases { return( shift->_set_get_scalar_as_object( 'releases', @_ ) ); } |
|
68
|
|
|
|
|
|
|
|
|
69
|
1
|
|
|
1
|
1
|
1013
|
sub reported { return( shift->_set_get_datetime( 'reported', @_ ) ); } |
|
70
|
|
|
|
|
|
|
|
|
71
|
1
|
|
|
1
|
1
|
2543
|
sub severity { return( shift->_set_get_scalar_as_object( 'severity', @_ ) ); } |
|
72
|
|
|
|
|
|
|
|
|
73
|
1
|
|
|
1
|
1
|
949
|
sub versions { return( shift->_set_get_scalar_as_object( 'versions', @_ ) ); } |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
1; |
|
76
|
|
|
|
|
|
|
# NOTE: POD |
|
77
|
|
|
|
|
|
|
__END__ |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=encoding utf-8 |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 NAME |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Net::API::CPAN::Cve - Meta CPAN API Cve Class |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
use Net::API::CPAN::Cve; |
|
88
|
|
|
|
|
|
|
my $string = $obj->affected_versions; |
|
89
|
|
|
|
|
|
|
my $string = $obj->cpansa_id; |
|
90
|
|
|
|
|
|
|
my $string = $obj->cves; |
|
91
|
|
|
|
|
|
|
my $string = $obj->description; |
|
92
|
|
|
|
|
|
|
my $string = $obj->distribution; |
|
93
|
|
|
|
|
|
|
my $str = $obj->object; |
|
94
|
|
|
|
|
|
|
my $string = $obj->references; |
|
95
|
|
|
|
|
|
|
my $string = $obj->releases; |
|
96
|
|
|
|
|
|
|
my $date = $obj->reported; |
|
97
|
|
|
|
|
|
|
my $string = $obj->severity; |
|
98
|
|
|
|
|
|
|
my $string = $obj->versions; |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head1 VERSION |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
v0.1.0 |
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
This class serves to retrieve and manipulate cves. |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
It inherits from L<Net::API::CPAN::Generic> |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=head2 new |
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
Provided with an hash or hash reference of parameters, and this instantiates a new C<Net::API::CPAN::Cve> object. |
|
115
|
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
The parameters that can be provided bear the same name and supports the same values as the methods below. |
|
117
|
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head1 METHODS |
|
119
|
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=head2 affected_versions |
|
121
|
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
Sets or gets a string and returns a L<scalar object|Module::Generic::Scalar>, even if there is no value. |
|
123
|
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=head2 cpansa_id |
|
125
|
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
Sets or gets a string and returns a L<scalar object|Module::Generic::Scalar>, even if there is no value. |
|
127
|
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=head2 cves |
|
129
|
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
Sets or gets a string and returns a L<scalar object|Module::Generic::Scalar>, even if there is no value. |
|
131
|
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=head2 description |
|
133
|
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
Sets or gets a string and returns a L<scalar object|Module::Generic::Scalar>, even if there is no value. |
|
135
|
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=head2 distribution |
|
137
|
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
Sets or gets a string and returns a L<scalar object|Module::Generic::Scalar>, even if there is no value. |
|
139
|
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=head2 object |
|
141
|
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
Returns the object type for this class, which is C<cve> |
|
143
|
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
=head2 references |
|
145
|
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
Sets or gets a string and returns a L<scalar object|Module::Generic::Scalar>, even if there is no value. |
|
147
|
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
=head2 releases |
|
149
|
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
Sets or gets a string and returns a L<scalar object|Module::Generic::Scalar>, even if there is no value. |
|
151
|
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
=head2 reported |
|
153
|
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
Sets or gets a datetime value, and returns a L<DateTime object|DateTime> that stringifies to the format that was provided with the string set (usally an ISO 8601 datetime format) or C<undef> if no value is set. |
|
155
|
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
=head2 severity |
|
157
|
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
Sets or gets a string and returns a L<scalar object|Module::Generic::Scalar>, even if there is no value. |
|
159
|
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
=head2 versions |
|
161
|
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
Sets or gets a string and returns a L<scalar object|Module::Generic::Scalar>, even if there is no value. |
|
163
|
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
=head1 AUTHOR |
|
165
|
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> |
|
167
|
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
169
|
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
L<Net::API::CPAN>, L<Net::API::CPAN::Activity>, L<Net::API::CPAN::Author>, L<Net::API::CPAN::Changes>, L<Net::API::CPAN::Changes::Release>, L<Net::API::CPAN::Contributor>, L<Net::API::CPAN::Cover>, L<Net::API::CPAN::Diff>, L<Net::API::CPAN::Distribution>, L<Net::API::CPAN::DownloadUrl>, L<Net::API::CPAN::Favorite>, L<Net::API::CPAN::File>, L<Net::API::CPAN::Module>, L<Net::API::CPAN::Package>, L<Net::API::CPAN::Permission>, L<Net::API::CPAN::Rating>, L<Net::API::CPAN::Release> |
|
171
|
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
L<MetaCPAN::API>, L<MetaCPAN::Client> |
|
173
|
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
L<https://github.com/metacpan/metacpan-api/blob/master/docs/API-docs.md> |
|
175
|
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
|
177
|
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
Copyright(c) 2023 DEGUEST Pte. Ltd. |
|
179
|
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
All rights reserved |
|
181
|
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. |
|
183
|
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
=cut |
|
185
|
|
|
|
|
|
|
|