Dancer (software)

Web framework
title: "Dancer (software)" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["free-software-programmed-in-perl", "software-using-the-gnu-general-public-license", "web-frameworks"] description: "Web framework" topic_path: "technology/web" source: "https://en.wikipedia.org/wiki/Dancer_(software)" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0
::summary Web framework ::
::data[format=table title="Infobox software"]
| Field | Value |
|---|---|
| name | Dancer |
| logo | Dancer logo.png |
| author | Alexis Sukrieh |
| released | |
| latest release version | |
| latest release date | |
| programming language | Perl |
| operating system | Cross-platform |
| genre | Web application framework |
| license | GPL and PAL |
| website | |
| :: |
::callout[type=note] the web framework ::
| name = Dancer | logo = Dancer logo.png | screenshot = | caption = | collapsible = | author = Alexis Sukrieh | released = | latest release version = | latest release date = | latest preview version = | latest preview date = | programming language = Perl | operating system = Cross-platform | platform = | size = | language = | genre = Web application framework | license = GPL and PAL | website =
Dancer is an open source lightweight web application framework written in Perl and inspired by Ruby's Sinatra.
In April 2011, Dancer was rewritten from scratch and released as Dancer2. The reason for the rewrite was to fix architectural issues and eliminate the use of singletons. Development of Dancer1 was at first frozen, but was later continued to maintain backward compatibility for existing apps.
Dancer is developed through GitHub, with stable releases available via CPAN. Dancer2 is released as a separate module.
Example
::code[lang=perl] #!/usr/bin/env perl use Dancer2;
get '/hello/:name' => sub { return "Why, hello there " . route_parameters->get('name'); };
get '/redirectMeTo/:trgval' => sub { redirect '/' . route_parameters->get('trgval'); };
start; ::
Features
Out-of-box
Unlike other frameworks such as Catalyst, Dancer only requires a handful of CPAN modules and is very self-contained.
Standalone development server
Dancer includes a standalone development server that can be used for developing and testing applications.
PSGI / Plack support
Dancer supports the PSGI specification, and can thus be run on any compliant PSGI server, including Plack, uWSGI or Mongrel 2.
Abstracted
Since most parts of Dancer are abstracted and has a plugin architecture, extending Dancer is fairly straightforward, and a thriving community has sprung up around building these extensions.
Dancer features a lightweight object system, exception throwing similar to Try::Tiny, and is fast, especially in CGI environments.
References
References
- "All About Dancer - In Conversation With Sawyer X Part 2".
- "Dancer 1 and Dancer 2, what we're going to do".
::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::