Chapter 37. Just Another Perl Haiku

Damian Conway

I often think of Perl programs as the haiku of the software world. Both are compact, dense, powerful, and frequently a little obscure. So it’s no surprise that haiku are popular with Perl programmers. Even so, I had no idea how popular, until I wrote Coy. What is Coy? Let me quote from the docs you’ll find with this CPAN module.         Error messages         strewn across my terminal.         A vein starts to throb.         Their reproof adds the         injury of insult to         the shame of failure.         When a program dies         what you need is a moment         of serenity.         The Coy.pm         module brings tranquility         to your debugging.         The module alters         the behavior of die and         warn (and croak and carp ).         Like Carp.pm,         Coy reports errors from the         caller’s point of view.         But it prefaces         the bad news of failure with         a soothing poem.

The Tao of Haiku

A haiku is a short poem that’s 17 syllables in length. Traditionally, its topic is an image taken from nature (though the Japanese understanding of “nature” is subtle and broad). True haiku don’t try to make a point; they merely convey an image. Of course, the image itself may make a point, but that’s not the same thing! The form developed in the 1600’s from the longer tanka. In fact, a haiku is the hokku(the “starting verse”) of a tanka. The first adept of the haiku format was the ...

Get Games, Diversions & Perl Culture now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.