The Dancer release that will get you hooked!
I've been waiting for this blog post for a few good months now.
We've finally released Dancer 1.3050 (codename "The Captain Hook Adventure", named after Franck Cuny, who will forever be known as Captain Hook!) which carries our new hook system, written by Franck. Special credit goes to JT Smith who pushed the design and implementation of this system (and had great input and feedback) until it saw sunlight.
So what's the new hook system? Basically Dancer (and Sinatra, and Flask, and others) have a
after modifiers (or sometimes called "filters"), which are basically hooks for running code before and/or after your request has been handled. This is a good place for running checks, auth-related stuff and special logging or whatnot.
While these hooks were very useful for people, they weren't enough. People needed more. For example you might want to override the error handler, or perhaps to add special data before a auto-serialization process. Hell, maybe you want to even create your own hooks! :)
This is now all possible!
(and if you see Franck or JT at a conference, feel free to get them a beverage of their choice :)