NAME

Net::API::CPAN::Changes - Meta CPAN API Changes Class

SYNOPSIS

use Net::API::CPAN::Changes;
my $obj = Net::API::CPAN::Changes->new( {
  author => "MOMOTARO",
  authorized => \1,
  binary => \0,
  category => "changelog",
  content => "Revision history for Perl module Folklore::Japan\n\nv1.2.3 2023-07-29T09:12:10+0900\n    - Initial release\n",
  date => "2023-07-29T23:14:52",
  deprecated => \0
,
  directory => \0
,
  distribution => "Folklore-Japan",
  download_url => "https://cpan.metacpan.org/authors/id/M/MO/MOMOTARO/Folklore-Japan-v1.2.3.tar.gz",
  id => "Jp_IsS0oC00l_CoM3OveR",
  indexed => \0
,
  level => 0,
  maturity => "released",
  mime => "",
  module => [],
  name => "CHANGES",
  path => "CHANGES",
  pod => "",
  pod_lines => [],
  release => "Folklore-Japan-v1.2.3",
  sloc => 487,
  slop => 0,
  stat => {
    mode => 33188,
    mtime => 1690618397,
    size => 108,
  },
  status => "latest",
  version => "v1.2.3",
  version_numified => "1.002003",
} ) || die( Net::API::CPAN::Changes->error );

my $string = $obj->author;
my $bool = $obj->authorized;
my $bool = $obj->binary;
my $string = $obj->category;
my $string = $obj->content;
my $date = $obj->date;
my $bool = $obj->deprecated;
my $bool = $obj->directory;
my $num = $obj->dist_fav_count;
my $string = $obj->distribution;
my $uri = $obj->download_url;
my $string = $obj->id;
my $bool = $obj->indexed;
my $num = $obj->level;
my $string = $obj->maturity;
my $string = $obj->mime;
my $array = $obj->module;
foreach my $this ( @$array )
{
    my $scalar = $this->associated_pod;
    my $boolean = $this->authorized;
    my $boolean = $this->indexed;
    my $scalar = $this->name;
    my $scalar = $this->version;
    my $number = $this->version_numified;
}
my $string = $obj->name;
my $str = $obj->object;
my $string = $obj->path;
my $string = $obj->pod;
my $array = $obj->pod_lines;
my $string = $obj->release;
my $string = $obj->sloc;
my $string = $obj->slop;
my $this = $obj->stat;
my $integer = $obj->stat->gid;
my $integer = $obj->stat->mode;
my $datetime = $obj->stat->mtime;
my $integer = $obj->stat->size;
my $integer = $obj->stat->uid;
my $string = $obj->status;
my $vers = $obj->version;
my $num = $obj->version_numified;

VERSION

v0.1.0

DESCRIPTION

This class serves to retrieve and manipulate changes.

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::Changes 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.

authorized

$obj->authorized(1);
my $bool = $obj->authorized;

Sets or gets a boolean value, and returns a boolean object or undef if no value is set.

binary

$obj->binary(1);
my $bool = $obj->binary;

Sets or gets a boolean value, and returns a boolean object or undef if no value is set.

category

$obj->category( "changelog" );
my $string = $obj->category;

Sets or gets a string and returns a scalar object, even if there is no value.

content

$obj->content( "Revision history for Perl module Folklore::Japan\n\nv1.2.3 2023-07-29T09:12:10+0900\n    - Initial release\n" );
my $string = $obj->content;

Sets or gets a string and returns a scalar object, even if there is no value.

date

$obj->date( "2023-07-29T23:14:52" );
my $datetime_obj = $obj->date;

Sets or gets a datetime value, and returns a DateTime object that stringifies to the format that was provided with the string set (usally an ISO 8601 datetime format) or undef if no value is set.

deprecated

$obj->deprecated(1);
my $bool = $obj->deprecated;

Sets or gets a boolean value, and returns a boolean object or undef if no value is set.

directory

$obj->directory(1);
my $bool = $obj->directory;

Sets or gets a boolean value, and returns a boolean object or undef if no value is set.

dist_fav_count

Sets or gets an integer value, and returns a number object or undef if no value is set.

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.

download_url

$obj->download_url( "https://cpan.metacpan.org/authors/id/M/MO/MOMOTARO/Folklore-Japan-v1.2.3.tar.gz" );
my $uri = $obj->download_url;

Sets or gets an URI, and returns an URI object or undef if no value is set.

id

$obj->id( "Jp_IsS0oC00l_CoM3OveR" );
my $string = $obj->id;

Sets or gets a string and returns a scalar object, even if there is no value.

indexed

$obj->indexed(1);
my $bool = $obj->indexed;

Sets or gets a boolean value, and returns a boolean object or undef if no value is set.

level

$obj->level(0);
my $number = $obj->level;

Sets or gets an integer value, and returns a number object or undef if no value is set.

maturity

$obj->maturity( "released" );
my $string = $obj->maturity;

Sets or gets a string and returns a scalar object, even if there is no value.

mime

$obj->mime( "" );
my $string = $obj->mime;

Sets or gets a string and returns a scalar object, even if there is no value.

module

$obj->module( [] );
my $array = $obj->module;
foreach my $this ( @$array )
{
    my $scalar = $this->associated_pod;
    my $boolean = $this->authorized;
    my $boolean = $this->indexed;
    my $scalar = $this->name;
    my $scalar = $this->version;
    my $number = $this->version_numified;
}

Sets or gets an array of dynamic class objects with class name Net::API::CPAN::Changes::Module and having the folowing properties also accessible as methods, and returns an array object even if there is no value.

A Net::API::CPAN::Changes::Module object will be instantiated with each value from the array provided and replace said value.

  • associated_pod scalar_as_object

  • authorized boolean (boolean object)

  • indexed boolean (boolean object)

  • name scalar_as_object

  • version scalar_as_object

  • version_numified number

name

$obj->name( "CHANGES" );
my $string = $obj->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 changes

path

$obj->path( "CHANGES" );
my $string = $obj->path;

Sets or gets a string and returns a scalar object, even if there is no value.

pod

$obj->pod( "" );
my $string = $obj->pod;

Sets or gets a string and returns a scalar object, even if there is no value.

pod_lines

$obj->pod_lines( [] );
my $array = $obj->pod_lines;

Sets or gets an array of pod_lines and returns an array object, even if there is no value.

release

$obj->release( "Folklore-Japan-v1.2.3" );
my $string = $obj->release;

Sets or gets a string and returns a scalar object, even if there is no value.

sloc

$obj->sloc( 487 );
my $string = $obj->sloc;

Sets or gets a string and returns a scalar object, even if there is no value.

slop

$obj->slop( 0 );
my $string = $obj->slop;

Sets or gets a string and returns a scalar object, even if there is no value.

stat

$obj->stat( {
  mode => 33188,
  mtime => 1690618397,
  size => 108,
} );
my $this = $obj->stat;
my $integer = $obj->stat->gid;
$obj->stat->mode( 33188 );
my $integer = $obj->stat->mode;
$obj->stat->mtime( 1690618397 );
my $datetime = $obj->stat->mtime;
$obj->stat->size( 108 );
my $integer = $obj->stat->size;
my $integer = $obj->stat->uid;

Sets or gets a dynamic class object with class name Net::API::CPAN::Changes::Stat and having the folowing properties also accessible as methods, and returns an object from such class, or undef if no value was provided.

status

$obj->status( "latest" );
my $string = $obj->status;

Sets or gets a string and returns a scalar object, even if there is no value.

version

$obj->version( "v1.2.3" );
my $version = $obj->version;

Sets or gets a version value and returns a version object using Changes::Version.

version_numified

$obj->version_numified("1.002003");
my $number = $obj->version_numified;

Sets or gets a float value, and returns a number object or undef if no value is set.

API SAMPLE

{
   "author" : "MOMOTARO",
   "authorized" : true,
   "binary" : false,
   "category" : "changelog",
   "content" : "Revision history for Perl module Folklore::Japan\n\nv1.2.3 2023-07-29T09:12:10+0900\n    - Initial release\n",
   "date" : "2023-07-29T23:14:52",
   "deprecated" : false,
   "directory" : false,
   "distribution" : "Folklore-Japan",
   "download_url" : "https://cpan.metacpan.org/authors/id/M/MO/MOMOTARO/Folklore-Japan-v1.2.3.tar.gz",
   "id" : "Jp_IsS0oC00l_CoM3OveR",
   "indexed" : false,
   "level" : 0,
   "maturity" : "released",
   "mime" : "",
   "module" : [],
   "name" : "CHANGES",
   "path" : "CHANGES",
   "pod" : "",
   "pod_lines" : [],
   "release" : "Folklore-Japan-v1.2.3",
   "sloc" : 487,
   "slop" : 0,
   "stat" : {
      "mode" : 33188,
      "mtime" : 1690618397,
      "size" : 108
   },
   "status" : "latest",
   "version" : "v1.2.3",
   "version_numified" : 1.002003
}

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.