use Apache2::RequestIO ();
use Apache2::RequestUtil;
use Data::Dumper;
+use UNIVERSAL::require;
use OpenSRF::EX qw(:try);
use OpenSRF::Utils::Cache;
$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]: $@");
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;
# 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;
}
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;";