sukria / Dancer

Minimal-effort oriented web application framework for Perl (port of Ruby's Sinatra)

This URL has Read+Write access

Dancer /
name age message
file .gitignore Thu Oct 15 09:28:02 -0700 2009 ignoring sessions [sukria]
file .perltidyrc Fri Sep 25 10:21:01 -0700 2009 perltidyrc [sukria]
file AUTHORS Thu Oct 08 08:07:54 -0700 2009 add myself to AUTHORS :) [damog]
file CHANGES Fri Nov 20 03:04:56 -0800 2009 CHANGES for 1.000 [sukria]
file MANIFEST Wed Sep 30 23:35:30 -0700 2009 adding a MANIFEST file [sukria]
file Makefile.PL Fri Oct 23 04:30:57 -0700 2009 Generic Template support The Template module ... [sukria]
file README Tue Sep 22 23:47:36 -0700 2009 README fixes [sukria]
file ROADMAP Sat Oct 24 12:01:08 -0700 2009 Cookie support is done [sukria]
file TODO Sat Oct 17 11:47:23 -0700 2009 TODO updates * No more session support (it's... [sukria]
directory example/ Sun Sep 27 04:05:07 -0700 2009 look for $req->script_name and use it in path r... [sukria]
directory lib/ Mon Dec 28 15:42:57 -0800 2009 update list of supported engines in Dancer::Ses... [sukria]
directory script/ Tue Dec 22 01:02:19 -0800 2009 script/dancer now print usage and exits when ca... [sukria]
directory t/ Mon Dec 28 16:31:29 -0800 2009 tests for Dancer::Session::Cookie [sukria]
README
                                    Dancer

                  The easiest way to write a webapp with Perl                                    

=== ABOUT ===

That project intends to become a port of Ruby's Sinatra framework: a framework
for building web application with minimal-effort in mind.

The user should be able to define a webapp with very few lines of codes.

=== NEWS === 

Dancer's development moves very fast, to stay tuned follow 
sukria on Twitter: http://twitter.com/sukria

=== 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 have then a new Dancer application in 'mywebapp'.

Here is an example of a webapp built with Dancer:

    # webapp.pl
    #!/usr/bin/perl

    use Dancer;

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

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

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

    Dancer->dance;

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

    $ perl ./webapp.pl
    >> Listening on 127.0.0.1:1915
    == Entering the dance floor ...

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

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


Feel free to fork that project if you like the idea and want to add some
features.


=== DEPENDENCIES ===

Dancer depends on the following modules

    - HTTP::Server::Simple
    - File::MimeInfo
    - Template

=== PRODUCTION MATTERS ===

This is a work in progress.

Dancer supports PSGI/Plack, to run a Dancer app with PSGI/Plack
See
http://www.sukria.net/fr/archives/2009/09/20/mounting-a-dancer-app-into-apache-psgiplack/

=== WEBSITE ===

For more details about the project, checkout the official website:
http://dancer.sukria.net