NAME

Net::API::CPAN::Cover - Meta CPAN API Cover Class

SYNOPSIS

use Net::API::CPAN::Cover;
my $obj = Net::API::CPAN::Cover->new( {
  criteria => {
    branch => "54.68",
    condition => "57.56",
    statement => "78.14",
    subroutine => "80.00",
    total => "67.65",
  },
  distribution => "Folklore-Japan",
  release => "Folklore-Japan-v1.2.3",
  url => "http://cpancover.com/latest/Folklore-Japan-v1.2.3/index.html",
  version => "v1.2.3",
} ) || die( Net::API::CPAN::Cover->error );

my $this = $obj->criteria;
my $float = $obj->criteria->branch;
my $float = $obj->criteria->condition;
my $float = $obj->criteria->statement;
my $float = $obj->criteria->subroutine;
my $float = $obj->criteria->total;
my $string = $obj->distribution;
my $str = $obj->object;
my $string = $obj->release;
my $uri = $obj->url;
my $vers = $obj->version;

VERSION

v0.1.0

DESCRIPTION

This class serves to retrieve and manipulate covers.

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::Cover object.

The parameters that can be provided bear the same name and supports the same values as the methods below.

METHODS

criteria

$obj->criteria( {
  branch => "54.68",
  condition => "57.56",
  statement => "78.14",
  subroutine => "80.00",
  total => "67.65",
} );
my $this = $obj->criteria;
$obj->criteria->branch( "54.68" );
my $float = $obj->criteria->branch;
$obj->criteria->condition( "57.56" );
my $float = $obj->criteria->condition;
$obj->criteria->statement( "78.14" );
my $float = $obj->criteria->statement;
$obj->criteria->subroutine( "80.00" );
my $float = $obj->criteria->subroutine;
$obj->criteria->total( "67.65" );
my $float = $obj->criteria->total;

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

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.

object

Returns the object type for this class, which is cover

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.

url

$obj->url( "http://cpancover.com/latest/Folklore-Japan-v1.2.3/index.html" );
my $uri = $obj->url;

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

version

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

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

API SAMPLE

{
   "criteria" : {
      "branch" : "54.68",
      "total" : "67.65",
      "condition" : "57.56",
      "subroutine" : "80.00",
      "statement" : "78.14"
   },
   "version" : "v1.2.3",
   "distribution" : "Folklore-Japan",
   "url" : "http://cpancover.com/latest/Folklore-Japan-v1.2.3/index.html",
   "release" : "Folklore-Japan-v1.2.3"
}

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.