                                TODO

            
            This is the roadmap of upcoming developments


* Route caching support

    When a path is firstly resolved through the route tree, we should
    cache the result for future calls.

    The path would be the cache key, the first route the value.

        1 - GET / -> first call, so browse the route tree
        2 - GET / -> second call, return cache('/');

* Conditions support for route matching: 

    get '/foo', {agent => 'Songbird (\d\.\d)[\d\/]*?'} => sub {
        ...
    };

* Helper script

    We need an helper script for providing a bootstraping method for 
    creating new applications.

    The helper script should be named dancer, and would be usable
    like the following:

    $ dancer --help
    dancer - helper script for bootstraping Dancer web applications

    Usage: dancer [options] <appname>
    Create the directory `appname' according to the given options.

    Options:

    --template     create a views directory and make sure
                   Template is installed.
    
    Here is the output of the command:

    $ dancer --template /srv/webapps/myblog
    + creating /srv/webapps/myblog
    + creating /srv/webapps/myblog/public
    + creating /srv/webapps/myblog/public/errors
    + creating /srv/webapps/myblog/public/errors/500.html
    + creating /srv/webapps/myblog/public/errors/404.html
    + creating /srv/webapps/myblog/public/errors/503.html
    + creating /srv/webapps/myblog/public/css
    + creating /srv/webapps/myblog/public/css/style.css
    + creating /srv/webapps/myblog/views
    + creating /srv/webapps/myblog/views/layouts
    + creating /srv/webapps/myblog/views/layouts/main.tt
    + creating /srv/webapps/myblog/myblog-server.pl
    + creating /srv/webapps/myblog/environment.pl
    + creating /srv/webapps/myblog/environments/
    + creating /srv/webapps/myblog/environments/production.pl
    + creating /srv/webapps/myblog/environments/development.pl


* Error handler support

    It should be possible to handle errors in two different ways.
    - detailed: when an error occurs, Dancer renders a page with as
      many details as it can concerning the error
    - hidden: when an error occurs, a generic page is sent to the
      user describing the kind of error. This is done with a
      send_file statement, using views/error/ERRCODE.html

    These error rendering modes should be set through the
    'errors' setting :

    set errors => detailed;

    or

    set errors => hidden;

* Session support

    We need a way to support web session in the easiest way possible.

    Maybe something like that:

    set session => true; # enable the session engine

    get '/login' => sub {
       template 'login' 
    };

    post '/login' => sub {
        my $user = User->authenticate(params->{login}, params->{password});

        if ($user) {
            session user_id => $user->id;
        }
        else {
            var error => "Bad credentials";
            pass;
        }
    };

    Then the key 'user_id' should be accessible in other requests:

    before => sub {
        if (not session->{user_id}) {
            var error => "Must be authenticated";
            request->path_info('/error');
        }
        else {
            var user => User->find(session->{user_id});
        }
    };

    get '/home' => sub {
        "Hello ".vars->{user}->name
    };

