Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

A master-list of module dependencies?

by rrwo (Friar)
on Jul 10, 2004 at 18:24 UTC ( #373386=perlquestion: print w/ replies, xml ) Need Help??
rrwo has asked for the wisdom of the Perl Monks concerning the following question:

Is anybody maintaining a list of CPAN module dependencies?

I am working on a project to show CPAN Tester Results on a module per platform, with dependencies. So if one does not see test results for platform 'x' on a module, one can look at dependencies to see if that is because a dependent module fails on that platform.

The only way I can see to produce this information is to download each module and use existing dependency scanning modules (there are two or three of them, at least).

That's a lot of work I'd rather avoid if somebody else has dependency information available.

(Also, if my idea overlaps with an existing project, I'd like to know about it too.)

Comment on A master-list of module dependencies?
Re: A master-list of module dependencies?
by stvn (Monsignor) on Jul 10, 2004 at 18:58 UTC
    The only way I can see to produce this information is to download each module and use existing dependency scanning modules (there are two or three of them, at least).

    You could be optimistic and assume that all dependencies will be in the Makefile.PL files (or equivalent). Of course the reality is that they should be in there anyway, and when they are not, the CPAN-Tester should fail. So while it might be optimistic, it is more how it "should be" anyway.

    That's a lot of work I'd rather avoid if somebody else has dependency information available.

    (Also, if my idea overlaps with an existing project, I'd like to know about it too.)

    I would email the CPAN-Testers list, as well as the perl-qa list (home of the Phalanx project) as well as the perl modules list(s),... that is if you haven't done that already. Other than that good luck and keep us updated as to your project, I think it could be a very useful thing for the community.

    -stvn
      You could be optimistic and assume that all dependencies will be in the Makefile.PL files (or equivalent). Of course the reality is that they should be in there anyway, and when they are not, the CPAN-Tester should fail. So while it might be optimistic, it is more how it "should be" anyway.

      I would rather use existing modules such as Module::ScanDeps to scan dependencies than to trust that a Makefile.PL or Build.PL or META.yml is accurate.

      Errors from missing pre-requisites are not often posted to CPAN Testers, unless the tester notices that it's something not specified in the pre-reqs.

      After all, this is for a tool to look for points of failure that the author may not be aware of.

Re: A master-list of module dependencies?
by biosysadmin (Deacon) on Jul 11, 2004 at 18:46 UTC
    Is downloading every module really that much of a hassle? I maintain a local CPAN mirror on the Bioinformatics server up at school, and it's only 2.3G large. If size if really that much of an issue you could cut this down considerably by using merlyn's article on Mirroring your own mini-CPAN.

    If I were doing this I would probably use a Mini-CPAN because you're probably not interested in older module versions.

      It seems to me that you are still expected to develop your own custom rsync/cron configuration to mirror CPAN. Frankly, that's too much effort for an ordinary developer; it's easier to just use CPANPLUS, or suffer on when you're offline.

      I think if there were HOWTOs for platforms, e.g. MacOS X, each BSD, each Linux distribution, more people would be mirroring CPAN (e.g. on their laptops).

      The intersection set between Perl application developers and those who are willing to invest half a day in setting up a CPAN mirror may not be that large. I know that the payoff isn't good enough for me, but I would do it if it were cheaper in terms of effort.

        I think if there were HOWTOs for platforms, e.g. MacOS X, each BSD, each Linux distribution, more people would be mirroring CPAN (e.g. on their laptops).

        Like the How to mirror CPAN section of the CPAN FAQ you mean :-)

        Basically:

        rsync -av --delete rsync.mirror.of.your.choice::CPAN mycpan

        should do the job.

        As adrianh has pointed out, mirroring CPAN is not very hard at all. Here's the two lines from my crontab that do the job just fine:
        # Update CPAN mirror at 2am every Sunday 0 2 * * 0 /usr/local/bin/rsync -av --delete cpan.mirror.findityourself +.com::CPAN /var/apache/htdocs/CPAN/ >> /dev/null 2>&1
        That took me about 10 minutes to set up the very first time, which really isn't half of a day. Extending it to any Unix-ish system (such as Linux, BSD or MacOSX) should take about 5 minutes. That's much less than half of a day. Unless you live on a planet like Mercury. :P
        What's so hard about 0 0 * * * (cd ~me/CPAN-mirror &&  rsync -av --bwlimit=15 --delete rsync.nic.funet.fi::CPAN .)?

        Most people do not mirror CPAN on their machines because they will never need a majority of the modules.

      Is downloading every module really that much of a hassle?...

      Not really, but it seems that this information should already be out there. As far as I can tell, it's not. So I'm in the process of generating my own list. What I'm doing:

      • If there is a .meta file available, I use that,
      • otherwise I download the module, extract the Makefile.PL and do some simple parsing using a module I wrote called Module::MakefilePL::Parse (since Module::Depends uses modules which do not work well on Windows -- ironically this was one of the reasons I started on this project)
      Is downloading every module really that much of a hassle?

      Now that I have moved to a place with poor internet connectivity, yes.

      However, I have a source for some of my information from CPANTS.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://373386]
Approved by Enlil
Front-paged by stvn
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2014-12-19 23:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (94 votes), past polls