diff options
author | Jesse Luehrs <doy@tozt.net> | 2011-02-17 21:41:31 -0600 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2011-02-17 21:41:31 -0600 |
commit | a0c5a7ce958bf1f619b95f7b5235b1fddd43e961 (patch) | |
tree | 9fb5cdb459dfba46ba8036b70954f91d76fd9d71 | |
parent | 224898fb1fd3046fcb82461610d5dd3ff0d0b01f (diff) | |
download | narwhal-a0c5a7ce958bf1f619b95f7b5235b1fddd43e961.tar.gz narwhal-a0c5a7ce958bf1f619b95f7b5235b1fddd43e961.zip |
actually, only edit needs the special http method thing
-rw-r--r-- | lib/Narwhal.pm | 6 | ||||
-rw-r--r-- | lib/Narwhal/Component/Wiki.pm (renamed from lib/Narwhal/Component/Wiki/Page.pm) | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/Narwhal.pm b/lib/Narwhal.pm index 333ba89..aae8a25 100644 --- a/lib/Narwhal.pm +++ b/lib/Narwhal.pm @@ -12,7 +12,7 @@ config template_root => sub { component Redirect => 'Narwhal::Component::Redirect'; -component WikiPage => 'Narwhal::Component::Wiki::Page', ( +component Wiki => 'Narwhal::Component::Wiki', ( kioku => depends_on('/Component/Kioku'), tt => depends_on('/Component/TT'), ); @@ -36,7 +36,7 @@ router as { route '/' => 'redirect.permanent', ( to => '/page/main', ); - route '/page/:page_name' => 'page', ( + route '/page/:page_name' => 'wiki.page', ( page_name => { isa => 'Str' }, ); route '/edit/:page_name' => 'edit', ( @@ -44,7 +44,7 @@ router as { ); }, ( redirect => depends_on('/Component/Redirect'), - page => depends_on('/Component/WikiPage'), + wiki => depends_on('/Component/Wiki'), edit => depends_on('/Component/WikiEdit'), ); diff --git a/lib/Narwhal/Component/Wiki/Page.pm b/lib/Narwhal/Component/Wiki.pm index 8dd6adf..985e1af 100644 --- a/lib/Narwhal/Component/Wiki/Page.pm +++ b/lib/Narwhal/Component/Wiki.pm @@ -1,9 +1,9 @@ -package Narwhal::Component::Wiki::Page; +package Narwhal::Component::Wiki; use Moose; with 'Narwhal::Component::Role::Wiki'; -sub get { +sub page { my $self = shift; my ($req, $page) = @_; |