July 2012 Archives

Introducing Class::ConfigHash

A while ago I saw a post by Ovid on boxing hashes for configuration in Dancer. The idea seemed pretty neat, and I found myself doing something similar in some work for Net-A-Porter, so I wrote a generalized implementation (although the underlying mechanism is different). From the synopsis:

my $config = Class::ConfigHash->_new({
   database => {
       user => 'rodion',
       pass => 'bonaparte'…

About Peter Sergeant

user-pic I blog about Perl.