NAME
Net::API::CPAN::Package - Meta CPAN API Package Class
SYNOPSIS
use Net::API::CPAN::Package;
my $obj = Net::API::CPAN::Package->new( {
author => "MOMOTARO",
dist_version => "v1.2.3",
distribution => "Folklore-Japan",
file => "M/MO/MOMOTARO/Folklore-Japan-v1.2.3.tar.gz",
module_name => "Folklore::Japan",
version => "1.002003",
} ) || die( Net::API::CPAN::Package->error );
my $string = $obj->author;
my $vers = $obj->dist_version;
my $string = $obj->distribution;
my $string = $obj->file;
my $string = $obj->module_name;
my $str = $obj->object;
my $num = $obj->version;
VERSION
v0.1.0
DESCRIPTION
This class serves to retrieve and manipulate packages.
It inherits from Net::API::CPAN::Generic
CONSTRUCTOR
new
Provided with an hash or hash reference of parameters, and this instantiates a new Net::API::CPAN::Package
object.
The parameters that can be provided bear the same name and supports the same values as the methods below.
METHODS
author
$obj->author( "MOMOTARO" );
my $string = $obj->author;
Sets or gets a string and returns a scalar object, even if there is no value.
dist_version
$obj->dist_version( "v1.2.3" );
my $version = $obj->dist_version;
Sets or gets a version value and returns a version object using Changes::Version.
distribution
$obj->distribution( "Folklore-Japan" );
my $string = $obj->distribution;
Sets or gets a string and returns a scalar object, even if there is no value.
file
$obj->file( "M/MO/MOMOTARO/Folklore-Japan-v1.2.3.tar.gz" );
my $string = $obj->file;
Sets or gets a string and returns a scalar object, even if there is no value.
module_name
$obj->module_name( "Folklore::Japan" );
my $string = $obj->module_name;
Sets or gets a string and returns a scalar object, even if there is no value.
object
Returns the object type for this class, which is package
version
$obj->version("1.002003");
my $number = $obj->version;
Sets or gets a float value, and returns a number object or undef
if no value is set.
Please note that this represents the numified version of the module version number. In other object classes, the property version_numified
is used instead. For the version object of the module, see "dist_version"
API SAMPLE
{
"distribution" : "Folklore-Japan",
"author" : "MOMOTARO",
"version" : "1.002003",
"dist_version" : "v1.2.3",
"file" : "M/MO/MOMOTARO/Folklore-Japan-v1.2.3.tar.gz",
"module_name" : "Folklore::Japan"
}
AUTHOR
Jacques Deguest <jack@deguest.jp>
SEE ALSO
Net::API::CPAN, Net::API::CPAN::Activity, Net::API::CPAN::Author, Net::API::CPAN::Changes, Net::API::CPAN::Changes::Release, Net::API::CPAN::Contributor, Net::API::CPAN::Cover, Net::API::CPAN::Diff, Net::API::CPAN::Distribution, Net::API::CPAN::DownloadUrl, Net::API::CPAN::Favorite, Net::API::CPAN::File, Net::API::CPAN::Module, Net::API::CPAN::Package, Net::API::CPAN::Permission, Net::API::CPAN::Rating, Net::API::CPAN::Release
MetaCPAN::API, MetaCPAN::Client
https://github.com/metacpan/metacpan-api/blob/master/docs/API-docs.md
COPYRIGHT & LICENSE
Copyright(c) 2023 DEGUEST Pte. Ltd.
All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.