perl Archives

[RANT] Apparently I don't know "localisation"..

..because I didn't include mysql utf8 cruft in a connection string in something.

Thing is, I've done tonnes of localisation, from parsing named entities in german, to dealing with misconfigured mysql databases, localising currency, numbers and dates to dealing with special cases of greek capitalisation in pattern matching.

So for future reference, if you're relying on connection strings client side, you're doing it wrong - that's brittle and will eventually fuck up when somebody forgets to do it or uses a dodgy my.cnf - instead force it at server side and don't risk messed up …

Comparing Apples and Oranges - rubygems vs cpan part 3

In part 2 of this series I looked at the "shop window" for rubygems and cpan, and you could see a massive difference in focus both in terms of what was highlighted on the main page and the kind of documentation provided when you looked further (TL;DR is rubygems is frictionless and encouraging with few warnings or rules mentioned up front, while cpan involves poking around fusty old usenet style FAQs full of warnings, expectations and saying to wait for a week or so…

Comparing Apples and Oranges - rubygems vs cpan part 2

In part 1 I looked at numbers, now I want to look at uploading and the uploads themselves.

Uploading to rubygems is very simple, I don't know or use ruby, but just from looking at the frontpage I'm pretty confident that it would be pretty quick and easy : 1/2 of the main content of the page is a quickstart guide in 3 simple steps. Neat! (I'm sure there is more to writing a good gem, but that definately leaves you feeling confident to give…

Comparing Apples and Oranges - rubygems vs cpan part 1

So I noticed that CPAN is no longer king of the hill when it comes to sheer number of packages - rubygems took that title mid 2011 (when exactly depends on whether you include dev version and backpan which it lacks).

Rubygems had previously claimed the title based on dodgy numbers, but by the start of 2012 there really wasn't any doubt - that's a hell of a lot of uploaded code.

At first I was a little downhearted and disappointed, luckily I remembered a ="http…

Starting caretaker work on PDF::Report

I adopted PDF::Report a couple of weeks ago after contacting the authors, who were happy to provide me with the privs I needed on pause, since then I've created a github repo but not had a chance to do any of the work I've been planning.

Before I start messing around with PDF::Report too much though, I'm doing housekeeping.

- so first task is to apply the patches in the current bug queue and close them (2 down, 1 to go).
- also, now that it's on g…

Starting work on new release of PDF::Report soon

I heard back from Andy Orr and Aaron Mitti, and they were happy for me to put in some work and a fresh release - already created the github repo and outlined a brief roadmap.

More to follow soon

Messing around with Calendars

So I've been messing around with Calendars a bit for fly-half in order to handle events and stuff like that nice nicely... in a typical ADHD Yak Shaving event I ended up writing a new CPAN module for dealing with Calendars : Calendar::Model

You can see a nice Bootstrap calendar page in the examples on github with the end result looking like this image on twitter

Using Perl's Catalyst/HTML::FormHandler integration with Bootstrap and JQuery

dpetrov (Dimitar Petrov) has forked, improved and now hosted the HTML::FormHandler demo/example app on dotcloud, and it looks rather nice!

You can explore the demo at and see the sourcecode behind it at

Fun things he's added are some table ordering, labelling required fields, and integrating jquery validation (via my ="…

This is why I love Template Toolkit

So I recently learnt about Template Toolkits META directive - I mean I've seen it scattered around here and there but never really seen it do much more than provide default page titles.

I have been annoyed at the inelegant workarounds I've had to use when organising a web app with a site wrapper template and keeping all the view control in the right templates rather than in either the controller or as special cases in the wrapper.

Today I finally sorted that.. yesterday I used the meta tag to add javascript and css links to the header part of the page ="https://github.c…

New release of Autodia - now with Mason support

I've uploaded a new version of autodia to PAUSE and it should be available on CPAN shortly.

Highlights of this release are :
* added Mason handler provided by Peter Franke
* new ASP Handler provided by Dalton Mackie
* improved tests (and made some tests author_only)
* A bunch of minor fixes and barely noticable improvements

About hashbangperl

user-pic Geek, Dad, Husband, hacking perl in Cornwall see also my github and linkedin pages