Thanks especially to some very helpful comments from ziggy, I managed to have another burst of productive programming last night, wiping away the worst remaining bit of cruft from my app. Now to revise my definition of 'cruft' downwards, and go to it again....
In the process I also managed to get my banal question frontpaged on perlmonks, but got the answer I needed.
On the other hand, the revolting food over here is really killing me.