Installing Catalyst by Hand

I'm investigating a particular issue at work and I thought "Plack debugging middleware is exactly what I want right now". Specifically, I want this:

#!/usr/bin/env perl

use strict;
use warnings;
use Dynamite;
use Plack::Builder;

my $app = sub { Dynamite->run(@_) };

builder {
    enable 'Debug', panels => [qw(DBITrace Memory Timer Environment)];

And then I can just do this:

plackup -r -s Starman script/dynamite.psgi

And have beautiful debugging panels appear in my browser, giving me all sorts of useful information.

Or it would be if we weren't running a three frickin' year old version of Catalyst.

I can't just install the latest Catalyst because we already know our app won't run on it. I hand-install Starman, PSGI, Plack and Plack::Middleware::Debug and related modules in hopes of getting lucky. No, I did not get lucky.

The oldest Catalyst distribution that appears to be acceptable is 5.80007, so I decide to try and install that. Unfortunately, running "cpan F/FL/FLORA/Catalyst-Runtime-5.80007.tar.gz" is no good because it forces the latest version of many other modules, so I have to do this the hard way. I looked at David Cantrell's excellent cpan mirrors, but the 2009 mirror was too old and the 2010 mirror was too new. That's a shame because when you can use one of those mirrors, it's golden.

So I download the 5.80007 tarball. Seems Moose 0.78 is required. The CPAN distributions for Moose jump from 0.54 to 0.93. What? So I jump to the backpan, but that's organized by author! Who released that version of Moose? Stevan Little? No. Florian Ragwitz? No. Dave Rolsky? Bingo! (I'm sure there's a better interface to the backpan, yes?)

Of course, this version of Moose requires a particular version of Class::MOP and MooseX::Types and MooseX::Something::Or::Other and all sorts of little bits and pieces of things just FAIL if you don't carefully synchronize all of these versions.

And all of this "fun" led to several hours of annoyance before I finally got PSGI working and our code running safely.

Our feeds are XML and the plack debugging middleware only works with text/html. Aargh!


WTF? How could a one year old version of Catalyst be incompatible to a more recent one? Didn't one of the maintainers write this epic rant just about the same time? What a Hypocrite!

Our feeds are XML and the plack debugging middleware only works with text/html. Aargh!

Do you mean XHTML? Otherwise, given that the Plack debug panels are injected HTML and Javascript.. what sort of debug panel did you want?

I suppose Plack could serialise the debug information and injected that into your XML document instead.. but that doesn't sound very useful.

Dude, I sit next to you at work! Ask, and I can create a CPAN mirror for any date/time you want!

Leave a comment

About Ovid

user-pic Have Perl; Will Travel. Freelance Perl/Testing/Agile consultant. Photo by Warning: that site is not safe for work. The photographer is a good friend of mine, though, and it's appropriate to credit his work.