From d1d2b56031abcdecfb8fb3c19411561552069de7 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Tue, 5 Nov 2013 11:21:28 +1300 Subject: [PATCH] Starting work on ILS dependent code --- lib/NCIP/Configuration.pm | 6 +++++- lib/NCIP/ILS/Koha.pm | 20 ++++++++++++++++++++ t/config_sample/NCIP.xml | 2 ++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 lib/NCIP/ILS/Koha.pm diff --git a/lib/NCIP/Configuration.pm b/lib/NCIP/Configuration.pm index 1add3e3..a1d816a 100644 --- a/lib/NCIP/Configuration.pm +++ b/lib/NCIP/Configuration.pm @@ -30,7 +30,7 @@ package NCIP::Configuration; =cut use Modern::Perl; - +use Module::Load; use NCIP::Configuration::Service; use base qw(Config::Merge); @@ -52,6 +52,10 @@ sub new { $listeners{ lc $service->{'port'} } = $serv_object; } $self->{'listeners'} = \%listeners; + my $module = 'NCIP::ILS::'.$self->('NCIP.ils.value'); + load $module; + my $ils = $module->new(); + $self->{'ils'}=$ils; return $self; } diff --git a/lib/NCIP/ILS/Koha.pm b/lib/NCIP/ILS/Koha.pm new file mode 100644 index 0000000..725f84a --- /dev/null +++ b/lib/NCIP/ILS/Koha.pm @@ -0,0 +1,20 @@ +# +#=============================================================================== +# +# FILE: Koha.pm +# +# DESCRIPTION: +# +# FILES: --- +# BUGS: --- +# NOTES: --- +# AUTHOR: Chris Cormack (rangi), chrisc@catalyst.net.nz +# ORGANIZATION: Koha Development Team +# VERSION: 1.0 +# CREATED: 05/11/13 11:14:09 +# REVISION: --- +#=============================================================================== + +use Modern::Perl; + +1; diff --git a/t/config_sample/NCIP.xml b/t/config_sample/NCIP.xml index 070580d..64caccd 100644 --- a/t/config_sample/NCIP.xml +++ b/t/config_sample/NCIP.xml @@ -33,4 +33,6 @@ + + -- 2.11.0