NAME

CPAN::FindDependencies - find dependencies for modules on the CPAN

SYNOPSIS

use CPAN::FindDependencies;
my @dependencies = CPAN::FindDependencies::finddeps("CPAN");
foreach my $dep (@dependencies) {
    print ' ' x $dep->depth();
    print $dep->name().' ('.$dep->distribution().")\n";
}

FUNCTIONS

There is just one function, which is not exported by default although you can make that happen in the usual fashion.

finddeps

Takes a single compulsory parameter, the name of a module (ie Some::Module) or the name of a distribution complete with author and version number (ie PAUSEID/Some-Distribution-1.234); and the following named parameters:

nowarnings

Warnings about modules where we can't find their META.yml, and so can't divine their pre-requisites, will be suppressed;

fatalerrors

Failure to get a module's dependencies will be a fatal error instead of merely emitting a warning;

It returns a list of CPAN::FindDependencies::Dependency objects, whose useful methods are:

name

The module's name

distribution

The distribution containing this module

depth

How deep in the dependency tree this module is

BUGS/WARNINGS/LIMITATIONS

The module assumes that you have a working and configured CPAN.pm, and that you have web access to http://search.cpan.org/. It uses modules' META.yml files to divine dependencies. If any META.yml files are missing, the distribution's dependencies will not be found and a warning will be spat out.

It starts up quite slowly, as it forces CPAN.pm to reload its indexes.

FEEDBACK

I welcome feedback about my code, including constructive criticism and bug reports. The best bug reports include files that I can add to the test suite, which fail with the current code in CVS and will pass once I've fixed the bug

Feature requests are far more likely to get implemented if you submit a patch yourself.

CVS

http://drhyde.cvs.sourceforge.net/drhyde/perlmodules/CPAN-FindDependencies/

SEE ALSO

CPAN

http://cpandeps.cantrell.org.uk/

AUTHOR, LICENCE and COPYRIGHT

Copyright 2007 David Cantrell <david@cantrell.org.uk>

This module is free-as-in-speech software, and may be used, distributed, and modified under the same terms as Perl itself.

CONSPIRACY

This module is also free-as-in-mason software.