Catalyst::Model::FormFu has just hit CPAN. It is an experimental alternative interface to HTML::FormFu for Catalyst and its main puprpose is to provide improved performance over the existing Catalyst::Controller::HTML::FormFu. It parses the form configuration files and loads form objects during application startup, and then returns clones of these objects inside your actions. It is hard to evaluate precisely the performance boost that this provides (disk access speed will vary, and there is always the Catalyst overhead), but my crude benchmarks indicate that you can expect a form object to be loaded at least twice as fast when using Catalyst::Model::FormFu.

Posted in Modules | Full Article and Comments

MooseX::Params Usage Examples

MooseX::Params (my experiment in parameter processing) has undergone some changes and only the the attributes-based interface has been left now. Here are some examples from the synopsis of how it works. Most of them have been adapted from the Moose manual and the subroutines chapter of Gabor Szabo's Perl 6 tutorial.

Posted in Modules | Full Article and Comments

The Parameter Apocalypse, Take 2

This is a follow-up to my previous post at

After experimenting with a lot of different ways to tackle method and parameter declaration, I think I have finally settled on an attributes-based interface that makes for a decent compromise between usability and compatibility. The examples blow describe the proposed interface. Note that only the :Args attribute is currently implemented.

Posted in Modules | Full Article and Comments

MooseX::Params on CPAN

An alpha versin of MooseX::Params, described in my previous post, is already on CPAN. MooseX::Params is an attempt to rethink parameter processing and function declaration in Perl. The current release implements the three main objectives: a meta protocol, parameters with lazy builders, and access to processed parameters via the %_ hash.

Posted in Modules | Full Article and Comments

My Perl 5.16 Parameter Processing Apocalypse

Change is happening and excitement is in the air. Perl 5.16 is gearing up to be a very inetersting release. And the one area where discussion is most heated is the last bastion of anti-modern Perl: method declarations and signatures.

Posted in Modules | Full Article and Comments

HTML::FormFu, The Missing Manual

HTML::FormFu is a fantastic library for managing web forms. It is a very flexible framework to create and validate forms, and it also provides powerful tools to fetch and update form data from and into a database. Having already used it for a number of application at $work (in conjunction with Catalyst and DBIx::Class), I have been truly amazed by the improvement it has brought in terms of both speed of development and clarity of code.

Posted in Modules | Full Article and Comments

pmhack, podpreview, rcsync

I finally got to package some of my automation scripts as proper distributions and upload them to CPAN in the hope that somebody else may find them useful too.



pmhack Some::Module::Name
Posted in Modules | Full Article and Comments

Perldoc for Vim, Now in Color!

Vim being one of the most commonly used programming editors by the nerds that perl programmers are, it has quite a few scripts allowing you to read module documentation straight from within Vim itself. All of them, however, just grab the output of the 'perldoc' command and place it in a plain text buffer. PERLDOC2 does a similar job, but with a twist - it adds syntax coloring to make reading documentation easier and more convenient. Check out these screenshots:

Posted in Modules | Full Article and Comments

Data::AsObject Released - Data Structures Made Easy

Perl is notorious for its punctuation-ridden syntax, and if there is one place where this is manifested most obviously, it is when working with data structures. While I myself can see the beauty behind the line noise and have nothing against the syntax per se, it sometimes feels there are just too many characters to type. In particular, I have recently had to do a lot of work with XML data represented by perl hashes, via XML::TreePP and XML::Compile. Working with the data structures generated by these modules can quickly become pretty painful.

Posted in Modules | Full Article and Comments