morgon has asked for the wisdom of the Perl Monks concerning the following question:

Hi

I want to play around with a graph database (Neo4j) and thought that CPAN-modules and their depdendencies might make a nice playground.

So to fill my database I need to generate a list of all available CPAN-modules, their authors and for every module the list of it's (immediate) dependencies.

My question is now: What is the best way to do this?

If I had a way to generate the list of all modules I could probably feed that into CPAN::FindDependencies to get the dependecies but for one that would probably take a long time to complete and furthermore there does not seem to be a way to get the authors.

So is there some better way to obtain this data?

Replies are listed 'Best First'.
Re: CPAN dependency graph
by Corion (Patriarch) on Mar 26, 2015 at 11:40 UTC

    I'm not sure that a publically downloadable database is available, but I think you can talk to DrHyde if they want to share the http://deps.cpantesters.org database with you.

    Personally, I would just look at CPAN::Mini::Visit to visit each of the latest distributions of a CPAN mirror and extract the needed prerequisites. Alternatively, you can visit each distribution and home it has recent/accurate META.json files and use these to build your dependency graph. Also, maybe CPAN::Mini::Visit::Simple actually is simpler or simplyfies the job at hand.

Re: CPAN dependency graph
by jeffa (Bishop) on Mar 26, 2015 at 16:48 UTC
Re: CPAN dependency graph
by Anonymous Monk on Mar 26, 2015 at 20:46 UTC