Monday, 8 October 2007

The Beast Remade: Niceties, wrapping up

Text::Reform took care of the rest of the pretty-printing I needed. The Perl builtin "format" command was more familiar, but the listings would not come out right. I have a sneaking suspicion that it does not like UTF-8 STDOUT much. Text::Reform was easier to get right:

$menu_form = "<< "
."<<<<<<<<<<<<<<<<<<<<<<<<< "
."<<<<<<<<<<<<<<<<<<<<<<<<< "

print form $menu_form, $index, $from, $to, $subject;

Some manual command-line parsing were needed, in order to do labor-saving speedups like "rm 1-7,17". I expect everyone reinvents that sort of thing at need.

Wrapping up

All this was wrapped up in a two-day hack that saves some time and much aggravation.

I would like to see someone do a similar command-line stunt for interacting with an AJAX web application. Consider this a dare, fellow hacker. I'll owe you a beverage of your choice next time we meet.

No comments: