CPAN::API::HOWTO(3pm) Perl Programmers Reference Guide CPAN::API::HOWTO(3pm)

# [NAME](#NAME)

CPAN::API::HOWTO - a recipe book for programming with CPAN.pm

# [RECIPES](#RECIPES)

All of these recipes assume that you have put "use CPAN" at the top of your program.

## [What distribution contains a particular module?](#What_distribution_contains_a_particular_module?)

```
    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".

## [What modules does a particular distribution contain?](#What_modules_does_a_particular_distribution_contain?)

```
    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.

# [SEE ALSO](#SEE_ALSO)

the main CPAN.pm documentation

# [LICENSE](#LICENSE)

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

See &lt;http://www.perl.com/perl/misc/Artistic.html&gt;

# [AUTHOR](#AUTHOR)

David Cantrell

2026-10-21 perl v5.44.0

---

Document: CPAN::API::HOWTO(3pm) from perl 5.44.0-r2 (Chainguard OS)
Source: https://github.com/Perl/perl5.git
