Dancer – A perl web framework

October 29, 2012

Dancer is a very lightweight yet powerful web framework written in perl. Its objective is to be simple and minimal. Over a period of ten years I have developed lot of desktop applications in perl/tk. Its about 3 lakh lines. Now is the time to giveup desktop based applications and move on to web based. I have been evaluating many cms and frameworks. Most of them are heavy and gives you less flexibility. What I wanted was simple one which let’s me decide what I should do. Catalyst framework seems to be good but I found it to be to heavy both to learning and to develop. When I found dancer, I was quite satisfied. I have deployed few small applications with it and have no major issues.

What I liked about dancer was its route handling. You can simply map routes to subroutines and take care of all business logic and processing in the subs/modules you write. Few of the important features are

1. Good route handling
2. Template support like template-toolkit
3. Plugin architecture with lot of plugins already available
4. Session managment
5. Support to Plack/PSGI

Here is a simple piece of hello world

use Dancer;

get '/hello/:name' => sub {
return "Why, hello there " . param('name');


You can run this code like


And then pointing browser to localhost:3000/raman will return ‘Why, hello there raman’.

Dancer is under heavy development. Version 2.0 will be released soon.

You can see more details at