By Stephen Scaffidi (‎hercynium‎) from Boston.pm, drinkers.pm
Date: Monday, 21 June 2010 13:00
Duration: 40 minutes
Target audience: Intermediate
Language: English
Tags: backpan cpan darkpan git local::lib locallib mini perl

Getting out of CPAN dependency hell, and staying out.

You can find more information on the speaker's site:


############################################################

UPDATE: Talk slides, notes, links, et al. are now available here: http://perl.scaffidi.net

############################################################


One of the great strengths of Perl is the CPAN. However, it can also be the source of much pain for those who develop and maintain large, aging projects. For example, a codebase that relies on particular versions of CPAN modules that are no longer current can be nearly impossible to install on a new server. What can happen?

* New programmers who try to set up a dev box may never be able to get it working.
* A new admin can break the application just by using the CPAN client to install an unrelated dist that then pulls in updates which are incompatible with said app.
* Testing environments can be too brittle to rely on, and it can be impossible to replicate problems found in other environments

I've spent the last nine months working with a company with these issues and over that time I've started to develop some practices and techniques for taking control of, and resolving the core issue at hand: *controlling what is available and installable for your application at all times.*

The past couple of years some new tools have cropped up, and others have seen numerous improvements, and I've learned to use them together to create a stable, predictable, controllable means of deploying the CPAN dependencies for an application that would otherwise be exceedingly difficult to manage.

The talk will touch on the following points:

* The scenarios where CPAN dependency hell can happen
* The folly of relying on the system perl and/or installing CPAN modules to the system perl
* How to use local::lib to avoid installing to the system perl
* How to create a mini-cpan and make the cpan client use that
* Managing updates to the mini-cpan and your local::lib using git
* Finding cpan dependencies in your app and tracking down the proper versions (not 100% reliable, but better than guessing)
* Injecting older versions into your mini-cpan
* Automating the whole thing, as much as possible.

Attended by: