CPAN::API::HOWTO(3perl)
πΈ NAME πΈ
okay so CPAN::API::HOWTO β it's literally a recipe book π for programming with CPAN.pm. like, a lil cookbook for when you wanna vibe with CPAN from inside your own Perl code. bestie, it's giving tutorial energy β¨
π RECIPES π
every single one of these recipes just assumes you already dropped
use CPAN
at the top of your program. no cap, that's the prerequisite. do that first or nothing below works π
π What distribution contains a particular module?
my $distribution = CPAN::Shell->expand(
"Module", "Data::UUID"
)->distribution()->pretty_id();
this hands you back a string shaped exactly like "AUTHORID/TARBALL". cute, right? π«Ά
and if you're the kind of person who needs the full path and filename to that distribution over on a CPAN mirror, then it's:
".../authors/id/A/AU/AUTHORID/TARBALL"
lowkey iconic file layout, iykyk
π¦ What modules does a particular distribution contain?
CPAN::Index->reload();
my @modules = CPAN::Shell->expand(
"Distribution", "JHI/Graph-0.83.tar.gz"
)->containsmods();
you can also refer to a distribution in the form A/AU/AUTHORID/TARBALL if that's more your vibe π
π SEE ALSO π
the main CPAN.pm documentation β go read it, it's the source of truth fr fr π
π LICENSE π
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See <http://www.perl.com/perl/misc/Artistic.html>
β AUTHOR β
David Cantrell
and that's the whole page, bestie π§ this was CPAN::API::HOWTO(3perl) from perl v5.44.0, dated 2026-10-17. stay slay, stay documented πβ¨π
π¦ where this page comes from
- arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND 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