in reply to Re: Perceptions of Perl - views from the edge
in thread Perceptions of Perl - views from the edge

I don't know if dependency hell from CPAN has a straightforward technical solution.

I've seen various attempts at addressing it, like the Tiny modules and the P5EE project. The Tiny modules seem like the best step so far.

It is easy to imagine building an app that relies on several CPAN distributions that in turn load 4 different date/time handling libraries. One module I need uses DateTime, another uses Time::Local, yet another component uses Date::Manip and yet another uses Date::Tiny

All of these modules are worthy modules, and it reasonable to use any single one of them. I have used libraries that depend on each of them, except Date::Tiny. But, since the Tiny modules seem to be catching on, I expect to come across something that uses Date::Tiny sometime soon.

I'm not sure what the technical fix for this is.

It seems to me that the fix is social rather than technical. Just like community consensus is that the use of the strict pragma is recommended. We need a set of best practices for module authors.

Here are a couple ideas that come to mind as a way to address the dependency hell problem. Module authors should:

Maybe someone can write CPAN Best Practices. Perhaps, PBP 2: Electric Boogaloo could include a section on writing modules for CPAN.


TGI says moo

  • Comment on Re^2: Perceptions of Perl - views from the edge

Replies are listed 'Best First'.
Re^3: Perceptions of Perl - views from the edge
by zby (Vicar) on Feb 18, 2008 at 23:31 UTC
    The first step would be to make the problem visible - show the dependency summary at the cpan search page along side the stars from the reviews. This is a small technical change with the immediate effect of making the installation of modules much less a frustrating fight with an invisible enemy. But what would be more interesting, is the second order social consequences of it because CPAN authors would care more about the installability of their modules.
      "The first step would be to make the problem visible - show the dependency summary at the cpan search page"

      I suggested that and a few other changes to the maintainer a few weeks ago. 'Tis done now.

      For example, see http://search.cpan.org/~timb/DBI/

      Note the new "Dependencies" and "Platform/Version Matrix" links. (Plus the new totals counts in grey at the very bottom of all the pages.)