Recursive dependency detected

cog on 2005-10-27T11:03:39

My last two CPAN modules are an experiment:



These two modules use each other, and state that inside Makefile.PL

The reason I created them is because I wanted to see what would happen to a CPAN shell installation of one of them:

A bunch of errors and a "Recursive dependency detected"

Should this be addressed? If so, in what way?

Why does this bother me?

Here are two of my modules:



The second one is barely started, but here's what I'd like them to do, at some point:

Lingua::Identify: You give it a file, it uses File::Munger to figure out what kind of file it is (pdf, html, whatever) and retrieve the textual content of the file, and then identifies the language.

File::Munger: You give it a file, it identifies the file type, retrieves a bunch of information about it, *including* the language the file is written in, via Lingua::Identify.

Basically, something like this:

Lingua::Identify->file_lang uses File::Munger->file_text

File::Munger->file_info uses Lingua::Identify->lang

I think this should be possible, even without breaking one of the modules in two...

Before I think too much about it, I'd like to ask for your thoughts on this.

Anyone?


Proper dependency specification

rafael on 2005-10-27T13:18:21

The CPAN lacks proper dependency specifications.

To do this properly, we probably need (1) to distinguish between pre-requirements and requirements. The first ones are necessary for installation, the second ones for usage (or for "make test"). And (2) transactional installations, that is, detect dependency cycles and install/upgrade sets of dependent packages as a whole. (Rolling back everything, of course, if one of the make-tests in the transaction fails.)

That's what proper package management systems and dependency solvers do. That's not trivial and doing this for CPAN is probably overkill for most use cases.

Use the CPAN Luke

barbie on 2005-10-27T13:44:40

Whatever you think you need to try, nearly always someone has got there before you....

Re:Use the CPAN Luke

cog on 2005-10-27T13:49:53

But I did use it... it's just that between the search I made and the day I finally decided to create the modules, those two showed up :-)

Anyway, recursive dependency is only the first version of what I want to try, so my two modules (or at least one of them) will eventually see another version with another test. At some point, when I'm satisfied, I'll probably delete them.

use CPANPLUS instead then :)

kane on 2005-10-27T16:44:20

It actually does the right thing when detecting recursive dependencies... try it out ;)

Re:use CPANPLUS instead then :)

cog on 2005-10-31T11:13:41

True, but what would happen to the CPAN shell users? :-)