-----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)
You would get current packages and old, for performance reasons in tow Dbs
but this would be transparent for the user. There would be two interfaces:
# cpandb --query Math::BigInt
name: Math::Bigint
author: TELS
version: v1.77
latest: v1.77
....
# cpandb --update Math-BigInt-1.78.tar.gz
package Math::Bigint updated.
New entry:
name: Math::Bigint
author: TELS
version: v1.78
latest: v1.78
....
# cpandb --query Math-BigInt-1.77
name: Math::Bigint
author: TELS
version: v1.77
latest: v1.78
....
and so on. This script would also update, add etc to the DB, much like RPM.
(it only maintains the DB, no code no install etc).
The other interface is Perl OO like so:
use CPANDB;
my $db = CPANDB->open(); # default location
print $db->author('TELS');
my $m = $db->latest_package'(Math::BigInt');
print $m->depends_on();
etc.
The Db would be empty, but with a suitale wrapper around cpandb could be
filled, or you could download a pre-made one. Pause could even maintain on
on their own, because then it would be always update.
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
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".
(Why not use CPANTs database? Easy, because the interface module is as far
as I know broken since a few years, the database changed formats a few
times (breaking any interfacing module again), its undocumented (that is
not the documentation you are looking for) and has a few other small
problems, like no command line interface etc. And it is tightly integrated
into CPANTS and it has a lot of dependency like sql or postgres or
whatever. All the other solutions out there have some of the same problems
or other problems of the same kind.
The most common theme seems to be that everyone wants what the DB does, plus
something more (website generator, graph generator, installator and a shell
etc). And since no real DB exists yet, everyone invents their own DB
backend again :)
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?
best wishes,
Tels
PS: Sorry for the rambling on, its 3:00 am local time and I should be asleep
since 3 or 4 hours. And this email should have been written like 2 months
ago. I hope someone understand what I wanted to say :-D
- --
Signed on Wed Jul 12 02:58:38 2006 with key 0x93B84C15.
Visit my photo gallery at http://bloodgate.com/photos/
PGP key on http://bloodgate.com/tels.asc or per email.
I am looking for a Perl-related job (no, Python is not Perl-related :-).
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iQEVAwUBRLRKWncLPEOTuEwVAQI9TQf+I9xoOMGGEj6V5poS4VUX9fVN8FcPyYlP
jdT6PGCfurG7kGs2zuhyPYBM+W6rlk5wvrfI30KoDtxzDuCyCdogNIWekpjtnWB+
Ei72dZdVtiWEADxLopGG2gAMjhE4OPKo7qkmiox3sZQj/9jpU87nHCDpVHxrC1as
QlVJUaA3MGl75mYepiMoyoBcGfjyWsVzd59rouymwp4/NVpSfU+z4/cZU4KRFNb+
RuKmYXQKSfSsQe4Jn1o69ZCkzPOlZ2NC0HfVN6ZXCZ/iz5/CZTq3nT6iM/JBOIOE
HOAqwJzz3fkdS1z/AlKaoDbKNv+tBaH+6+wyX15dzr5f3UKR/2pb2g==
=lDv9
-----END PGP SIGNATURE-----