1=head1 NAME 2 3CPAN::API::HOWTO - a recipe book for programming with CPAN.pm 4 5=head1 RECIPES 6 7All of these recipes assume that you have put "use CPAN" at the top of 8your 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 16This returns a string of the form "AUTHORID/TARBALL". If you want the 17full path and filename to this distribution on a CPAN mirror, then it is 18C<.../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 27You may also refer to a distribution in the form A/AU/AUTHORID/TARBALL. 28 29=head1 SEE ALSO 30 31the main CPAN.pm documentation 32 33=head1 LICENSE 34 35This program is free software; you can redistribute it and/or 36modify it under the same terms as Perl itself. 37 38See L<http://www.perl.com/perl/misc/Artistic.html> 39 40=head1 AUTHOR 41 42David Cantrell 43 44=cut 45