LP#1729620: (follow-up) move OpenILS::WWW::OAI
authorGalen Charlton <gmc@equinoxOLI.org>
Fri, 24 Sep 2021 16:45:10 +0000 (12:45 -0400)
committerJane Sandberg <sandbergja@gmail.com>
Mon, 28 Mar 2022 02:57:42 +0000 (19:57 -0700)
Move the module to Open::WWW::SuperCat::OAI, matching other
record export and feed modules.

Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Jane Sandberg <sandbergja@gmail.com>

Open-ILS/examples/apache_24/eg_vhost.conf.in
Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm
Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat/OAI.pm [moved from Open-ILS/src/perlmods/lib/OpenILS/WWW/OAI.pm with 98% similarity]

index d62ca3b..aed61b6 100644 (file)
@@ -91,7 +91,7 @@ OSRFTranslatorConfig @sysconfdir@/opensrf_core.xml
 # Uncomment this section to enable the OAI2 provider service.
 #<Location /opac/extras/oai>
 #    SetHandler perl-script
-#    PerlHandler OpenILS::WWW::OAI
+#    PerlHandler OpenILS::WWW::SuperCat::OAI
 #    Options +ExecCGI
 #    PerlSendHeader On
 #    Require all granted
index 2728f36..a522803 100644 (file)
@@ -24,6 +24,7 @@ use Encode;
 use Unicode::Normalize;
 use OpenILS::Utils::Fieldmapper;
 use OpenILS::WWW::SuperCat::Feed;
+use OpenILS::WWW::SuperCat::OAI;
 use OpenSRF::Utils::Logger qw/$logger/;
 use OpenILS::Application::AppUtils;
 use OpenILS::Utils::TagURI;
@@ -279,6 +280,9 @@ sub child_init {
             }
         }
     }
+
+    OpenILS::WWW::SuperCat::OAI::child_init();
+
     return Apache2::Const::OK;
 }
 
@@ -1,4 +1,4 @@
-# OpenILS::WWW::OAI manages OAI2 requests and responses.
+# OpenILS::WWW::SuperCat::OAI manages OAI2 requests and responses.
 #
 # Copyright (c) 2014-2017  International Institute of Social History
 #
@@ -19,7 +19,7 @@
 # Author: Lucien van Wouw <lwo@iisg.nl>
 
 
-package OpenILS::WWW::OAI;
+package OpenILS::WWW::SuperCat::OAI;
 use strict; use warnings;
 use Apache2::Const -compile => qw(OK REDIRECT DECLINED NOT_FOUND :log);
 use CGI;
@@ -106,7 +106,7 @@ sub handler {
     return Apache2::Const::DECLINED if (-e $apache->filename);
 
     unless (defined $oai) {
-        $logger->error('Application session variables not defined. Add \'PerlChildInitHandler OpenILS::WWW::OAI::child_init\' to the Apache virtual host configuration file.');
+        $logger->error('Application session variables not defined. Add \'PerlChildInitHandler OpenILS::WWW::SuperCat::OAI::child_init\' to the Apache virtual host configuration file.');
         child_init();
     }