That wasn't quite enough to send me off to the land of nod though so I wrote Cal::DAV which is, err, a CalDAV client in Perl.
It's actually a pretty thin wrapper round Data::ICal and HTTP::DAV but at the very least it should stand as an entry point for anybody who searches for "CalDav + perl" and it's actually pretty much a drop in replacement for Data::ICal.
I had a slight problem in that the CalDAV server I was testing against (the Darwin Calendar Server from OSX) seemed to allow me to modify and delete files on the remote server but didn't seem to let me create new ones (either by uploading or by copying or moving existing files) and returned a 403 Forbidden).
I couldn't see anything wrong with the permissions (it happened even with the moral equivalent of a doing it as root) and it happened with two different CalDAV clients (dave and cadaver) so I'm pretty sure it's not just my code. I'm pretty stumped so if someone else out there is running a Darwin Server or could give me access on another type of CalDAV server then that'd be much appreciated.
Weirdly enough that didn't send me to sleep either so I finished off a book on the Foreign Legion, read The Last Temptation and got halfway through a book on the state
of British food before I conked out and woke up at 7:30 with the light still on.