On Wed, Jul 12, 2006 at 03:03:14AM +0200, Tels wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Moin Tim,
> 
> On Tuesday 11 July 2006 18:34, Tim Bunce wrote:
> > I needed some code to trawl through a directory tree parsing perl
> > modules and scripts to determine their dependencies.
> >
> > The closest existing CPAN code was Module::Dependency but it fell short
> > of what I needed. The original author (P Kent) has passed over
> > maintenance to me. My latest release is:
> >
> >   file: $CPAN/authors/id/T/TI/TIMB/Module-Dependency-1.84.tar.gz
> >   size: 52161 bytes
> >    md5: 90a83b2aee39f5d25060ebdb6cc3105d
> 
> Thats sort of cool, although I havent looked at it yet :-D
> 
> My real-grand-plan was always to have a CPANDB module that does exactly the 
> following:
> 
> maintains a database with:
> 
> * every CPAN author with all details (ID, email, name)
> * every package with all details (author id, version, name etc etc)

> This database could then be used by all the following modules:
> 
>       Module::Dependency
>       Graph::Dependency
>       CPANPLUS
>       CPANTS
>       CPAN
>       Module::Author
> 
> and a few others I forgot. Basically by every module out there that 
> re-invents the wheel over and over again just to be able to query stuff 
> about CPAN modules. (some of them do really horrible stuff like accessing 
> search.cpan.org - I know I wrote one of them :D

A key point about those modules (other than Module::Dependency) is that they
don't work for private modules (the so called "Dark CPAN") nor for scripts.

Module::Dependency handles both (details changed to protect the guilty):

$ pmd_dump.pl adnetwork/www/cron/cv.pl
adnetwork/www/cron/cv.pl depended_upon_by: 
adnetwork/www/cron/cv.pl depends_on: strict File::Basename lib Env wConfig 
vConfig Churl::Log Churl::MyDBI Churl::Util

$ pmd_dump.pl Churl::MyDBI 
Churl::MyDBI depended_upon_by: www/cron/cv.pl www/cron/pub_login.pl
Churl::MyDBI depends_on: Exporter strict warnings Carp DBIx::DWIW 
File::Basename Sys::Syslog vars
Churl::MyDBI filename: clcyt/Churl/lib/Churl/MyDBI.pm


> And up until today it is still not possible to get easily the answer "what 
> modules do I need install for Foo::Bar 1.23 when using Perl 5.8.x".

Or what module may be affected if I upgrade Foo::Bar.

> My idea was to build _only_ the database, and do it right, simple and easy 
> to use and then get everyone else to just use the DB instead of fiddling 
> with their own. (simple by having the database being superior to every 
> other hack thats in existance now :-)
> 
> I even got so far as to do a mockup v0.02 - but then went back to playing 
> Guildwars.
> 
> Is this a project that would be of general interest?

Yes! But widen your horizon, and schema, beyond just CPAN.
I'd be interested in helping out and, if it works out, perhaps migrate
Module::Dependency to use it.

Tim.

Reply via email to