Testing command line apps with App::Cmd

Ricardo Signes' App::Cmd has been praised a lot so I gave it a try for my recent command line app. In summary, the module is great although I missed some minor features and documentation (reminder to all: if you miss some feature in a CPAN module, don't create yet another module but try to improve the existing one!). One feature I like a lot is how App::Cmd facilitates writing tests for command line apps. After having written a short wrapper around App::Cmd::Tester my formerly ugly unit tests look very simple and clean. Have a look at this example:

Another approach to XML processing

The buzz around XML has passed and we are left with a lot of Perl modules to process XML in different ways. I was surprised to still find a gap for another XML processing module.

Common schema-less approaches to XML processing in Perl seem to use XML-LibXML, to get a full XML DOM or a stream of parsing events, or XML::Simple (better used as XML::LibXML::Simple. XML::Simple transforms between XML and Perl data structures but it was designed for "data-oriented" XML where element order does not matter a lot. With XML::Struct I created something like XML::Simple for "document-oriented" XML.

The joy of PSGI middleware

I must admit that I rarely feel comfortable with (web application) frameworks - each system facilitates a certain type of task but it complicates the missing parts. Good frameworks support extension via plugins, but each framework has its own plugin architecture to learn. That's why I like PSGI so much - it only specifies how to connect things. This is how PSGI looks like to me (image CC-BY-SA by CMG Lee):

lego_dimensions.png

About Jakob

user-pic Research & Development at a German library union network.