GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  METACPAN::CLIENT::REQUEST (3)

.ds Aq ’

NAME

MetaCPAN::Client::Request - Object used for making requests to MetaCPAN

CONTENTS

VERSION

version 1.008001

ATTRIBUTES

    domain



    $mcpan = MetaCPAN::Client->new( domain => localhost );



What domain to use for all requests.

Default: <B>api.metacpan.orgB>.

    version



    $mcpan = MetaCPAN::Client->new( version => v0 );



What version of MetaCPAN should be used?

Default: <B>v0B>.

    base_url



    my $mcpan = MetaCPAN::Client->new(
        base_url => http://localhost:9999/v2,
    );



Instead of overriding the base_url, you should override the domain and version. The base_url will be set appropriately automatically.

Default: http://$domain/$version.

    ua



    my $mcpan = MetaCPAN::Client->new( ua => HTTP::Tiny->new(...) );



The user agent object for running requests.

It must provide an interface that matches HTTP::Tiny. Explicitly:
o Implement post()

Method post must be available that accepts a request URL and a hashref of options.

o Implement get()

Method get must be available that accepts a request URL.

o Return result hashref

Must return a result hashref which has key success and key content.

Default: HTTP::Tiny,

    ua_args



    my $mcpan = MetaCPAN::Client->new(
        ua_args => [ agent => MyAgent ],
    );



Arguments sent to the user agent.

Default: user agent string: <B>MetaCPAN::Client/$versionB>.

METHODS

    fetch



    my $result = $mcpan->fetch(/release/Moose);

    # with parameters
    my $more = $mcpan->fetch(
        /release/Moose,
        { param => value },
    );



Fetches a path from MetaCPAN (post or get), and returns the decoded result.

    ssearch

Calls an Elastic Search query (using Search::Elasticsearch and returns an Search::Elasticsearch::Scroll scroller object.

AUTHORS

o Sawyer X <xsawyerx@cpan.org>
o Mickey Nasriachi <mickey@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 by Sawyer X.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 METACPAN::CLIENT::REQUEST (3) 2015-01-01

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.