[open-ils-commits] r8079 - in trunk/Open-ILS/src: perlmods/OpenILS/WWW support-scripts

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Nov 16 21:25:29 EST 2007


Author: miker
Date: 2007-11-16 21:08:27 -0500 (Fri, 16 Nov 2007)
New Revision: 8079

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent.pm
   trunk/Open-ILS/src/support-scripts/oils_header.pl
   trunk/Open-ILS/src/support-scripts/settings-tester.pl
Log:
replacing eval "use blah" with "blah"->use();

Modified: trunk/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent.pm	2007-11-17 02:07:32 UTC (rev 8078)
+++ trunk/Open-ILS/src/perlmods/OpenILS/WWW/AddedContent.pm	2007-11-17 02:08:27 UTC (rev 8079)
@@ -11,6 +11,7 @@
 use Apache2::RequestIO ();
 use Apache2::RequestUtil;
 use Data::Dumper;
+use UNIVERSAL::require;
 
 use OpenSRF::EX qw(:try);
 use OpenSRF::Utils::Cache;
@@ -61,7 +62,7 @@
 
     $logger->debug("Attempting to load Added Content handler: $ac_handler");
 
-    eval "use $ac_handler";
+    $ac_handler->use;
 
     if($@) {    
         $logger->error("Unable to load Added Content handler [$ac_handler]: $@"); 

Modified: trunk/Open-ILS/src/support-scripts/oils_header.pl
===================================================================
--- trunk/Open-ILS/src/support-scripts/oils_header.pl	2007-11-17 02:07:32 UTC (rev 8078)
+++ trunk/Open-ILS/src/support-scripts/oils_header.pl	2007-11-17 02:08:27 UTC (rev 8079)
@@ -17,9 +17,11 @@
 use OpenILS::Application::AppUtils;
 use OpenSRF::Utils::SettingsClient;
 use OpenSRF::Utils::Logger qw/:logger/;
+use UNIVERSAL::require;
 
 
 # Some useful objects
+our $cache = "OpenSRF::Utils::Cache";
 our $apputils = "OpenILS::Application::AppUtils";
 our $memcache;
 our $user;
@@ -107,8 +109,8 @@
 # Get a handle for the memcache object
 #----------------------------------------------------------------
 sub osrf_cache { 
-	eval 'use OpenSRF::Utils::Cache;';
-	$memcache = OpenSRF::Utils::Cache->new('global') unless $memcache;
+	$cache->use;
+	$memcache = $cache->new('global') unless $memcache;
 	return $memcache;
 }
 

Modified: trunk/Open-ILS/src/support-scripts/settings-tester.pl
===================================================================
--- trunk/Open-ILS/src/support-scripts/settings-tester.pl	2007-11-17 02:07:32 UTC (rev 8078)
+++ trunk/Open-ILS/src/support-scripts/settings-tester.pl	2007-11-17 02:08:27 UTC (rev 8079)
@@ -8,7 +8,7 @@
 	eval "use Error qw/:try/;";
 	die "Please install Error.pm.\n" if ($@);
 	eval "use UNIVERSAL::require;";
-	die "Please install the UNIVERSAL::Require perl module.\n" if ($@);
+	die "Please install the UNIVERSAL::require perl module.\n" if ($@);
 	eval "use Getopt::Long;";
 	die "Please install the Getopt::Long perl module.\n" if ($@);
 	eval "use Net::Domain;";



More information about the open-ils-commits mailing list