Quantcast
Channel: OpenSwartz
Browsing latest articles
Browse All 19 View Live

The inevitable Tie::CHI

Despite its lofty martial-arts name, Tie::CHI is a simple module that allows you to tie a hash to a persistent CHI cache, using any of CHI’s backends. I hardly ever choose Tie interfaces — too much...

View Article



Stop running tests on install!

chromatic shows users how to run tests faster on cpanm and perlbrew installs. This strikes me as well-meaning advice that misses a much more basic point: cpanm and perlbrew should not run tests by...

View Article

Many CHI caches, one configuration

At work we have over 200 modules and Mason components that use CHI to cache some data or HTML. Each has its own distinct namespace to prevent collisions. Each namespace uses one of several different...

View Article

Poet: a web framework for Mason

I’m pleased to announce Poet, a modern Perl web framework designed especially for Mason developers. Features include: A common-sense directory hierarchy for web development A configuration system that...

View Article

Memoize: Revisiting a twelve year old API

Memoization is a technique for optimizing a function over repeated calls. When you call the function, the return value is cached (based on the arguments passed) before being returned to you. Next time...

View Article


Image may be NSFW.
Clik here to view.

Normalizing function arguments for memoization

I’ve been searching for the best way to normalize an argument list to a string, such that two argument lists convert to the same string iff they are equivalent. My ideal algorithm would Compare...

View Article

Controlling Nginx and Starman with Server::Control

Lately I’ve become a big fan of the Nginx + Starman combination for Perl-based web development. mod_perl has served me well for fifteen years, but with Plack/PSGI replacing the mod_perl API, it makes...

View Article

Image may be NSFW.
Clik here to view.

One tidier to rule them all

I’m an avid user of code tidiers and validators to enforce quality and consistent style, both in personal and team projects. In the Perl world you are probably familiar with perltidy, perlcritic and...

View Article


Image may be NSFW.
Clik here to view.

Tidying and checking code on commit

Tools like perltidy and perlcritic are great for cleaning and validating code, but how do you ensure they get run consistently? One way is to add an enforcement check at commit time. That is, don’t...

View Article


At long last, masontidy

Mason finally has a tidier: masontidy. It runs perltidy on the various sections of Perl code embedded in Mason components. It works on both Mason 1 and Mason 2 syntax. One nice trick is that it indents...

View Article
Browsing latest articles
Browse All 19 View Live




Latest Images