Monday, June 22, 2009

CPAN Good, Bad, and Ugly

And that's when the trouble started. It's now three hours later, and I'm still trying to get Catalyst down from CPAN. And I have no confidence I will have a properly working version when it finally does finish installing.

My first attempt to get Catalyst::Runtime and Catalyst::Devel was on my Linux server's default 5.8.x Perl. It ran for maybe fifteen minutes, and then complained that there was something wrong with my distribution's Perl, and I should complain to the distribution packagers.

You know, that might seem like a great way to bring about long term change, but it doesn't seem like the most productive use of my time this morning. So I decided what the heck, let's install 5.10 just to my personal account -- the perfect way to experiment with it without risking blowing up my nice, happy server. (Besides, I've wanted access to 5.10 ever since I started reading the various Perl blogs. Too many goodies to ignore.)

Now this is another positive point -- 5.10 installation was perfectly smooth, even to a non-standard directory. Sweet!

Installing Catalyst took a long time, and came up with the following error:

# You are using perl 5.10.0 with the "Unknown error" bug. This can make ## developing Catalyst applications much more painful, as it will come ## up with no details every time you have a syntax error in a Controller.## ## For more information see: ## ## * http://rt.perl.org/rt3/Public/Bug/Display.html?id=49472 ## ## It is highly recommended that you use a different version of perl or ## compile a patched version for Catalyst development. #

So the link there gives the number of the commit to the Perl source that fixes the bug. But it doesn't provide any obvious way of easily getting that patch. And Perl is in git now, right? I don't see any obvious way of associating that number to a git commit to extract the patch.

So now it's the next day from when I did all that. I have Catalyst installed, and it performed the basic cool step in that tutorial admirably. But I've also got this lingering unfixed bug hanging over my head, too.

And that's the mixed bag of Perl at the moment. On the one hand we have these cool things like Catalyst and Perl 5.10, and that great screencast promoting Catalyst. And on the other hand we have this funky cruft that turns what could be pure awesome into something messy and a bit embarrassing.

I don't have any idea who to blame; I suspect there is a little bit of blame spread out over a large range of not terribly guilty parties. (Including myself -- I'm sure given time I could track down how to get the patch, and put that answer here and/or patch Catalyst to put the answer there.)

But that's my experience with it. Hopefully things will go more smoothly now that Catalyst is installed...

And one by one, and two by two, They have sailed from the wharf since then;I have said good-bye to the last I knew, The last of the careless men.And I can’t but think that the times we had Were the best times after all,As I turn aside with a lonely glass And drink to the bar-room wall. -- Henry Lawson