Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 86 lines (51 sloc) 2.385 kb
42ba47f TODO updates:
Alexis Sukrieh authored
1 * Route caching support
2
3 When a path is firstly resolved through the route tree, we should
4 cache the result for future calls.
5
6 The path would be the cache key, the first route the value.
7
8 1 - GET / -> first call, so browse the route tree
9 2 - GET / -> second call, return cache('/');
10
6168e14 Dancer::Route->call now returns an object with 'head' and 'body', so we ...
Alexis Sukrieh authored
11 * Conditions support for route matching:
12
13 get '/foo', {agent => 'Songbird (\d\.\d)[\d\/]*?'} => sub {
14 ...
15 };
16
a91b647 add more info in TODO: template rendering, static files and helpers supp...
Alexis Sukrieh authored
17
18 render should then use a template system for rendering the view
19 located in $views_directory/index.tpl with $stuff data
20
4527e4e add an item in TODO about the current action-runing mechanism, which is ...
Alexis Sukrieh authored
21 * Template rendering support
22
23 get '/' => sub {
24 ...
25 render index => $stuff;
26 };
27
a91b647 add more info in TODO: template rendering, static files and helpers supp...
Alexis Sukrieh authored
28 Templates are assumed to be located directly under the ./views directory. To
29 use a different views directory:
30
31 set views => dirname(__FILE__) . '/templates'
32
33 * Helper support
42ba47f TODO updates:
Alexis Sukrieh authored
34
a91b647 add more info in TODO: template rendering, static files and helpers supp...
Alexis Sukrieh authored
35 We should provide a way to define helpers, that are basically, methods
36 accessible from the action code blocks.
42ba47f TODO updates:
Alexis Sukrieh authored
37
57cb5a5 first attempt at writing filters (before)
Alexis Sukrieh authored
38 Well, this is certainly useless in Perl (whereas it's not in Ruby) because
39 any sub defined would be accessible....
40
41
efab767 new items in TODO: mime-types, environment and error handlers
Alexis Sukrieh authored
42 * Error handler support
43
44 Could be interesting to have a real error handler mechanism instead of the
45 single `Dancer::Renderer->render_error' method.
46
47 * Helper for rendering a static file within an action
48
49 Once the helper system is ready, we could add one for letting the user
50 render a static file, from an action, like that:
51
52 get '/download/*' => sub {
53 my $params = shift;
54 my ($file) = @{ $params->{splat} };
55
56 send_file $file;
57 };
58
59 * Mime Types configuration
60
61 The user should be able to choose specific mime-type per file extensions, if
62 he doesn't like the one Dancer finds when serving a static file.
63
64 mime_type foo => 'text/foo';
65
66 This would tell to serve any file matching '*.foo' as a 'text/foo' content.
67
68 * Environment support
69
70 It should be possible to run a Dancer server with a specific environment,
71 like development or production.
72
73 This could be done like the following:
74
75 $ ./my-dancer-app.pl --environment=development (which would be the default)
76
77 Then the script appdir/environments/development.pl would be loaded.
78
79 It could contain the following information:
80
81 # a bunch of settings
82 setting access_log => 1;
83 setting verbosity => 1;
84
85
Something went wrong with that request. Please try again.