I found a "nifty" bug in CPAN.pm today. If you try to install something gi-normous like Catalyst or Jifty, the CPAN.pm shell craps out halfway through because it deleted somepart of the stuff to be installed during the build for the umpteen billion dependencies.
I didn't track how many modules Catalyst adds to a clean 5.8.8 but Jifty added 174 distributions and eventually failed because of something to do with XML::Parser, WWW::Mechanize, and perhaps some simple thinkos.
Blarg. That's a whole heap of module.
The value of CPAN is greatly diminished if we don't have an easy packaging mechanism. Many PHP apps are much easier to install than equivalent Perl ones, solely due to dependencies.
Re:Perl needs better packaging
Alias on 2007-04-10T15:06:59
If I wanted to release giant spaghetti-code apps that required a large standard library and reimplemented a bunch of functionality over and over again, and had no unit tests and no code reuse between applications at all, I imagine we could do installers as simple as PHP apps too.
CPAN is complicated for a reason.
The answer is not to make packages stupider, it's to make the CPAN tools smarter.Re:Perl needs better packaging
SuperCruncher on 2007-04-10T19:53:36
I don't like PHP and I'm not at all advocating PHP-style code and coding practices (do they have any, apart from 'hack'?). I'm just pointing out that many PHP apps, however dirty, are much easier to install.I don't see how bundling prerequisite modules with an application (e.g. Plagger) or large module does any harm. More disk space will be used, but in most cases that won't be a problem. Some may prefer to install modules separately, and I'm not seeking to stop that - I just want an easier way of distributing Perl apps.
Making CPAN tools smarter isn't really the solution IMHO. Bundling is faster (than downloading n packages off CPAN), and good for packaging "traditional", desktop Perl apps (yes, there are several). The idea of downloading off CPAN, at least in the current form where the latest version of the module is always retrieved, isn't very good from a configuration management and QA perspective.
I don't see how I was even remotely proposing to "make packages stupider". I'm talking about bundling modules together in such a way that they can be easily installed.
Module::Tiny
Alias on 2007-04-10T13:59:48
Situations in which only a limited subset of the most basic functionality are required is why the::Tiny series of modules was created. Re:Module::Tiny
sigzero on 2007-04-10T14:30:39
Yup, that is what bdf said as well.
Re:Not really a bug
Alias on 2007-04-10T14:01:14
Even if it does what it says it does, if what is says it does is broken, it's still wrong.Re:Not really a bug
dagolden on 2007-04-10T15:23:21
I think that CPAN.pm should only check the cache size after it finishes running the queue, not in the middle. CPAN doesn't guarantee anything about how far over the cache limit the build cache can go and is pretty vague about how often the cache is checked. So I think this is a bug that can be fixed pretty easily.
It reminds me of the Uncertainty Principle in a way -- you get to exceed the cache limit until you actually go and measure how much cache you're using. As long as that time window is set appropriately, all is well.
Pretty vague...
LaPerla on 2007-04-10T22:06:04
There is the config variable scan_cache that determines how often the cache is teared down to its limit. You can set this variable only to two values: "atstart" or "never". This means that (modulo bugs, of course) it is impossible that the cache manager is run in the middle of a session. The usual bug that's happening instead is that somebody (usually Module::Install) calls CPAN.pm recursively. Then "atstart" can be at any point in time.
I hope that I soon get evidence about what really is going on on Joshua's installation.
Re:Pretty vague...
jjore on 2007-04-11T01:04:24
Jifty::DBI uses Module::Install which is apparently what kills the Jifty install. It turns out that upgrading CPAN fixes the problem. I suppose that modules with large dependency trees ought to have the non-errant versions of the installer in their pre-req lists.
Perhaps that should be dynamic - if CPAN is asking Jifty about installing it, Jifty can tell CPAN that CPAN needs to be at least 1.90 to be able to successfully install it.Re:Pretty vague...
dagolden on 2007-04-11T01:39:01
Or maybe Module::Install should just die.
Re:Pretty vague...
Aristotle on 2007-04-11T06:30:45
That’s what I’d say. I understand why people consider it necessary, but I think the effort would have been better invested in fixing Module::Build’s bootstrap problem. (Last I heard, we’re getting there, though, so hopefully Module::Install can indeed just die, soon.)
Re:Pretty vague...
drhyde on 2007-04-22T01:37:36
That still leaves us with the problem of all those people who have bundled Module::Install with their own modules. Perhaps the solution is for CPAN.pm to include its own Module::Install which does nothing but die, and set PERL5LIB to make sure that its Module::Install killer always loads first.Bwahahahaha
Re:Not really a bug
jjore on 2007-04-10T17:57:15
Andreas hinted the new CPAN.pm 1.90 might not have this problem. I'm testing it now.