Tag Archives: perl

JavaScript.pm on OSX

Just a quick note… I was looking at RT#48699 when I noticed that MacPorts didn’t have JavaScript.pm in it’s collection. I needed to install it by hand. Unfortunately, the latest version (1.12) doesn’t install cleanly. So I’ve forked it and fixed it (along with a couple of other minor nits). Claes said he’ll apply the […]

Mixed Character Encodings

I’ve been given a MySQL dump file at work. It’s got problems — Windows-1252 and UTF-8 characters are mixed in. Bleargh. How can we clean it up to be all UTF-8? Perl to the rescue. use Encode qw( encode decode );   # From http://www.cl.cam.ac.uk/~mgk25/unicode.html#perl my $utf8_char = qr{ (?: [\x00-\x7f] | [\xc0-\xdf][\x80-\xbf] | [\xe0-\xef][\x80-\xbf]{2} […]

mod_perl 1 blows chunks

At $WORK, I’m looking at a web service built on mod_perl 1 / Apache 1. The service takes XML as input and returns XML as output. So far, so good. Unfortunately, whilst I was testing with curl, I found something odd: curl -s -v -T- -H’Content-Type: text/xml;charset=UTF-8′ http://localhost/api < input.xml curl -s -v -T- -H’Content-Type: […]

for() $DEITY's sake, why?

I used to think I had a reasonable grasp of Perl. Yesterday, I realised I didn’t even understand a basic foreach loop. my $val; my @values = qw( a b c ); foreach $val (@values) { print $val, “\n”; } print “[end] $val\n”; I reckoned that this should print: a b c [end] c Instead, […]

London Perl Workshop 2006

Yesterday was the London Perl Workshop, a one-day, two-track conference put together by the London Perl Mongers (in particular, muttley and Greg). I arrived early (mostly due to my lack of faith in train times), so got to put up posters first. First talk of the day was Jesse Vincent on Jifty, the web application […]

XML::Genx 0.22

I’ve released XML::Genx 0.22. There are no functional changes, just a couple of minor bugfixes in order to ensure that it works on Windows correctly. For some time now, I’d been trying to get XS modules compiling on Windows correctly under ActiveState Perl, all to no avail. But now, thanks to the wonder of Strawberry […]

subatom 0.11

Yet another new version, subatom 0.11 again prompted by Hans F. Nordhaug. The only change this time is to add a feed_title option to the config file, so you can specify the title for the feed as a whole. Now, I’m going to sit down and attempt to rework all this as a module+script, along […]

subatom 0.10

I’ve made another release of subatom. This contains a number of fixes for bugs that I managed to put into the 0.09 release (as well as a couple of minor features). This has really left me with a very nagging need for some tests for this module. Restore the ability to send output to stdout. […]

subatom 0.09

I’ve released a new version of my tool subatom. If you haven’t seen it, it produces atom feeds for subversion commit messages. It’s pretty handy for monitoring activity in a subversion repository and it doesn’t need access to the server. There are only two new features in this release: Add in a option to specify […]

gdb ruby $pid

gdb is my “tool of last resort”. When all other online diagnostics have failed, I know enough gdb to pull out a C level stack trace. % gdb $SHELL $$ GNU gdb 6.3.50-20050815 (Apple version gdb-477) (Sun Apr 30 20:06:22 GMT 2006) /Users/dom/320: No such file or directory. Attaching to program: `/bin/zsh’, process 320. Reading […]