Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Downloading stuff from CPAN, I have found inconsistencies in the management of module dependencies.

Some explicitly check and try to get needed modules.
Some fail gracefully and asks if you want to get them.
Some just fail during testing and leave you to handle it.

So... I thought it would be nice to build a graph of the dependencies.

I have put together some code to look through all of the installed modules and store in a mysql database the following :

  • Package Name
  • Filename
  • Version
  • Date installed
  • Array of pragmas used
  • Array of modules used
The intention is to allow me to easily generate a graph and some statistics re. the modules.

Before I spend more time on this, I would appreciate some thoughts from you folks.

Has this been done before ? (I looked on CPAN and SuperSearch and didn't find anything)

Would other find it usefult to have this ?

What sort of output would be useful ?

In answer to the last, I am toying with :

  1. Just leave it in the database.
  2. A Web tool which allows browsing up and down the chains.
  3. A visual graph (e.g. using GraphViz)
Item 2 is my favourite and shouldn't be too hard. Visually it will be difficult to display the whole thing, since I have 1040 rows in the table (=packages installed).

Update: Have now done some more work on item 2, sample browser is at Here.

Taking DrZaius's advice, it now also reads the perllocal.pod to get more info and throws that in as well.

Have also added a reverse table, which allows you to see which modules a modules is used by.

The overall effect allows you to browse up and down the tree as you like.

Of course, to solve the original problem of finding out what modules I need to install, this really needs to run on CPAN...

In reply to Module dependencies by Brovnik

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others taking refuge in the Monastery: (1)
    As of 2018-03-18 02:37 GMT
    Find Nodes?
      Voting Booth?
      When I think of a mole I think of:

      Results (228 votes). Check out past polls.