CPAN/Release.pm

filter: Statementstmt 98.7% 79 / 80 Branchbran 50.0% 27 / 54 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 97.1% 34 / 35 Podpod 100% 28 / 28 totaltotal 85.2% 168 / 197 CC 28 SCAR 31.7
CC
28
Cov
79%
init
51.4
object
2.0
BEGIN
1.0
CRAP 23.8
« CPAN/Scroll.pm ↑ Summary CPAN/Distribution.pm »
1 ##----------------------------------------------------------------------------
2 ## Meta CPAN API - ~/lib/Net/API/CPAN/Release.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/11/24
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::Release;
17 BEGIN
18 2 ▶{
Subroutine BEGIN: called CC=1 SCAR=0.0
19 2 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
20 2 ▶ use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
21 2 ▶ use parent qw( Net::API::CPAN::Generic );
Subroutine BEGIN: called CC=1 SCAR=0.0
22 2 ▶ use vars qw( $VERSION );
Subroutine BEGIN: called CC=1 SCAR=0.0
23 2 our $VERSION = 'v0.1.0';
24 };
25  
26 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
27 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
28  
29 sub init
30 1 ▶{
Subroutine init: called CC=28 SCAR=39.4
Pod documented
31 1 my $self = shift( @_ );
32 1 ▶ $self->{abstract} = undef unless( CORE::exists( $self->{abstract} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"abstract"} 1 0 1
33 1 ▶ $self->{archive} = undef unless( CORE::exists( $self->{archive} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"archive"} 1 0 1
34 1 ▶ $self->{author} = undef unless( CORE::exists( $self->{author} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"author"} 1 0 1
35 1 ▶ $self->{authorized} = undef unless( CORE::exists( $self->{authorized} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"authorized"} 1 0 1
36 1 ▶ $self->{changes_file} = undef unless( CORE::exists( $self->{changes_file} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"changes_file"} 1 0 1
37 1 ▶ $self->{checksum_md5} = undef unless( CORE::exists( $self->{checksum_md5} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"checksum_md5"} 1 0 1
38 1 ▶ $self->{checksum_sha256} = undef unless( CORE::exists( $self->{checksum_sha256} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"checksum_sha256"} 1 0 1
39 1 ▶ $self->{date} = undef unless( CORE::exists( $self->{date} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"date"} 1 0 1
40 1 ▶ $self->{dependency} = [] unless( CORE::exists( $self->{dependency} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"dependency"} 1 0 1
41 1 ▶ $self->{deprecated} = undef unless( CORE::exists( $self->{deprecated} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"deprecated"} 1 0 1
42 1 ▶ $self->{distribution} = undef unless( CORE::exists( $self->{distribution} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"distribution"} 1 0 1
43 1 ▶ $self->{download_url} = undef unless( CORE::exists( $self->{download_url} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"download_url"} 1 0 1
44 1 ▶ $self->{first} = undef unless( CORE::exists( $self->{first} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"first"} 1 0 1
45 1 ▶ $self->{id} = undef unless( CORE::exists( $self->{id} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"id"} 1 0 1
46 1 ▶ $self->{license} = [] unless( CORE::exists( $self->{license} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"license"} 1 0 1
47 1 ▶ $self->{main_module} = undef unless( CORE::exists( $self->{main_module} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"main_module"} 1 0 1
48 1 ▶ $self->{maturity} = undef unless( CORE::exists( $self->{maturity} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"maturity"} 1 0 1
49 1 ▶ $self->{metadata} = undef unless( CORE::exists( $self->{metadata} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"metadata"} 1 0 1
50 1 ▶ $self->{name} = undef unless( CORE::exists( $self->{name} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"name"} 1 0 1
51 1 $self->{object} = 'release';
52 1 ▶ $self->{provides} = [] unless( CORE::exists( $self->{provides} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"provides"} 1 0 1
53 1 ▶ $self->{resources} = undef unless( CORE::exists( $self->{resources} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"resources"} 1 0 1
54 1 ▶ $self->{stat} = undef unless( CORE::exists( $self->{stat} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"stat"} 1 0 1
55 1 ▶ $self->{status} = undef unless( CORE::exists( $self->{status} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"status"} 1 0 1
56 1 ▶ $self->{tests} = undef unless( CORE::exists( $self->{tests} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"tests"} 1 0 1
57 1 ▶ $self->{version} = '' unless( CORE::exists( $self->{version} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"version"} 1 0 1
58 1 ▶ $self->{version_numified} = undef unless( CORE::exists( $self->{version_numified} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"version_numified"} 1 0 1
59 1 $self->{_init_strict_use_sub} = 1;
60 1 $self->{_exception_class} = 'Net::API::CPAN::Exception';
61 1 ▶ $self->SUPER::init( @_ ) || return( $self->pass_error );
Branch: 1 branch
BranchTrueFalseTotal
$self->SUPER::init(@_) or return $self->pass_error 1 0 1
62 1 $self->{fields} = [qw(
63 abstract archive author authorized changes_file checksum_md5 checksum_sha256 date
64 dependency deprecated distribution download_url first id license main_module
65 maturity metadata name provides resources stat status tests version
66 version_numified
67 )];
68 1 return( $self );
69 }
70  
71 2 ▶sub abstract { return( shift->_set_get_scalar_as_object( 'abstract', @_ ) ); }
Subroutine abstract: called CC=1 SCAR=0.0
Pod documented
72  
73 2 ▶sub archive { return( shift->_set_get_scalar_as_object( 'archive', @_ ) ); }
Subroutine archive: called CC=1 SCAR=0.0
Pod documented
74  
75 2 ▶sub author { return( shift->_set_get_scalar_as_object( 'author', @_ ) ); }
Subroutine author: called CC=1 SCAR=0.0
Pod documented
76  
77 2 ▶sub authorized { return( shift->_set_get_boolean( 'authorized', @_ ) ); }
Subroutine authorized: called CC=1 SCAR=0.0
Pod documented
78  
79 2 ▶sub changes_file { return( shift->_set_get_scalar_as_object( 'changes_file', @_ ) ); }
Subroutine changes_file: called CC=1 SCAR=0.0
Pod documented
80  
81 2 ▶sub checksum_md5 { return( shift->_set_get_scalar_as_object( 'checksum_md5', @_ ) ); }
Subroutine checksum_md5: called CC=1 SCAR=0.0
Pod documented
82  
83 2 ▶sub checksum_sha256 { return( shift->_set_get_scalar_as_object( 'checksum_sha256', @_ ) ); }
Subroutine checksum_sha256: called CC=1 SCAR=0.0
Pod documented
84  
85 2 ▶sub date { return( shift->_set_get_datetime( 'date', @_ ) ); }
Subroutine date: called CC=1 SCAR=0.0
Pod documented
86  
87 2 ▶sub dependency { return( shift->_set_get_class_array_object( 'dependency', {
Subroutine dependency: called CC=1 SCAR=0.0
Pod documented
88 module => "scalar_as_object",
89 phase => "scalar_as_object",
90 relationship => "scalar_as_object",
91 version => { class => "Changes::Version", type => "version" },
92 }, @_ ) ); }
93  
94 2 ▶sub deprecated { return( shift->_set_get_boolean( 'deprecated', @_ ) ); }
Subroutine deprecated: called CC=1 SCAR=0.0
Pod documented
95  
96 2 ▶sub distribution { return( shift->_set_get_scalar_as_object( 'distribution', @_ ) ); }
Subroutine distribution: called CC=1 SCAR=0.0
Pod documented
97  
98 2 ▶sub download_url { return( shift->_set_get_uri( 'download_url', @_ ) ); }
Subroutine download_url: called CC=1 SCAR=0.0
Pod documented
99  
100 2 ▶sub first { return( shift->_set_get_boolean( 'first', @_ ) ); }
Subroutine first: called CC=1 SCAR=0.0
Pod documented
101  
102 2 ▶sub id { return( shift->_set_get_scalar_as_object( 'id', @_ ) ); }
Subroutine id: called CC=1 SCAR=0.0
Pod documented
103  
104 2 ▶sub license { return( shift->_set_get_array_as_object( 'license', @_ ) ); }
Subroutine license: called CC=1 SCAR=0.0
Pod documented
105  
106 2 ▶sub main_module { return( shift->_set_get_scalar_as_object( 'main_module', @_ ) ); }
Subroutine main_module: called CC=1 SCAR=0.0
Pod documented
107  
108 2 ▶sub maturity { return( shift->_set_get_scalar_as_object( 'maturity', @_ ) ); }
Subroutine maturity: called CC=1 SCAR=0.0
Pod documented
109  
110 2 ▶sub metadata { return( shift->_set_get_class( 'metadata', {
Subroutine metadata: called CC=1 SCAR=0.0
Pod documented
111 abstract => "scalar_as_object",
112 author => "array_as_object",
113 dynamic_config => "boolean",
114 generated_by => "scalar_as_object",
115 license => "array_as_object",
116 meta_spec => {
117 def => {
118 url => "uri",
119 version => { class => "Changes::Version", type => "version" },
120 },
121 type => "class",
122 },
123 name => "scalar_as_object",
124 no_index => {
125 def => { directory => "array_as_object", package => "array_as_object" },
126 type => "class",
127 },
128 prereqs => {
129 def => {
130 build => {
131 def => {
132 recommends => "hash_as_object",
133 requires => "hash_as_object",
134 suggests => "hash_as_object",
135 },
136 type => "class",
137 },
138 configure => {
139 def => {
140 recommends => "hash_as_object",
141 requires => "hash_as_object",
142 suggests => "hash_as_object",
143 },
144 type => "class",
145 },
146 develop => {
147 def => {
148 recommends => "hash_as_object",
149 requires => "hash_as_object",
150 suggests => "hash_as_object",
151 },
152 type => "class",
153 },
154 runtime => {
155 def => {
156 recommends => "hash_as_object",
157 requires => "hash_as_object",
158 suggests => "hash_as_object",
159 },
160 type => "class",
161 },
162 test => {
163 def => {
164 recommends => "hash_as_object",
165 requires => "hash_as_object",
166 suggests => "hash_as_object",
167 },
168 type => "class",
169 },
170 },
171 type => "class",
172 },
173 release_status => "scalar_as_object",
174 resources => {
175 def => {
176 bugtracker => {
177 def => { mailto => "uri", type => "string", web => "uri" },
178 type => "class",
179 },
180 homepage => {
181 def => { web => "uri" },
182 type => "class",
183 },
184 license => "array_as_object",
185 repository => {
186 def => { type => "scalar", url => "uri", web => "uri" },
187 type => "class",
188 },
189 },
190 type => "class",
191 },
192 version => { class => "Changes::Version", type => "version" },
193 version_numified => "float",
194 x_contributors => { type => "array" },
195 x_generated_by_perl => { type => "string" },
196 x_serialization_backend => { type => "string" },
197 x_spdx_expression => { type => "string" },
198 x_static_install => { type => "string" },
199 }, @_ ) ); }
200  
201 2 ▶sub name { return( shift->_set_get_scalar_as_object( 'name', @_ ) ); }
Subroutine name: called CC=1 SCAR=0.0
Pod documented
202  
203 0 ▶sub object { return( shift->_set_get_scalar_as_object( 'object', @_ ) ); }
Subroutine object: not called CC=1 SCAR=6.9
Pod documented
204  
205 2 ▶sub provides { return( shift->_set_get_array_as_object( 'provides', @_ ) ); }
Subroutine provides: called CC=1 SCAR=0.0
Pod documented
206  
207 2 ▶sub resources { return( shift->_set_get_class( 'resources', {
Subroutine resources: called CC=1 SCAR=0.0
Pod documented
208 bugtracker => {
209 def => { mailto => "uri", type => "string", web => "uri" },
210 type => "class",
211 },
212 homepage => {
213 def => { web => "uri" },
214 type => "class",
215 },
216 license => "array_as_object",
217 repository => {
218 def => { type => "scalar", url => "uri", web => "uri" },
219 type => "class",
220 },
221 }, @_ ) ); }
222  
223 2 ▶sub stat { return( shift->_set_get_class( 'stat', {
Subroutine stat: called CC=1 SCAR=0.0
Pod documented
224 gid => "integer",
225 mode => "integer",
226 mtime => "datetime",
227 size => "integer",
228 uid => "integer",
229 }, @_ ) ); }
230  
231 2 ▶sub status { return( shift->_set_get_scalar_as_object( 'status', @_ ) ); }
Subroutine status: called CC=1 SCAR=0.0
Pod documented
232  
233 1 ▶sub tests { return( shift->_set_get_class( 'tests', { fail => "integer", na => "integer", pass => "integer", unknown => "integer" }, @_ ) ); }
Subroutine tests: called CC=1 SCAR=0.0
Pod documented
234  
235 2 ▶sub version { return( shift->_set_get_version( { class => "Changes::Version", field => "version" }, @_ ) ); }
Subroutine version: called CC=1 SCAR=0.0
Pod documented
236  
237 2 ▶sub version_numified { return( shift->_set_get_number( 'version_numified', @_ ) ); }
Subroutine version_numified: called CC=1 SCAR=0.0
Pod documented
238  
239 2 1;
240 # NOTE: POD
241 __END__
« CPAN/Scroll.pm ↑ Summary CPAN/Distribution.pm »