| 1 | ##---------------------------------------------------------------------------- | ||||||||||
| 2 | ## Meta CPAN API - ~/lib/Net/API/CPAN/Rating.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::Rating; | ||||||||||
| 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=10 SCAR=24.9
Pod
documented
| |||||||||||
| 31 | 1 | my $self = shift( @_ ); | |||||||||
| 32 | 1 | ▶ | $self->{author} = undef unless( CORE::exists( $self->{author} ) ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 33 | 1 | ▶ | $self->{date} = undef unless( CORE::exists( $self->{date} ) ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 34 | 1 | ▶ | $self->{details} = undef unless( CORE::exists( $self->{details} ) ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 35 | 1 | ▶ | $self->{distribution} = undef unless( CORE::exists( $self->{distribution} ) ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 36 | 1 | ▶ | $self->{helpful} = [] unless( CORE::exists( $self->{helpful} ) ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 37 | 1 | $self->{object} = 'rating'; | |||||||||
| 38 | 1 | ▶ | $self->{rating} = undef unless( CORE::exists( $self->{rating} ) ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 39 | 1 | ▶ | $self->{release} = undef unless( CORE::exists( $self->{release} ) ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 40 | 1 | ▶ | $self->{user} = undef unless( CORE::exists( $self->{user} ) ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 41 | 1 | $self->{_init_strict_use_sub} = 1; | |||||||||
| 42 | 1 | $self->{_exception_class} = 'Net::API::CPAN::Exception'; | |||||||||
| 43 | 1 | ▶ | $self->SUPER::init( @_ ) || return( $self->pass_error ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 44 | 1 | $self->{fields} = [qw( | |||||||||
| 45 | author date details distribution helpful rating release user | ||||||||||
| 46 | )]; | ||||||||||
| 47 | 1 | return( $self ); | |||||||||
| 48 | } | ||||||||||
| 49 | |||||||||||
| 50 | 2 | ▶ | sub author { return( shift->_set_get_scalar_as_object( 'author', @_ ) ); } | ||||||||
|
Subroutine
author: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 51 | |||||||||||
| 52 | 2 | ▶ | sub date { return( shift->_set_get_datetime( 'date', @_ ) ); } | ||||||||
|
Subroutine
date: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 53 | |||||||||||
| 54 | 1 | ▶ | sub details { return( shift->_set_get_class( 'details', { | ||||||||
|
Subroutine
details: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 55 | description => { type => "scalar" }, | ||||||||||
| 56 | }, @_ ) ); } | ||||||||||
| 57 | |||||||||||
| 58 | 2 | ▶ | sub distribution { return( shift->_set_get_scalar_as_object( 'distribution', @_ ) ); } | ||||||||
|
Subroutine
distribution: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 59 | |||||||||||
| 60 | 1 | ▶ | sub helpful { return( shift->_set_get_class_array_object( 'helpful', { user => "scalar_as_object", value => "boolean" }, @_ ) ); } | ||||||||
|
Subroutine
helpful: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 61 | |||||||||||
| 62 | 0 | ▶ | sub object { return( shift->_set_get_scalar_as_object( 'object', @_ ) ); } | ||||||||
|
Subroutine
object: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 63 | |||||||||||
| 64 | 2 | ▶ | sub rating { return( shift->_set_get_number( 'rating', @_ ) ); } | ||||||||
|
Subroutine
rating: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 65 | |||||||||||
| 66 | 2 | ▶ | sub release { return( shift->_set_get_scalar_as_object( 'release', @_ ) ); } | ||||||||
|
Subroutine
release: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 67 | |||||||||||
| 68 | 2 | ▶ | sub user { return( shift->_set_get_scalar_as_object( 'user', @_ ) ); } | ||||||||
|
Subroutine
user: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 69 | |||||||||||
| 70 | 2 | 1; | |||||||||
| 71 | # NOTE: POD | ||||||||||
| 72 | __END__ | ||||||||||