Commit | Line | Data |
---|---|---|
547d3dfd SP |
1 | =head1 NAME |
2 | ||
3 | CPAN::API::HOWTO - a recipe book for programming with CPAN.pm | |
4 | ||
5 | =head1 RECIPES | |
6 | ||
7 | All of these recipes assume that you have put "use CPAN" at the top of | |
8 | your program. | |
9 | ||
10 | =head2 What distribution contains a particular module? | |
11 | ||
12 | my $distribution = CPAN::Shell->expand( | |
13 | "Module", "Data::UUID" | |
14 | )->distribution()->pretty_id(); | |
15 | ||
16 | This returns a string of the form "AUTHORID/TARBALL". If you want the | |
17 | full path and filename to this distribution on a CPAN mirror, then it is | |
18 | C<.../authors/id/A/AU/AUTHORID/TARBALL>. | |
19 | ||
20 | =head2 What modules does a particular distribution contain? | |
21 | ||
22 | CPAN::Index->reload(); | |
23 | my @modules = CPAN::Shell->expand( | |
24 | "Distribution", "JHI/Graph-0.83.tar.gz" | |
25 | )->containsmods(); | |
26 | ||
27 | You may also refer to a distribution in the form A/AU/AUTHORID/TARBALL. | |
28 | ||
29 | =head1 SEE ALSO | |
30 | ||
31 | the main CPAN.pm documentation | |
32 | ||
33 | =head1 LICENSE | |
34 | ||
35 | This program is free software; you can redistribute it and/or | |
36 | modify it under the same terms as Perl itself. | |
37 | ||
38 | See L<http://www.perl.com/perl/misc/Artistic.html> | |
39 | ||
40 | =head1 AUTHOR | |
41 | ||
42 | David Cantrell | |
43 | ||
44 | =cut |