[sf-perl] Naan and Curry, re-warmed

Joe Brenner doom at kzsu.stanford.edu
Wed Aug 25 15:11:51 PDT 2010

David Fetter <david at fetter.org> wrote:
> Joe Brenner wrote:
> > Paul Makepeace <Paul.Makepeace at realprogrammers.com> wrote:
> > > Joe Brenner <doom at kzsu.stanford.edu> wrote:
> > > >   graphing dependencies of all of cpan


> > What I'd like to see is a single, printed graph displaying the
> > dependencies of all of CPAN.  The goal here isn't necessarily to
> > learn something practical, my main goal is to come up with a huge,
> > snazzy looking printed graph as a stunt, to have something to show
> > at technical conferences.

> Let's take this one chunk at a time.  Do we have nodes and edges all
> in one list?

In here (an sqlite3 db file):


The relevant data is in three tables:
  "modules", "prereq", and "dist".

This appears to be the schema:


These seem like the relevant fields:

  modules.id       (integer, id)
  modules.module   (text)
  modules.dist     (integer, fk to dist.id)
  modules.is_core  (integer, 0 or 1)

  prereg.id        (integer, id)
  prereq.dist      (integer, fk to dist.id)
  prereq.requires  (text, module name: not an fk to modules.id)
  prereq.in_dist   (integer, fk to dist.id)

  dist.id          (integer, id)
  dist.dist        (text, name with hyphens, no file extension)

Modules belong to distributions, and prerequisites are pointers
from distributions to modules.

List of nodes (with labels):

  SELECT id, module FROM modules;

List of edges:

    modules AS m1, modules AS m2, prereq
    m1.dist         = prereq.dist AND
    prereq.requires = m2.module

More information about the SanFrancisco-pm mailing list