| 1 | ##---------------------------------------------------------------------------- | ||||||||||
| 2 | ## Meta CPAN API - ~/lib/Net/API/CPAN/Release/Recent.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::Release::Recent; | ||||||||||
| 17 | BEGIN | ||||||||||
| 18 | { | ||||||||||
| 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'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.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 | { | ||||||||||
| 31 | 1 | ▶ | my $self = shift( @_ ); | ||||||||
|
Subroutine
init: called CC=8 SCAR=22.1
Pod
documented
| |||||||||||
| 32 | 1 | ▶ | $self->{abstract} = undef unless( CORE::exists( $self->{abstract} ) ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 33 | 1 | ▶ | $self->{author} = undef unless( CORE::exists( $self->{author} ) ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 34 | 1 | ▶ | $self->{date} = undef unless( CORE::exists( $self->{date} ) ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 35 | 1 | ▶ | $self->{distribution} = undef unless( CORE::exists( $self->{distribution} ) ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 36 | 1 | ▶ | $self->{name} = undef unless( CORE::exists( $self->{name} ) ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 37 | 1 | $self->{object} = 'release_recent'; | |||||||||
| 38 | 1 | ▶ | $self->{status} = undef unless( CORE::exists( $self->{status} ) ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 39 | 1 | $self->{_init_strict_use_sub} = 1; | |||||||||
| 40 | 1 | $self->{_exception_class} = 'Net::API::CPAN::Exception'; | |||||||||
| 41 | 1 | ▶ | $self->SUPER::init( @_ ) || return( $self->pass_error ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 42 | 1 | $self->{fields} = [qw( abstract author date distribution name status )]; | |||||||||
| 43 | 1 | return( $self ); | |||||||||
| 44 | } | ||||||||||
| 45 | |||||||||||
| 46 | 2 | ▶ | sub abstract { return( shift->_set_get_scalar_as_object( 'abstract', @_ ) ); } | ||||||||
|
Subroutine
abstract: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 47 | |||||||||||
| 48 | 2 | ▶ | sub author { return( shift->_set_get_scalar_as_object( 'author', @_ ) ); } | ||||||||
|
Subroutine
author: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 49 | |||||||||||
| 50 | 2 | ▶ | sub date { return( shift->_set_get_datetime( 'date', @_ ) ); } | ||||||||
|
Subroutine
date: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 51 | |||||||||||
| 52 | 2 | ▶ | sub distribution { return( shift->_set_get_scalar_as_object( 'distribution', @_ ) ); } | ||||||||
|
Subroutine
distribution: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 53 | |||||||||||
| 54 | 2 | ▶ | sub name { return( shift->_set_get_scalar_as_object( 'name', @_ ) ); } | ||||||||
|
Subroutine
name: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 55 | |||||||||||
| 56 | 0 | ▶ | sub object { return( shift->_set_get_scalar_as_object( 'object', @_ ) ); } | ||||||||
|
Subroutine
object: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 57 | |||||||||||
| 58 | 2 | ▶ | sub status { return( shift->_set_get_scalar_as_object( 'status', @_ ) ); } | ||||||||
|
Subroutine
status: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 59 | |||||||||||
| 60 | 2 | 1; | |||||||||
| 61 | # NOTE: POD | ||||||||||
| 62 | __END__ | ||||||||||
| 63 | |||||||||||
| 64 | =encoding utf-8 | ||||||||||
| 65 | |||||||||||
| 66 | =head1 NAME | ||||||||||
| 67 | |||||||||||
| 68 | Net::API::CPAN::Release::Recent - Meta CPAN API Release::Recent Class | ||||||||||
| 69 | |||||||||||
| 70 | =head1 SYNOPSIS | ||||||||||
| 71 | |||||||||||
| 72 | use Net::API::CPAN::Release::Recent; | ||||||||||
| 73 | my $obj = Net::API::CPAN::Release::Recent->new( { | ||||||||||
| 74 | abstract => "Japan Folklore Object Class", | ||||||||||
| 75 | author => "MOMOTARO", | ||||||||||
| 76 | date => "2023-07-29T05:10:12", | ||||||||||
| 77 | distribution => "Folklore-Japan", | ||||||||||
| 78 | name => "Folklore-Japan-v1.2.3", | ||||||||||
| 79 | status => "latest", | ||||||||||
| 80 | } ) || die( Net::API::CPAN::Release::Recent->error ); | ||||||||||
| 81 | |||||||||||
| 82 | my $string = $obj->abstract; | ||||||||||
| 83 | my $string = $obj->author; | ||||||||||
| 84 | my $date = $obj->date; | ||||||||||
| 85 | my $string = $obj->distribution; | ||||||||||
| 86 | my $string = $obj->name; | ||||||||||
| 87 | my $str = $obj->object; | ||||||||||
| 88 | my $string = $obj->status; | ||||||||||
| 89 | |||||||||||
| 90 | =head1 VERSION | ||||||||||
| 91 | |||||||||||
| 92 | v0.1.0 | ||||||||||
| 93 | |||||||||||
| 94 | =head1 DESCRIPTION | ||||||||||
| 95 | |||||||||||
| 96 | This class serve to retrieve and manipulate recent releases. | ||||||||||
| 97 | |||||||||||
| 98 | It inherits from L<Net::API::CPAN::Generic> | ||||||||||
| 99 | |||||||||||
| 100 | =head1 CONSTRUCTOR | ||||||||||
| 101 | |||||||||||
| 102 | =head2 new | ||||||||||
| 103 | |||||||||||
| 104 | Provided with an hash or hash reference of parameters, and this instantiates a new C<Net::API::CPAN::Release::Recent> object. | ||||||||||
| 105 | |||||||||||
| 106 | The parameters that can be provided bear the same name and supports the same values as the methods below. | ||||||||||
| 107 | |||||||||||
| 108 | =head1 METHODS | ||||||||||
| 109 | |||||||||||
| 110 | =head2 abstract | ||||||||||
| 111 | |||||||||||
| 112 | $obj->abstract( "Japan Folklore Object Class" ); | ||||||||||
| 113 | my $string = $obj->abstract; | ||||||||||
| 114 | |||||||||||
| 115 | Sets or gets a string and returns a L<scalar object|Module::Generic::Scalar>, even if there is no value. | ||||||||||
| 116 | |||||||||||
| 117 | =head2 author | ||||||||||
| 118 | |||||||||||
| 119 | $obj->author( "MOMOTARO" ); | ||||||||||
| 120 | my $string = $obj->author; | ||||||||||
| 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 date | ||||||||||
| 125 | |||||||||||
| 126 | $obj->date( "2023-07-29T05:10:12" ); | ||||||||||
| 127 | my $datetime_obj = $obj->date; | ||||||||||
| 128 | |||||||||||
| 129 | 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. | ||||||||||
| 130 | |||||||||||
| 131 | =head2 distribution | ||||||||||
| 132 | |||||||||||
| 133 | $obj->distribution( "Folklore-Japan" ); | ||||||||||
| 134 | my $string = $obj->distribution; | ||||||||||
| 135 | |||||||||||
| 136 | Sets or gets a string and returns a L<scalar object|Module::Generic::Scalar>, even if there is no value. | ||||||||||
| 137 | |||||||||||
| 138 | =head2 name | ||||||||||
| 139 | |||||||||||
| 140 | $obj->name( "Folklore-Japan-v1.2.3" ); | ||||||||||
| 141 | my $string = $obj->name; | ||||||||||
| 142 | |||||||||||
| 143 | Sets or gets a string and returns a L<scalar object|Module::Generic::Scalar>, even if there is no value. | ||||||||||
| 144 | |||||||||||
| 145 | =head2 object | ||||||||||
| 146 | |||||||||||
| 147 | Returns the object type for this class, which is C<release_recent> | ||||||||||
| 148 | |||||||||||
| 149 | =head2 status | ||||||||||
| 150 | |||||||||||
| 151 | $obj->status( "latest" ); | ||||||||||
| 152 | my $string = $obj->status; | ||||||||||
| 153 | |||||||||||
| 154 | Sets or gets a string and returns a L<scalar object|Module::Generic::Scalar>, even if there is no value. | ||||||||||
| 155 | |||||||||||
| 156 | =head1 API SAMPLE | ||||||||||
| 157 | |||||||||||
| 158 | { | ||||||||||
| 159 | "abstract" : "Japan Folklore Object Class", | ||||||||||
| 160 | "author" : "MOMOTARO", | ||||||||||
| 161 | "date" : "2023-07-29T05:10:12", | ||||||||||
| 162 | "distribution" : "Folklore-Japan", | ||||||||||
| 163 | "name" : "Folklore-Japan-v1.2.3", | ||||||||||
| 164 | "status" : "latest" | ||||||||||
| 165 | } | ||||||||||
| 166 | |||||||||||
| 167 | =head1 AUTHOR | ||||||||||
| 168 | |||||||||||
| 169 | Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> | ||||||||||
| 170 | |||||||||||
| 171 | =head1 SEE ALSO | ||||||||||
| 172 | |||||||||||
| 173 | 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> | ||||||||||
| 174 | |||||||||||
| 175 | L<MetaCPAN::API>, L<MetaCPAN::Client> | ||||||||||
| 176 | |||||||||||
| 177 | L<https://github.com/metacpan/metacpan-api/blob/master/docs/API-docs.md> | ||||||||||
| 178 | |||||||||||
| 179 | =head1 COPYRIGHT & LICENSE | ||||||||||
| 180 | |||||||||||
| 181 | Copyright(c) 2023 DEGUEST Pte. Ltd. | ||||||||||
| 182 | |||||||||||
| 183 | All rights reserved | ||||||||||
| 184 | |||||||||||
| 185 | This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. | ||||||||||
| 186 | |||||||||||
| 187 | =cut | ||||||||||
| 188 | |||||||||||