tags:

views:

117

answers:

4

How can I list all CPAN modules depending on a given module? For example, create a list of modules using Class::Workflow?

+1  A: 

I’ve found CPAN::Dependency and CPAN::FindDependencies on CPAN, they might help you.

zoul
+6  A: 

you can use a module such as CPAN::Dependency, or try this online , among many others.

ghostdog74
+6  A: 

There's two valid questions about dependencies:

  • What modules does the given module require?

  • The reversed question: Which modules depend on the given module?

For the former, the authoritative but non-recursive answer is usually to look at the META.yml file that's part of most modern distributions. If there is no such file, you may try looking at the Makefile.PL or Build.PL build tools that ship with it. If you want to know all dependencies and not just the direct ones, cf. ghostdog74's answer. Specifically, David Cantrell's 'CPANDeps' is very, very handy.

Obviously, the latter question is impossible to answer by inspecting the module itself. If you don't want to grep an unpacked minicpan, the best solution is something like the "used by" section of a module's CPANTS entry.

tsee
The last time I checked, the CPANTS information wasn't all that great. It assumed the names of modules from their path under lib/, so some of my modules appear to be quite popular. See, for instance, Test::URI.
brian d foy
+1  A: 

Some other options:

brunov