MetaCP...Request(3pm)
π MetaCPAN::Client::Request β the lil' request-making bestie π
okay so this is the manual page for MetaCPAN::Client::Request(3pm) from the User Contributed Perl Documentation, and she is literally the object that makes requests to MetaCPAN for you. she's the backstage queen, the one doing the actual talking to the API while you sit there looking cute. no cap.
β¨ VERSION β¨
version 2.044000 β that's the version, bestie, write it down π
π ATTRIBUTES π
these are the lil' knobs and dials she comes with, k? all very customizable, all very slay.
π
domain
$mcpan = MetaCPAN::Client->new( domain => 'localhost' );
so this one? it's literally what domain to use for all requests. she asks, you answer, she goes there. simple as that. π
Default: https://fastapi.metacpan.org.
π¦ base_url
my $mcpan = MetaCPAN::Client->new(
base_url => 'https://localhost:9999/v2',
);
okay so listen β instead of overriding the base_url, you should override the domain. like, that's the move. the base_url will be set appropriately automatically, she handles it herself, she's very capable. don't fight her on this. π
Default: https://$domain.
π debug
debug-mode, for when you want more detailed error messages. she's not being vague on purpose, she just needs you to ask nicely. β¨
πΈ METHODS πΈ
BUILDARGS
yeah that's it. that's the whole entry. she's there, she's built, she's args. iconic behaviour, honestly. π
π fetch
my $result = $mcpan->fetch('/release/Moose');
# with parameters
my $more = $mcpan->fetch(
'/release/Moose',
{ param => 'value' },
);
so what she does is: fetches a path from MetaCPAN β and yes she'll do it post or get, whichever, she's flexible like that β and then returns the decoded result. you give her a path, she gives you the goods. that's the whole deal, fr fr. π«Ά
π ssearch
this one calls an Elasticsearch query and hands you back a MetaCPAN::Client::Scroll scroller object. so like, she's not just fetching single things, she's out here running full queries and returning you a whole scrolling situation. main character energy, truly. β
π AUTHORS π
the legends who made this happen:
- Sawyer X
<xsawyerx@cpan.org>π - Mickey Nasriachi
<mickey@cpan.org>π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2016 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. (yes bestie, free as in go wild, go crazy, it's yours π)
and that's the whole page, mwah π huge shoutout to perl v5.40.1 and to the 2026-07-05 date stamp that keeps this lil' doc all official and timestamped β couldn't have done it without ya, periodt. πΈπ
β¨
π¦ where this page comes from
- ubuntu stonking: libmetacpan-client-perl 2.044000-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms