CPAN::API::HOWTO(3pm)

✨ NAME ✨ β€” CPAN::API::HOWTO(3pm)

Okay so this is CPAN::API::HOWTO(3pm), from the Perl Programmers Reference Guide, and it's literally the manual page for CPAN::API::HOWTO - a recipe book for programming with CPAN.pm. It's giving "cookbook but make it CPAN," and ngl, I'm obsessed. πŸŽ€πŸ’–

πŸ“ RECIPES πŸ“

All of these recipes assume that you have put use CPAN at the top of your program. No cap, that's the setup vibe check. 🫢

πŸ’– What distribution contains a particular module? πŸ’–

Ask and you shall receive, bestie:

my $distribution = CPAN::Shell->expand(
    "Module", "Data::UUID"
)->distribution()->pretty_id();

This returns a string of the form AUTHORID/TARBALL. If you want the full path and filename to this distribution on a CPAN mirror, then it is .../authors/id/A/AU/AUTHORID/TARBALL. Slay. πŸ¦‹

🌸 What modules does a particular distribution contain? 🌸

Not me peeking inside a distribution like it's a mystery box:

CPAN::Index->reload();
my @modules = CPAN::Shell->expand(
    "Distribution", "JHI/Graph-0.83.tar.gz"
)->containsmods();

You may also refer to a distribution in the form A/AU/AUTHORID/TARBALL. Iconic. πŸ’…

πŸ¦‹ SEE ALSO πŸ¦‹

The main CPAN.pm documentation. Go read it, bestie β€” iykyk. πŸ’œ

πŸ“œ 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>.

No cap, that's the whole license vibe. 🌈

πŸ‘‘ AUTHOR πŸ‘‘

David Cantrell. Main character energy, honestly. πŸŽ€


Cute sign-off time: this page is from perl v5.42.3, dated 2026-11-03, and it's the CPAN::API::HOWTO(3pm) page. Bye bestie, go write some recipes! πŸ’–βœ¨

πŸ“¦ where this page comes from