From 2b930e0746a6d45fbd5bc3443d5173e877173de6 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Sun, 26 Oct 2014 13:21:06 -0400 Subject: [PATCH] Get NCIP configuration directory from the environment. Signed-off-by: Jason Stephenson --- lib/NCIP/Dancing.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/NCIP/Dancing.pm b/lib/NCIP/Dancing.pm index f42fe8e..108daaa 100644 --- a/lib/NCIP/Dancing.pm +++ b/lib/NCIP/Dancing.pm @@ -5,9 +5,11 @@ our $VERSION = '0.1'; use NCIP; +my $conf_dir = $ENV{'NCIP_CONFIG_DIR'} || 't/config_sample'; + any [ 'get', 'post' ] => '/' => sub { content_type 'application/xml'; - my $ncip = NCIP->new('t/config_sample'); + my $ncip = NCIP->new($conf_dir); my $xml = param 'xml'; if ( request->is_post ) { $xml = request->body; -- 2.43.2