From 78be35490427c3ed7de1a6b2f1ab9865aa258c9c Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Mon, 30 Dec 2013 14:42:19 +1300 Subject: [PATCH] Got the dancer app working now --- lib/NCIP/Dancing.pm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/NCIP/Dancing.pm b/lib/NCIP/Dancing.pm index 0a6192a..900c9e2 100644 --- a/lib/NCIP/Dancing.pm +++ b/lib/NCIP/Dancing.pm @@ -3,8 +3,18 @@ use Dancer ':syntax'; our $VERSION = '0.1'; -get '/' => sub { - template 'index'; +use NCIP; + + +any ['get', 'post'] => '/' => sub { + my $ncip = NCIP->new('t/config_sample'); + my $xml = param 'xml'; + warn $xml if $xml; + my $content = $ncip->process_request($xml); + # warn $content; + template 'main', { content => $content }; + + # warn "what"; }; true; -- 2.11.0