From: Jason Stephenson Date: Sun, 26 Oct 2014 17:21:06 +0000 (-0400) Subject: Get NCIP configuration directory from the environment. X-Git-Url: https://git.evergreen-ils.org/?p=working%2FNCIPServer.git;a=commitdiff_plain;h=2b930e0746a6d45fbd5bc3443d5173e877173de6 Get NCIP configuration directory from the environment. Signed-off-by: Jason Stephenson --- 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;