CPAN::API::HOWTO - perldoc.perl.org

perldoc.perl.org

# Manual:

- Overview
- Tutorials
- FAQs
- History / Changes
- Licence

## Reference:

- Language
- Functions
- Operators
- Special variables
- Pragmas
- Core modules
- Utilities
- Internals
- Platform specific

## Links:

- CPAN
- Perl.org
- Perl.com
- Perl Buzz
- Perl 5 Wiki
- Perl Jobs
- Perl Mongers
- Perl Monks
- Planet Perl
- Use Perl

## Contact:

- Site maintained by
  Jon Allen (JJ)
- Last updated on
  23 December 2007
- See the project page for more details

Show navigation
-- Perl 5.10.0 documentation --
Show toolbar
CPAN::API::HOWTO

- NAME
- RECIPES
  - What distribution contains a particular module?
  - What modules does a particular distribution contain?
- SEE ALSO
- LICENSE
- AUTHOR

# NAME

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

# RECIPES

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

## 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?

        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

the main CPAN.pm documentation

# 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

# Search:

## Labels:

Add this page