CPAN/Mirror.pm

filter: Statementstmt 98.6% 71 / 72 Branchbran 50.0% 23 / 46 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 96.7% 30 / 31 Podpod 100% 24 / 24 totaltotal 85.5% 148 / 173 CC 24 SCAR 29.2
CC
24
Cov
80%
init
40.6
object
2.0
BEGIN
1.0
CRAP 18.6
« CPAN/Distribution.pm ↑ Summary CPAN/Author.pm »
1 ##----------------------------------------------------------------------------
2 ## Meta CPAN API - ~/lib/Net/API/CPAN/Mirror.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::Mirror;
17 BEGIN
18 3 ▶{
Subroutine BEGIN: called CC=1 SCAR=0.0
19 3 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
20 3 ▶ use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
21 3 ▶ use parent qw( Net::API::CPAN::Generic );
Subroutine BEGIN: called CC=1 SCAR=0.0
22 3 ▶ use vars qw( $VERSION );
Subroutine BEGIN: called CC=1 SCAR=0.0
23 3 our $VERSION = 'v0.1.0';
24 };
25  
26 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
27 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
28  
29 sub init
30 2 ▶{
Subroutine init: called CC=24 SCAR=37.0
Pod documented
31 2 my $self = shift( @_ );
32 2 ▶ $self->{A_or_CNAME} = undef unless( CORE::exists( $self->{A_or_CNAME} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"A_or_CNAME"} 2 0 2
33 2 ▶ $self->{aka_name} = undef unless( CORE::exists( $self->{aka_name} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"aka_name"} 2 0 2
34 2 ▶ $self->{ccode} = undef unless( CORE::exists( $self->{ccode} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"ccode"} 2 0 2
35 2 ▶ $self->{city} = undef unless( CORE::exists( $self->{city} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"city"} 2 0 2
36 2 ▶ $self->{contact} = [] unless( CORE::exists( $self->{contact} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"contact"} 2 0 2
37 2 ▶ $self->{continent} = undef unless( CORE::exists( $self->{continent} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"continent"} 2 0 2
38 2 ▶ $self->{country} = undef unless( CORE::exists( $self->{country} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"country"} 2 0 2
39 2 ▶ $self->{distance} = undef unless( CORE::exists( $self->{distance} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"distance"} 2 0 2
40 2 ▶ $self->{dnsrr} = undef unless( CORE::exists( $self->{dnsrr} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"dnsrr"} 2 0 2
41 2 ▶ $self->{freq} = undef unless( CORE::exists( $self->{freq} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"freq"} 2 0 2
42 2 ▶ $self->{ftp} = undef unless( CORE::exists( $self->{ftp} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"ftp"} 2 0 2
43 2 ▶ $self->{http} = undef unless( CORE::exists( $self->{http} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"http"} 2 0 2
44 2 ▶ $self->{inceptdate} = undef unless( CORE::exists( $self->{inceptdate} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"inceptdate"} 2 0 2
45 2 ▶ $self->{location} = [] unless( CORE::exists( $self->{location} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"location"} 2 0 2
46 2 ▶ $self->{name} = undef unless( CORE::exists( $self->{name} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"name"} 2 0 2
47 2 ▶ $self->{note} = undef unless( CORE::exists( $self->{note} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"note"} 2 0 2
48 2 $self->{object} = 'mirror';
49 2 ▶ $self->{org} = undef unless( CORE::exists( $self->{org} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"org"} 2 0 2
50 2 ▶ $self->{region} = undef unless( CORE::exists( $self->{region} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"region"} 2 0 2
51 2 ▶ $self->{reitredate} = undef unless( CORE::exists( $self->{reitredate} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"reitredate"} 2 0 2
52 2 ▶ $self->{rsync} = undef unless( CORE::exists( $self->{rsync} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"rsync"} 2 0 2
53 2 ▶ $self->{src} = undef unless( CORE::exists( $self->{src} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"src"} 2 0 2
54 2 ▶ $self->{tz} = undef unless( CORE::exists( $self->{tz} ) );
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"tz"} 2 0 2
55 2 $self->{_init_strict_use_sub} = 1;
56 2 $self->{_exception_class} = 'Net::API::CPAN::Exception';
57 2 ▶ $self->SUPER::init( @_ ) || return( $self->pass_error );
Branch: 1 branch
BranchTrueFalseTotal
$self->SUPER::init(@_) or return $self->pass_error 2 0 2
58 2 $self->{fields} = [qw(
59 A_or_CNAME aka_name ccode city contact continent country distance dnsrr freq ftp
60 http inceptdate location name note org region reitredate rsync src tz
61 )];
62 2 return( $self );
63 }
64  
65 1 ▶sub A_or_CNAME { return( shift->_set_get_scalar_as_object( 'A_or_CNAME', @_ ) ); }
Subroutine A_or_CNAME: called CC=1 SCAR=0.0
Pod documented
66  
67 1 ▶sub aka_name { return( shift->_set_get_scalar_as_object( 'aka_name', @_ ) ); }
Subroutine aka_name: called CC=1 SCAR=0.0
Pod documented
68  
69 3 ▶sub ccode { return( shift->_set_get_scalar_as_object( 'ccode', @_ ) ); }
Subroutine ccode: called CC=1 SCAR=0.0
Pod documented
70  
71 3 ▶sub city { return( shift->_set_get_scalar_as_object( 'city', @_ ) ); }
Subroutine city: called CC=1 SCAR=0.0
Pod documented
72  
73 3 ▶sub contact { return( shift->_set_get_class_array_object( 'contact', {
Subroutine contact: called CC=1 SCAR=0.0
Pod documented
74 contact_site => "scalar_as_object",
75 contact_user => "scalar_as_object",
76 }, @_ ) ); }
77  
78 3 ▶sub continent { return( shift->_set_get_scalar_as_object( 'continent', @_ ) ); }
Subroutine continent: called CC=1 SCAR=0.0
Pod documented
79  
80 3 ▶sub country { return( shift->_set_get_scalar_as_object( 'country', @_ ) ); }
Subroutine country: called CC=1 SCAR=0.0
Pod documented
81  
82 3 ▶sub distance { return( shift->_set_get_scalar_as_object( 'distance', @_ ) ); }
Subroutine distance: called CC=1 SCAR=0.0
Pod documented
83  
84 3 ▶sub dnsrr { return( shift->_set_get_scalar_as_object( 'dnsrr', @_ ) ); }
Subroutine dnsrr: called CC=1 SCAR=0.0
Pod documented
85  
86 3 ▶sub freq { return( shift->_set_get_scalar_as_object( 'freq', @_ ) ); }
Subroutine freq: called CC=1 SCAR=0.0
Pod documented
87  
88 1 ▶sub ftp { return( shift->_set_get_uri( 'ftp', @_ ) ); }
Subroutine ftp: called CC=1 SCAR=0.0
Pod documented
89  
90 3 ▶sub http { return( shift->_set_get_uri( 'http', @_ ) ); }
Subroutine http: called CC=1 SCAR=0.0
Pod documented
91  
92 3 ▶sub inceptdate { return( shift->_set_get_datetime( 'inceptdate', @_ ) ); }
Subroutine inceptdate: called CC=1 SCAR=0.0
Pod documented
93  
94 3 ▶sub location { return( shift->_set_get_array_as_object( 'location', @_ ) ); }
Subroutine location: called CC=1 SCAR=0.0
Pod documented
95  
96 3 ▶sub name { return( shift->_set_get_scalar_as_object( 'name', @_ ) ); }
Subroutine name: called CC=1 SCAR=0.0
Pod documented
97  
98 1 ▶sub note { return( shift->_set_get_scalar_as_object( 'note', @_ ) ); }
Subroutine note: called CC=1 SCAR=0.0
Pod documented
99  
100 0 ▶sub object { return( shift->_set_get_scalar_as_object( 'object', @_ ) ); }
Subroutine object: not called CC=1 SCAR=6.9
Pod documented
101  
102 3 ▶sub org { return( shift->_set_get_scalar_as_object( 'org', @_ ) ); }
Subroutine org: called CC=1 SCAR=0.0
Pod documented
103  
104 1 ▶sub region { return( shift->_set_get_scalar_as_object( 'region', @_ ) ); }
Subroutine region: called CC=1 SCAR=0.0
Pod documented
105  
106 1 ▶sub reitredate { return( shift->_set_get_datetime( 'reitredate', @_ ) ); }
Subroutine reitredate: called CC=1 SCAR=0.0
Pod documented
107  
108 1 ▶sub rsync { return( shift->_set_get_uri( 'rsync', @_ ) ); }
Subroutine rsync: called CC=1 SCAR=0.0
Pod documented
109  
110 3 ▶sub src { return( shift->_set_get_uri( 'src', @_ ) ); }
Subroutine src: called CC=1 SCAR=0.0
Pod documented
111  
112 3 ▶sub tz { return( shift->_set_get_scalar_as_object( 'tz', @_ ) ); }
Subroutine tz: called CC=1 SCAR=0.0
Pod documented
113  
114 3 1;
115 # NOTE: POD
116 __END__
« CPAN/Distribution.pm ↑ Summary CPAN/Author.pm »