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> πŸŽ€

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