1Dancer2::Handler::AutoPUasgeer(3C)ontributed Perl DocumeDnatnacteiro2n::Handler::AutoPage(3)
2
3
4
6 Dancer2::Handler::AutoPage - Class for handling the AutoPage feature
7
9 version 0.207000
10
12 The AutoPage feature is a Handler (turned off by default) that is
13 responsible for serving pages that match an existing template. If a
14 view exists with a name that matches the requested path, Dancer2
15 processes the request using the Autopage handler.
16
17 To turn it add to your config file:
18
19 auto_page: 1
20
21 This allows you to easily serve simple pages without having to write a
22 route definition for them.
23
24 If there's no view with the name request, the route passes, allowing
25 other matching routes to be dispatched.
26
28 register
29 Creates the routes.
30
31 code
32 A code reference that processes the route request.
33
34 methods
35 The methods that should be served for autopages.
36
37 Default: head, get.
38
39 regexp
40 The regexp (path) we want to match.
41
42 Default: /:page.
43
45 Dancer Core Developers
46
48 This software is copyright (c) 2018 by Alexis Sukrieh.
49
50 This is free software; you can redistribute it and/or modify it under
51 the same terms as the Perl 5 programming language system itself.
52
53
54
55perl v5.28.1 2018-11-14 Dancer2::Handler::AutoPage(3)