CPAN/File.pm

filter: Statementstmt 98.9% 91 / 92 Branchbran 98.4% 65 / 66 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 97.5% 40 / 41 Podpod 100% 34 / 34 totaltotal 98.7% 230 / 233 CC 34 SCAR 27.8
CC
34
Cov
99%
init
34.0
object
2.0
BEGIN
1.0
CRAP 16.2
« CPAN/Author.pm ↑ Summary CPAN/List/Web.pm »
1 ##----------------------------------------------------------------------------
2 ## Meta CPAN API - ~/lib/Net/API/CPAN/File.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::File;
17 BEGIN
18 4 ▶{
Subroutine BEGIN: called CC=1 SCAR=0.0
19 4 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
20 4 ▶ use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
21 4 ▶ use parent qw( Net::API::CPAN::Generic );
Subroutine BEGIN: called CC=1 SCAR=0.0
22 4 ▶ use vars qw( $VERSION );
Subroutine BEGIN: called CC=1 SCAR=0.0
23 4 our $VERSION = 'v0.1.0';
24 };
25  
26 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
27 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
28  
29 sub init
30 3 ▶{
Subroutine init: called CC=34 SCAR=35.3
Pod documented
31 3 my $self = shift( @_ );
32 3 ▶ $self->{abstract} = undef unless( CORE::exists( $self->{abstract} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"abstract"} 2 1 3
33 3 ▶ $self->{author} = [] unless( CORE::exists( $self->{author} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"author"} 1 2 3
34 3 ▶ $self->{authorized} = undef unless( CORE::exists( $self->{authorized} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"authorized"} 1 2 3
35 3 ▶ $self->{binary} = undef unless( CORE::exists( $self->{binary} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"binary"} 1 2 3
36 3 ▶ $self->{category} = undef unless( CORE::exists( $self->{category} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"category"} 2 1 3
37 3 ▶ $self->{date} = undef unless( CORE::exists( $self->{date} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"date"} 1 2 3
38 3 ▶ $self->{deprecated} = undef unless( CORE::exists( $self->{deprecated} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"deprecated"} 1 2 3
39 3 ▶ $self->{description} = undef unless( CORE::exists( $self->{description} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"description"} 2 1 3
40 3 ▶ $self->{dir} = undef unless( CORE::exists( $self->{dir} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"dir"} 2 1 3
41 3 ▶ $self->{directory} = undef unless( CORE::exists( $self->{directory} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"directory"} 1 2 3
42 3 ▶ $self->{dist_fav_count} = undef unless( CORE::exists( $self->{dist_fav_count} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"dist_fav_count"} 1 2 3
43 3 ▶ $self->{distribution} = undef unless( CORE::exists( $self->{distribution} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"distribution"} 1 2 3
44 3 ▶ $self->{documentation} = undef unless( CORE::exists( $self->{documentation} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"documentation"} 2 1 3
45 3 ▶ $self->{download_url} = undef unless( CORE::exists( $self->{download_url} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"download_url"} 1 2 3
46 3 ▶ $self->{id} = undef unless( CORE::exists( $self->{id} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"id"} 1 2 3
47 3 ▶ $self->{indexed} = undef unless( CORE::exists( $self->{indexed} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"indexed"} 1 2 3
48 3 ▶ $self->{level} = undef unless( CORE::exists( $self->{level} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"level"} 1 2 3
49 3 ▶ $self->{maturity} = undef unless( CORE::exists( $self->{maturity} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"maturity"} 1 2 3
50 3 ▶ $self->{mime} = undef unless( CORE::exists( $self->{mime} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"mime"} 1 2 3
51 3 ▶ $self->{module} = [] unless( CORE::exists( $self->{module} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"module"} 1 2 3
52 3 ▶ $self->{name} = undef unless( CORE::exists( $self->{name} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"name"} 1 2 3
53 3 $self->{object} = 'file';
54 3 ▶ $self->{path} = undef unless( CORE::exists( $self->{path} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"path"} 1 2 3
55 3 ▶ $self->{pod} = undef unless( CORE::exists( $self->{pod} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"pod"} 1 2 3
56 3 ▶ $self->{pod_lines} = [] unless( CORE::exists( $self->{pod_lines} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"pod_lines"} 1 2 3
57 3 ▶ $self->{release} = [] unless( CORE::exists( $self->{release} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"release"} 1 2 3
58 3 ▶ $self->{sloc} = undef unless( CORE::exists( $self->{sloc} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"sloc"} 1 2 3
59 3 ▶ $self->{slop} = undef unless( CORE::exists( $self->{slop} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"slop"} 1 2 3
60 3 ▶ $self->{stat} = undef unless( CORE::exists( $self->{stat} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"stat"} 1 2 3
61 3 ▶ $self->{status} = undef unless( CORE::exists( $self->{status} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"status"} 1 2 3
62 3 ▶ $self->{suggest} = undef unless( CORE::exists( $self->{suggest} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"suggest"} 2 1 3
63 3 ▶ $self->{version} = '' unless( CORE::exists( $self->{version} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"version"} 1 2 3
64 3 ▶ $self->{version_numified} = undef unless( CORE::exists( $self->{version_numified} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"version_numified"} 1 2 3
65 3 $self->{_init_strict_use_sub} = 1;
66 3 $self->{_exception_class} = 'Net::API::CPAN::Exception';
67 3 ▶ $self->SUPER::init( @_ ) || return( $self->pass_error );
Branch: 1 branch
BranchTrueFalseTotal
$self->SUPER::init(@_) or return $self->pass_error 3 0 3
68 3 $self->{fields} = [qw(
69 abstract author authorized binary category date deprecated description dir
70 directory dist_fav_count distribution documentation download_url id indexed level
71 maturity mime module name path pod pod_lines release sloc slop stat status suggest
72 version version_numified
73 )];
74 3 return( $self );
75 }
76  
77 4 ▶sub abstract { return( shift->_set_get_scalar_as_object( 'abstract', @_ ) ); }
Subroutine abstract: called CC=1 SCAR=0.0
Pod documented
78  
79 6 ▶sub author { return( shift->_set_get_scalar_or_object( 'author', 'Net::API::CPAN::Author', @_ ) ); }
Subroutine author: called CC=1 SCAR=0.0
Pod documented
80  
81 6 ▶sub authorized { return( shift->_set_get_boolean( 'authorized', @_ ) ); }
Subroutine authorized: called CC=1 SCAR=0.0
Pod documented
82  
83 6 ▶sub binary { return( shift->_set_get_boolean( 'binary', @_ ) ); }
Subroutine binary: called CC=1 SCAR=0.0
Pod documented
84  
85 3 ▶sub category { return( shift->_set_get_scalar_as_object( 'category', @_ ) ); }
Subroutine category: called CC=1 SCAR=0.0
Pod documented
86  
87 6 ▶sub date { return( shift->_set_get_datetime( 'date', @_ ) ); }
Subroutine date: called CC=1 SCAR=0.0
Pod documented
88  
89 6 ▶sub deprecated { return( shift->_set_get_boolean( 'deprecated', @_ ) ); }
Subroutine deprecated: called CC=1 SCAR=0.0
Pod documented
90  
91 4 ▶sub description { return( shift->_set_get_scalar_as_object( 'description', @_ ) ); }
Subroutine description: called CC=1 SCAR=0.0
Pod documented
92  
93 2 ▶sub dir { return( shift->_set_get_scalar_as_object( 'dir', @_ ) ); }
Subroutine dir: called CC=1 SCAR=0.0
Pod documented
94  
95 6 ▶sub directory { return( shift->_set_get_boolean( 'directory', @_ ) ); }
Subroutine directory: called CC=1 SCAR=0.0
Pod documented
96  
97 5 ▶sub dist_fav_count { return( shift->_set_get_number( 'dist_fav_count', @_ ) ); }
Subroutine dist_fav_count: called CC=1 SCAR=0.0
Pod documented
98  
99 6 ▶sub distribution { return( shift->_set_get_scalar_as_object( 'distribution', @_ ) ); }
Subroutine distribution: called CC=1 SCAR=0.0
Pod documented
100  
101 4 ▶sub documentation { return( shift->_set_get_scalar_as_object( 'documentation', @_ ) ); }
Subroutine documentation: called CC=1 SCAR=0.0
Pod documented
102  
103 6 ▶sub download_url { return( shift->_set_get_uri( 'download_url', @_ ) ); }
Subroutine download_url: called CC=1 SCAR=0.0
Pod documented
104  
105 6 ▶sub id { return( shift->_set_get_scalar_as_object( 'id', @_ ) ); }
Subroutine id: called CC=1 SCAR=0.0
Pod documented
106  
107 6 ▶sub indexed { return( shift->_set_get_boolean( 'indexed', @_ ) ); }
Subroutine indexed: called CC=1 SCAR=0.0
Pod documented
108  
109 6 ▶sub level { return( shift->_set_get_number( 'level', @_ ) ); }
Subroutine level: called CC=1 SCAR=0.0
Pod documented
110  
111 6 ▶sub maturity { return( shift->_set_get_scalar_as_object( 'maturity', @_ ) ); }
Subroutine maturity: called CC=1 SCAR=0.0
Pod documented
112  
113 6 ▶sub mime { return( shift->_set_get_scalar_as_object( 'mime', @_ ) ); }
Subroutine mime: called CC=1 SCAR=0.0
Pod documented
114  
115 6 ▶sub module { return( shift->_set_get_class_array_object( 'module', {
Subroutine module: called CC=1 SCAR=0.0
Pod documented
116 associated_pod => "scalar_as_object",
117 authorized => "boolean",
118 indexed => "boolean",
119 name => "scalar_as_object",
120 version => "scalar_as_object",
121 version_numified => "number",
122 }, @_ ) ); }
123  
124 6 ▶sub name { return( shift->_set_get_scalar_as_object( 'name', @_ ) ); }
Subroutine name: called CC=1 SCAR=0.0
Pod documented
125  
126 0 ▶sub object { return( shift->_set_get_scalar_as_object( 'object', @_ ) ); }
Subroutine object: not called CC=1 SCAR=6.9
Pod documented
127  
128 6 ▶sub path { return( shift->_set_get_scalar_as_object( 'path', @_ ) ); }
Subroutine path: called CC=1 SCAR=0.0
Pod documented
129  
130 6 ▶sub pod { return( shift->_set_get_scalar_as_object( 'pod', @_ ) ); }
Subroutine pod: called CC=1 SCAR=0.0
Pod documented
131  
132 6 ▶sub pod_lines { return( shift->_set_get_array_as_object( 'pod_lines', @_ ) ); }
Subroutine pod_lines: called CC=1 SCAR=0.0
Pod documented
133  
134 6 ▶sub release { return( shift->_set_get_scalar_or_object( 'release', 'Net::API::CPAN::Release', @_ ) ); }
Subroutine release: called CC=1 SCAR=0.0
Pod documented
135  
136 6 ▶sub sloc { return( shift->_set_get_number( 'sloc', @_ ) ); }
Subroutine sloc: called CC=1 SCAR=0.0
Pod documented
137  
138 6 ▶sub slop { return( shift->_set_get_number( 'slop', @_ ) ); }
Subroutine slop: called CC=1 SCAR=0.0
Pod documented
139  
140 6 ▶sub stat { return( shift->_set_get_class( 'stat', {
Subroutine stat: called CC=1 SCAR=0.0
Pod documented
141 gid => "integer",
142 mode => "integer",
143 mtime => "datetime",
144 size => "integer",
145 uid => "integer",
146 }, @_ ) ); }
147  
148 6 ▶sub status { return( shift->_set_get_scalar_as_object( 'status', @_ ) ); }
Subroutine status: called CC=1 SCAR=0.0
Pod documented
149  
150 4 ▶sub suggest { return( shift->_set_get_class( 'suggest', {
Subroutine suggest: called CC=1 SCAR=0.0
Pod documented
151 input => "array_as_object",
152 payload => "hash_as_object",
153 weight => "integer",
154 }, @_ ) ); }
155  
156 6 ▶sub version { return( shift->_set_get_version( { class => "Changes::Version", field => "version" }, @_ ) ); }
Subroutine version: called CC=1 SCAR=0.0
Pod documented
157  
158 6 ▶sub version_numified { return( shift->_set_get_number( 'version_numified', @_ ) ); }
Subroutine version_numified: called CC=1 SCAR=0.0
Pod documented
159  
160 4 1;
161 # NOTE: POD
162 __END__
« CPAN/Author.pm ↑ Summary CPAN/List/Web.pm »