summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2011-02-18 10:16:53 -0600
committerJesse Luehrs <doy@tozt.net>2011-02-18 11:52:22 -0600
commit1d7c03c912e1064edd8dfb293210a217aba48dd6 (patch)
tree71e8ebb97cef1dd7ddbb9a4a65bf0f41e2406aaf /lib
parent62a18e4d0e05f5d8ef18a7c25456213060e39521 (diff)
downloadnarwhal-1d7c03c912e1064edd8dfb293210a217aba48dd6.tar.gz
narwhal-1d7c03c912e1064edd8dfb293210a217aba48dd6.zip
use 'view' instead of 'page' for the action name
Diffstat (limited to 'lib')
-rw-r--r--lib/Narwhal.pm4
-rw-r--r--lib/Narwhal/Component/Wiki.pm4
-rw-r--r--lib/Narwhal/Component/Wiki/Edit.pm2
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/Narwhal.pm b/lib/Narwhal.pm
index 9c0f099..2b4cfa0 100644
--- a/lib/Narwhal.pm
+++ b/lib/Narwhal.pm
@@ -36,13 +36,13 @@ router as {
route '/' => 'redirect.permanent', (
to => '/page/main',
);
- route '/page/:page_name' => 'wiki.page', (
+ route '/page/:page_name' => 'wiki.view', (
page_name => { isa => 'Str' },
);
route '/edit/:page_name' => 'http-method:edit', (
page_name => { isa => 'Str' },
);
- route '/page/:page_name/:rev' => 'wiki.old_page', (
+ route '/page/:page_name/:rev' => 'wiki.view_old', (
page_name => { isa => 'Str' },
rev => { isa => qr/^[0-9a-f]{40}$/ },
);
diff --git a/lib/Narwhal/Component/Wiki.pm b/lib/Narwhal/Component/Wiki.pm
index ce1fbbf..f923261 100644
--- a/lib/Narwhal/Component/Wiki.pm
+++ b/lib/Narwhal/Component/Wiki.pm
@@ -3,7 +3,7 @@ use Moose;
with 'Narwhal::Component::Role::Wiki';
-sub page {
+sub view {
my $self = shift;
my ($req, $page_name) = @_;
@@ -31,7 +31,7 @@ sub page {
);
}
-sub old_page {
+sub view_old {
my $self = shift;
my ($req, $page_name, $rev) = @_;
diff --git a/lib/Narwhal/Component/Wiki/Edit.pm b/lib/Narwhal/Component/Wiki/Edit.pm
index 3631e84..101739e 100644
--- a/lib/Narwhal/Component/Wiki/Edit.pm
+++ b/lib/Narwhal/Component/Wiki/Edit.pm
@@ -56,7 +56,7 @@ sub post {
my $res = $req->new_response(303);
$res->location(
$req->uri_for({
- action => 'page',
+ action => 'view',
page_name => $page_name,
})
);