The easiest way to write web applications with Perl (Perl web micro-framework)
Perl CSS
Pull request Compare This branch is 39 commits ahead, 344 commits behind PerlDancer:refactoring/script.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
examples/dancr deprecate layout May 8, 2011
script Moved script/dancer to Dancer::Object. Jul 26, 2011
t Fixed tests broken by the move to Dancer::Object. Jul 29, 2011
.current_cover_stats current conver stats Dec 23, 2010
.gitignore ignore mymeta.json Jul 9, 2011
.perlcriticrc Dancer::Plugin now uses Exporter to export symbols Sep 24, 2010
AUTHORS Added Niko May 30, 2011
CHANGES send_file send data Jul 15, 2011
MANIFEST update manifest file Jul 7, 2011
MANIFEST.SKIP Ignore emacs backup files May 16, 2011
Makefile.PL Remove Tie::Hash::NamedCapture May 31, 2011
README FIX URL for Sukria's blog Oct 29, 2010
TODO Add todo task... probably this should go to an issue later Jun 15, 2011



                  The easiest way to write a webapp with Perl                                    

=== ABOUT ===

This project is inspired by  Ruby's Sinatra framework: a framework for building
web applications with minimal effort, allowing a simple webapp to be created with
very few lines of code, but allowing the flexibility to scale to much more
complex applications.  Dancer supports plugins to add various extra
functionality you may want, whilst keeping the core streamlined.

=== NEWS === 

Dancer's development moves very quickly, to stay tuned follow PerlDancer on

See also Sukria's blog:

See also the project on Github for the latest changes:

To keep even more up to date and talk to the developers, join us in #dancer on (if you don't have an IRC client, use
for easy access).

=== EXAMPLE ===

To create a new Dancer application, use the helper script "dancer" provided
with this distribution:

    $ dancer -a mywebapp
    + mywebapp 
    + mywebapp/config.yml
    + mywebapp/views
    + mywebapp/views/layouts

You then have a new Dancer application in 'mywebapp', which is already a
functioning "Hello World" application, ready for you to work upon.

Here is an example of a webapp built with Dancer:


    use Dancer;

    get '/' => sub {
        "Hello There!"

    get '/hello/:name' => sub {
        "Hey ".params->{name}.", how are you?";

    post '/new' => sub {
        "creating new entry: ".params->{name};


When running this script, a webserver is running and ready to serve:    

    $ perl ./
    >> Listening on
    == Entering the development dance floor ...

Then it's possible to access any route defined in the script:

    $ curl http://localhost:3000/
    Hello There!

For a more in-depth example, see examples/dancr


Dancer depends on the following modules

    - HTTP::Server::Simple::PSGI
    - HTTP::Body
    - Exception::Class
	- MIME::Types
	- URI

Optional modules may be needed if you want to use some features (but are not 
required for a basic usage). 

Dependency-checks for additional features are performed at runtime.

Most common modules you may want are:

    - Template (for Template::Toolkit support)
    - YAML (for configuration files)
    - Plack (if you want to deploy your application with PSGI)


This is a work in progress.

Dancer supports PSGI/Plack, to run a Dancer app with PSGI/Plack just bootstrap
your application with the helper script `dancer' like the following:

	$ dancer -a MyWebApp

You'll find a file in there called `app.psgi', use this file to configure your
PSGI environment, as explained in the revelant documentation of your PSGI

For instance, with plackup, just do the following:

	$ plackup -a app.psgi

=== WEBSITE ===

For more details about the project, checkout the official website: or checkout the documentation at

See also the Github project page: for the latest


Bug reports are appreciated and will receive prompt attention - the preferred
method is to raise them using Github's basic issue tracking system:

=== CONTACT ===

You can reach the development team on IRC: irc:// or for a web-based IRC client.