Kiffin
Kiffin

Reputation: 1037

How can I list all CPAN modules depending on a given module?

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

Upvotes: 5

Views: 466

Answers (4)

brunov
brunov

Reputation: 1003

Some other options:

Upvotes: 1

tsee
tsee

Reputation: 5072

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.

Upvotes: 8

zoul
zoul

Reputation: 104065

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

Upvotes: 1

ghostdog74
ghostdog74

Reputation: 342363

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

Upvotes: 6

Related Questions