Starting work on ILS dependent code
authorChris Cormack <chrisc@catalyst.net.nz>
Mon, 4 Nov 2013 22:21:28 +0000 (11:21 +1300)
committerChris Cormack <chrisc@catalyst.net.nz>
Mon, 4 Nov 2013 22:21:28 +0000 (11:21 +1300)
lib/NCIP/Configuration.pm
lib/NCIP/ILS/Koha.pm [new file with mode: 0644]
t/config_sample/NCIP.xml

index 1add3e3..a1d816a 100644 (file)
@@ -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 (file)
index 0000000..725f84a
--- /dev/null
@@ -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;
index 070580d..64caccd 100644 (file)
@@ -33,4 +33,6 @@
   <version>
   </version>
 
+  <ils value='Koha' />
+
 </acsconfig>