For faster navigation, this Iframe is preloading the Wikiwand page for Dancer (software).

Dancer (software)

Dancer
Original author(s)Alexis Sukrieh
Initial releaseJuly 27, 2009 (2009-07-27)
Stable release
0.400001 [1] / 2023-02-05[±]
RepositoryDancer Repository
Written inPerl
Operating systemCross-platform
TypeWeb application framework
LicenseGPL and PAL
Websitewww.perldancer.org
Logo

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.[2] Development of Dancer1 was at first frozen, but was later continued to maintain backward compatibility for existing apps.[3]

Dancer is developed through GitHub, with stable releases available via CPAN. Dancer2 is released as a separate module.

Example

#!/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.

See also

References

  1. ^ "Dancer2 Releases". perldancer.org. Retrieved 2023-08-30.
  2. ^ "All About Dancer - In Conversation With Sawyer X Part 2".
  3. ^ "Dancer 1 and Dancer 2, what we're going to do". Archived from the original on 2015-01-20. Retrieved 2015-01-20.
{{bottomLinkPreText}} {{bottomLinkText}}
Dancer (software)
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?