diff --git a/lib/LDV.pm b/lib/LDV.pm index 6747490..37e9a56 100644 --- a/lib/LDV.pm +++ b/lib/LDV.pm @@ -41,7 +41,7 @@ sub startup { my $comm = $r->route('/comments') -> to(controller => 'comments'); $comm->post('/add') ->to(action => 'add'); $comm->get ('/get') ->to(action => 'get'); - $comm->get ('/new') ->to(action => 'new'); + $comm->get ('/new') ->to(action => 'create'); mkdir $self->app->home->rel_dir('data/comments'); } diff --git a/lib/LDV/Comments.pm b/lib/LDV/Comments.pm index 7ad3881..3dbe34f 100644 --- a/lib/LDV/Comments.pm +++ b/lib/LDV/Comments.pm @@ -98,7 +98,7 @@ sub get { $self->rendered(); } -sub new { +sub create { my ($self) = @_; eval {