summaryrefslogtreecommitdiffstats
path: root/lib/Narwhal/Component/Wiki.pm
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2011-02-17 23:43:35 -0600
committerJesse Luehrs <doy@tozt.net>2011-02-17 23:43:35 -0600
commit2d2750b4c40f4ec2016b61ee244cb435b6e9a4e8 (patch)
treedf6b0f39039c7d586219f2c46cc78d6e1bf7123c /lib/Narwhal/Component/Wiki.pm
parent58a447a99980b9921d498444a72f1705823a049e (diff)
downloadnarwhal-2d2750b4c40f4ec2016b61ee244cb435b6e9a4e8.tar.gz
narwhal-2d2750b4c40f4ec2016b61ee244cb435b6e9a4e8.zip
flesh out the data model a bit
Diffstat (limited to 'lib/Narwhal/Component/Wiki.pm')
-rw-r--r--lib/Narwhal/Component/Wiki.pm12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/Narwhal/Component/Wiki.pm b/lib/Narwhal/Component/Wiki.pm
index 985e1af..e2a8ea7 100644
--- a/lib/Narwhal/Component/Wiki.pm
+++ b/lib/Narwhal/Component/Wiki.pm
@@ -5,18 +5,20 @@ with 'Narwhal::Component::Role::Wiki';
sub page {
my $self = shift;
- my ($req, $page) = @_;
+ my ($req, $page_name) = @_;
- my $page_obj = $self->lookup("page:$page");
+ my $page = $self->lookup("page:$page_name");
return $req->new_response(404)
- unless $page_obj;
+ unless $page;
$self->render(
$req,
'page.tt',
{
- text => $page_obj->text,
- page => $page,
+ page => $page_name,
+ text => $page->text,
+ author => $page->author,
+ modified => $page->modification_date,
},
);
}