XS is fun

dami on 2008-06-19T20:26:26

So far I had always looked at XS code as dark, unknown territory.

Recently I had to jump into it because we really needed support for custom-made collations in SQLite, and nobody had done it so far (you know, there are those strange foreign languages like french where you want accented characters when you write, and you want to ignore accents when you search).

The DBD::SQLite driver already has support for other function hooks, so these were nice examples. And I was very pleased to find that XS authoring is very well documented in the standard perldoc. So after all it was fun !

I hope the patch will be integrated some day in a next release of the driver; meanwhile, if you are in a hurry with the same need, you can get the patch at http://rt.cpan.org/Ticket/Display.html?id=34828. There is also support for a hook into SQLite's progress_handler. Enjoy.