Permalink
Browse files

Remove auto_page setting code which adds /:page route.

There's a far better way coming in the next few commits.
  • Loading branch information...
1 parent c0f1c33 commit 90a7ec13dd812d4f61081bd7b86b882c274f4e3b @bigpresh bigpresh committed Feb 15, 2012
Showing with 0 additions and 17 deletions.
  1. +0 −17 lib/Dancer/Config.pm
View
@@ -54,23 +54,6 @@ my $setters = {
my ($setting, $value) = @_;
$^W = $value ? 1 : 0;
},
- auto_page => sub {
- my ($setting, $auto_page) = @_;
- if ($auto_page) {
- require Dancer::App;
- Dancer::App->current->registry->universal_add(
- 'get', '/:page',
- sub {
- my $params = Dancer::SharedData->request->params;
- if (-f Dancer::engine('template')->view($params->{page})) {
- return Dancer::template($params->{'page'});
- } else {
- return Dancer::pass();
- }
- }
- );
- }
- },
traces => sub {
my ($setting, $traces) = @_;
$Dancer::Exception::Verbose = $traces ? 1 : 0;

0 comments on commit 90a7ec1

Please sign in to comment.