File Coverage

lib/Net/API/CPAN/Contributor.pm
Criterion Covered Total %
statement 34 35 97.1
branch 5 10 50.0
condition n/a
subroutine 12 13 92.3
pod 6 6 100.0
total 57 64 89.0


line stmt bran cond sub pod time code
1             ##----------------------------------------------------------------------------
2             ## Meta CPAN API - ~/lib/Net/API/CPAN/Contributor.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::Contributor;
17             BEGIN
18             {
19 2     2   236992 use strict;
  2         14  
  2         64  
20 2     2   10 use warnings;
  2         6  
  2         61  
21 2     2   15 use parent qw( Net::API::CPAN::Generic );
  2         3  
  2         16  
22 2     2   121 use vars qw( $VERSION );
  2         4  
  2         95  
23 2     2   40 our $VERSION = 'v0.1.0';
24             };
25              
26 2     2   20 use strict;
  2         4  
  2         40  
27 2     2   11 use warnings;
  2         5  
  2         567  
28              
29             sub init
30             {
31 1     1 1 9596 my $self = shift( @_ );
32 1 50       75 $self->{distribution} = undef unless( CORE::exists( $self->{distribution} ) );
33 1         3 $self->{object} = 'contributor';
34 1 50       3 $self->{pauseid} = undef unless( CORE::exists( $self->{pauseid} ) );
35 1 50       4 $self->{release_author} = undef unless( CORE::exists( $self->{release_author} ) );
36 1 50       3 $self->{release_name} = undef unless( CORE::exists( $self->{release_name} ) );
37 1         3 $self->{_init_strict_use_sub} = 1;
38 1         1 $self->{_exception_class} = 'Net::API::CPAN::Exception';
39 1 50       6 $self->SUPER::init( @_ ) || return( $self->pass_error );
40 1         5 $self->{fields} = [qw( distribution pauseid release_author release_name )];
41 1         2 return( $self );
42             }
43              
44 1     1 1 2840 sub distribution { return( shift->_set_get_scalar_as_object( 'distribution', @_ ) ); }
45              
46 0     0 1 0 sub object { return( shift->_set_get_scalar_as_object( 'object', @_ ) ); }
47              
48 1     1 1 58960 sub pauseid { return( shift->_set_get_scalar_as_object( 'pauseid', @_ ) ); }
49              
50 1     1 1 1065 sub release_author { return( shift->_set_get_scalar_as_object( 'release_author', @_ ) ); }
51              
52 1     1 1 987 sub release_name { return( shift->_set_get_scalar_as_object( 'release_name', @_ ) ); }
53              
54             1;
55             # NOTE: POD
56             __END__
57              
58             =encoding utf-8
59              
60             =head1 NAME
61              
62             Net::API::CPAN::Contributor - Meta CPAN API Contributor Class
63              
64             =head1 SYNOPSIS
65              
66             use Net::API::CPAN::Contributor;
67             my $string = $obj->distribution;
68             my $str = $obj->object;
69             my $string = $obj->pauseid;
70             my $string = $obj->release_author;
71             my $string = $obj->release_name;
72              
73             =head1 VERSION
74              
75             v0.1.0
76              
77             =head1 DESCRIPTION
78              
79             This class serves to retrieve and manipulate contributors.
80              
81             It inherits from L<Net::API::CPAN::Generic>
82              
83             =head1 CONSTRUCTOR
84              
85             =head2 new
86              
87             Provided with an hash or hash reference of parameters, and this instantiates a new C<Net::API::CPAN::Contributor> object.
88              
89             The parameters that can be provided bear the same name and supports the same values as the methods below.
90              
91             =head1 METHODS
92              
93             =head2 distribution
94              
95             Sets or gets a string and returns a L<scalar object|Module::Generic::Scalar>, even if there is no value.
96              
97             =head2 object
98              
99             Returns the object type for this class, which is C<contributor>
100              
101             =head2 pauseid
102              
103             Sets or gets a string and returns a L<scalar object|Module::Generic::Scalar>, even if there is no value.
104              
105             =head2 release_author
106              
107             Sets or gets a string and returns a L<scalar object|Module::Generic::Scalar>, even if there is no value.
108              
109             =head2 release_name
110              
111             Sets or gets a string and returns a L<scalar object|Module::Generic::Scalar>, even if there is no value.
112              
113             =head1 AUTHOR
114              
115             Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
116              
117             =head1 SEE ALSO
118              
119             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>
120              
121             L<MetaCPAN::API>, L<MetaCPAN::Client>
122              
123             L<https://github.com/metacpan/metacpan-api/blob/master/docs/API-docs.md>
124              
125             =head1 COPYRIGHT & LICENSE
126              
127             Copyright(c) 2023 DEGUEST Pte. Ltd.
128              
129             All rights reserved
130              
131             This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
132              
133             =cut
134