Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

comment on

( [id://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 CPAN.pm 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...
--
Brovnik


In reply to Module dependencies by Brovnik

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2024-04-20 03:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found