Dancer (software)

From Wikipedia, the free encyclopedia
Jump to: navigation, search
For the activity, see Dancer.
Dancer
Original author(s) Alexis Sukrieh
Stable release 1.3126 / July 15, 2014; 3 months ago (2014-07-15)
Written in Perl
Operating system Cross-platform
Type Web application framework
License GPL and PAL
Website www.perldancer.org

Dancer is an open source lightweight web application framework written in Perl and inspired by Ruby's Sinatra.

Dancer is developed through GitHub, with stable releases available via CPAN.

Example[edit]

#!/usr/bin/perl
use Dancer;
 
get '/hello/:name' => sub {
    return "Why, hello there " . params->{name};
};
 
get '/redirectMeTo/:trgval' => sub {
    redirect request->path_info('/' . params->{trgval});
};
 
dance;

History[edit]

Philosophy[edit]

Features[edit]

Out-of-box[edit]

Unlike other frameworks such as Catalyst, Dancer only requires a handful of CPAN modules and is very self-contained.

Standalone Development Server[edit]

Dancer includes a standalone development server that can be used for developing and testing applications.

PSGI / Plack support[edit]

Dancer supports the PSGI specification, and can thus be run on any compliant PSGI server, including Plack, uWSGI or Mongrel 2.

Abstracted[edit]

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[edit]

References[edit]

External links[edit]