mattk's Journal mattk's use Perl Journal en-us use Perl; is Copyright 1998-2006, Chris Nandor. Stories, comments, journals, and other submissions posted on use Perl; are Copyright their respective owners. 2012-02-09T12:56:09+00:00 pudge Technology hourly 1 1970-01-01T00:00+00:00 mattk's Journal Is Crypt::OpenPGP fatally broken? <p>Dear Lazyweb,</p><p>Has anybody managed to successfully install Crypt::OpenPGP under Debian Etch? How did you do it, and did you use 5.8.8 or 5.10?</p><p>The CPAN Testers Matrix seems to infer that this is a lost cause, which is unfortunate as it's a pre-requisite for the NZRS Perl toolkit. Maybe I can hack in Crypt::GPG support instead...</p> mattk 2008-10-07T07:14:32+00:00 journal Indirect object notation is frowned upon <p>I like to banish it in Vim, with this:</p><p> <code>%s/\(new\) \([A-Za-z0-9:]*\)/\2-&gt;\1/gc</code></p> mattk 2008-09-20T17:32:57+00:00 journal SQL error: near ")": syntax error <p>The Anti-Wall Illuminati like to disseminate a myth that says that when you cut your teeth on Perl, it breaks your mind permanently, in many nefarious ways, for any other language.</p><p>I'm not sure whether it's just about thinking in the wrong language, but there's one syntactical landmine I always stomp on: a lax attitude towards commas after the final element in a list. Ruby seems to be the only other language that lets it slide - Javascript may or may not, depending on the browser and whether the interpreter is having a bad day already.</p><p>Now I've decided this is an open letter to the people writing parsers for lists: If I give you commas you'll take them. Oh yes.</p> mattk 2008-01-28T06:47:05+00:00 journal iPhone maps <p>I impulse bought an iPod Touch on Friday. Had some fun jailbreaking it but it works nicely now. Since the iPod has no EDGE and the only ubiquitous wifi provider around in Melbourne is Telstra (who, on principle, should not be given money), I've been hoping there will be an easy way to pre-cache image data on there, giving it more offline usefulness.</p><p>The map tile data is stored inside an SQLite file, with a basic schema (<a href="">more info here</a>), and uses HTTP for its communications, which is easily dissected by tcpdump and <a href="">tcptrace -xhttp</a>. Unfortunately the POSTs aren't in plain text so I'm going to have to try and decode the API so I can fake a client with Perl and LWP that can grab all the data for a given area.</p> mattk 2007-11-11T10:31:41+00:00 journal