Created: 2011-07-15 11:13
Updated: 2014-09-08 22:50

Learning to Dance

A tutorial at YAPC::EU 2011 on using Dancer.

In this lesson you'll be implementing a website for accessing an airport search engine based on Dancer.

Doing the exercises you'll learn how Dancer is used, and how the code should be structured to make a site easy to change and maintain.

Teacher: Andrew Solomon Teaching Assistants: Adam Taylor, Liz Goldstein

What's Dancer?

Dancer is a micro 'web framework' - a toolkit for developing a dynamic web application. It is inspired by the Ruby framework, Sinatra.


  • Basic Perl knowledge
  • Basic HTML/HTTP knowledge


  • Bring a laptop with Perl installed

  • Install Task::Dancer (somewhat large) or install Dancer and Dancer::Template::TemplateToolkit

  • Install Data::Types

  • Either checkout a copy of this talk git clone git://

  • Or download and untar/unzip from the 'Downloads' button

  • Open the slides with your browser: README.www/ README.www/ README.www/

  • Check that everything works:

$ cd YAPC2011DancingLesson/solutions/part2/airport-toolkit
$ ./bin/search_airports --matching syd

If it doesn't run, install any prerequisites we forgot!


Do your exercises in the directories


and if you get stuck, you'll find solutions in


Paths to take

The lesson is divided into two sections:

This provides you with the basic toolkit of skills for implementing a web site.

This is where the interface to the search engine is implemented. If you just want to cut to the chase, you can skip some of the exercises as follows:

(Quick and) Dirty Dancing

  • Part 1: Ex 1 - 4, 6, 8
  • Part 2: Ex 1 - 4
Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more