From ea7f636b82c79b00eb75d5b062bd2c2816821d8d Mon Sep 17 00:00:00 2001 From: "Alex \"AdUser\" Z" Date: Tue, 28 Oct 2014 16:41:22 +1000 Subject: [PATCH] * zerobin : tweak routes --- lib/LDV.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/LDV.pm b/lib/LDV.pm index 190af1f..07186c3 100644 --- a/lib/LDV.pm +++ b/lib/LDV.pm @@ -28,8 +28,8 @@ sub startup { my $zb = $r->route('/zerobin2') -> to(controller => 'zerobin'); $zb->post('/') -> to(action => 'save'); $zb->get('/') -> to(action => 'create'); - $zb->get('/:id', id => qr/[0-9a-f]{8}/) - -> to(action => 'view'); + $zb->route('/:id', id => qr/[0-9a-f]+/) + ->via('GET') -> to(action => 'view'); } 1;