From 1da314f9232ba902d54bfc77315ad8418d066d83 Mon Sep 17 00:00:00 2001
From: Thomas Berezansky <tsbere@mvlc.org>
Date: Wed, 11 Apr 2012 13:26:42 -0400
Subject: [PATCH] mod_perl expects child_init return values

So add in Apache2::Const::OK returns on all of them.

[LFW: Added the same change to AutoSuggest.pm for consistency's sake.]

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
---
 Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent.pm           | 7 ++++---
 Open-ILS/src/perlmods/lib/OpenILS/WWW/AutoSuggest.pm            | 1 +
 Open-ILS/src/perlmods/lib/OpenILS/WWW/BadDebt.pm                | 1 +
 Open-ILS/src/perlmods/lib/OpenILS/WWW/Exporter.pm               | 1 +
 Open-ILS/src/perlmods/lib/OpenILS/WWW/IDL2js.pm                 | 1 +
 Open-ILS/src/perlmods/lib/OpenILS/WWW/PasswordReset.pm          | 1 +
 Open-ILS/src/perlmods/lib/OpenILS/WWW/Proxy.pm                  | 1 +
 Open-ILS/src/perlmods/lib/OpenILS/WWW/Proxy/Authen.pm           | 1 +
 Open-ILS/src/perlmods/lib/OpenILS/WWW/Reporter.pm               | 2 +-
 Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm               | 1 +
 Open-ILS/src/perlmods/lib/OpenILS/WWW/TemplateBatchBibUpdate.pm | 1 +
 Open-ILS/src/perlmods/lib/OpenILS/WWW/Vandelay.pm               | 1 +
 Open-ILS/src/perlmods/lib/OpenILS/WWW/XMLRPCGateway.pm          | 1 +
 13 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent.pm
index 0e85a54a34..9c0611f380 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent.pm
@@ -50,9 +50,9 @@ sub child_init {
     my $sclient = OpenSRF::Utils::SettingsClient->new();
     my $ac_data = $sclient->config_value("added_content");
 
-    return unless $ac_data;
+    return Apache2::Const::OK unless $ac_data;
     my $ac_handler = $ac_data->{module};
-    return unless $ac_handler;
+    return Apache2::Const::OK unless $ac_handler;
 
     $net_timeout = $ac_data->{timeout} || 1;
     $error_countdown = $max_errors = $ac_data->{max_errors} || 10;
@@ -64,11 +64,12 @@ sub child_init {
 
     if($@) {    
         $logger->error("Unable to load Added Content handler [$ac_handler]: $@"); 
-        return; 
+        return Apache2::Const::OK; 
     }
 
     $handler = $ac_handler->new($ac_data);
     $logger->debug("added content loaded handler: $handler");
+    return Apache2::Const::OK;
 }
 
 
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/AutoSuggest.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/AutoSuggest.pm
index 220f1b2466..c5d9ee1abe 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/AutoSuggest.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/AutoSuggest.pm
@@ -35,6 +35,7 @@ sub initialize {
 sub child_init {
     $cache = OpenSRF::Utils::Cache->new('global');
     $init_done = 1;
+    return Apache2::Const::OK;
 }
 
 # BEGIN package globals
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/BadDebt.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/BadDebt.pm
index 007623daeb..dbed38e20c 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/BadDebt.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/BadDebt.pm
@@ -37,6 +37,7 @@ sub import {
 
 sub child_init {
         OpenSRF::System->bootstrap_client( config_file => $bootstrap );
+        return Apache2::Const::OK;
 }
 
 sub handler {
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/Exporter.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/Exporter.pm
index 502df6a664..2fc4462cab 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/Exporter.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/Exporter.pm
@@ -47,6 +47,7 @@ sub import {
 
 sub child_init {
         OpenSRF::System->bootstrap_client( config_file => $bootstrap );
+        return Apache2::Const::OK;
 }
 
 sub handler {
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/IDL2js.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/IDL2js.pm
index ee5b2ef255..c55f137be9 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/IDL2js.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/IDL2js.pm
@@ -49,6 +49,7 @@ sub child_init {
     };
 
     $idl_doc = XML::LibXML->load_xml(location => $idl_file);
+    return Apache2::Const::OK;
 }
 
 
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/PasswordReset.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/PasswordReset.pm
index 17ec3059f0..60297e1c8f 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/PasswordReset.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/PasswordReset.pm
@@ -61,6 +61,7 @@ sub child_init {
     $actor = OpenSRF::AppSession->create('open-ils.actor');
     load_i18n();
     $init_done = 1;
+    return Apache2::Const::OK;
 }
 
 sub password_reset {
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/Proxy.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/Proxy.pm
index c9a85af4fa..04c43b3de1 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/Proxy.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/Proxy.pm
@@ -55,6 +55,7 @@ sub import {
 
 sub child_init {
 	OpenSRF::System->bootstrap_client( config_file => $bootstrap );
+	return Apache2::Const::OK;
 }
 
 sub handler {
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/Proxy/Authen.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/Proxy/Authen.pm
index 5bf6c1400c..dcf596ea9a 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/Proxy/Authen.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/Proxy/Authen.pm
@@ -27,6 +27,7 @@ sub import {
 
 sub child_init {
     OpenSRF::System->bootstrap_client( config_file => $bootstrap );
+    return Apache2::Const::OK;
 }
 
 sub handler {
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/Reporter.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/Reporter.pm
index 573bcd499a..0c1eca75c8 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/Reporter.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/Reporter.pm
@@ -49,7 +49,7 @@ sub child_init {
 	#$parser->expand_xinclude(1);
 
 	#$base_xml_doc = $parser->parse_file($base_xml);
-
+	return Apache2::Const::OK;
 }
 
 sub handler {
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm
index bc33b81f37..8fc95f1efe 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm
@@ -271,6 +271,7 @@ sub child_init {
             }
         }
     }
+    return Apache2::Const::OK;
 }
 
 sub check_child_init() {
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/TemplateBatchBibUpdate.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/TemplateBatchBibUpdate.pm
index f72ac17f90..6eb3064368 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/TemplateBatchBibUpdate.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/TemplateBatchBibUpdate.pm
@@ -48,6 +48,7 @@ sub import {
 sub child_init {
     OpenSRF::System->bootstrap_client( config_file => $bootstrap );
     Fieldmapper->import(IDL => OpenSRF::Utils::SettingsClient->new->config_value("IDL"));
+    return Apache2::Const::OK;
 }
 
 sub handler {
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/Vandelay.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/Vandelay.pm
index 0cdc41d395..72e4f38980 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/Vandelay.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/Vandelay.pm
@@ -49,6 +49,7 @@ sub import {
 
 sub child_init {
         OpenSRF::System->bootstrap_client( config_file => $bootstrap );
+        return Apache2::Const::OK;
 }
 
 sub spool_marc {
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/XMLRPCGateway.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/XMLRPCGateway.pm
index 26eb0a721f..554c1af8b2 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/XMLRPCGateway.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/XMLRPCGateway.pm
@@ -50,6 +50,7 @@ sub child_init {
 	OpenILS::Utils::Fieldmapper->require;
 	Fieldmapper->import(IDL => $idl);
 	OpenSRF::AppSession->ingress('apache');
+	return Apache2::Const::OK;
 }
 
 
-- 
2.11.0