Add basic client-side AJAX wrappers
[koha.git] / Makefile.PL
index 3150394..e5c1e79 100644 (file)
@@ -413,6 +413,9 @@ my %config_defaults = (
   'PAZPAR2_PORT' => '11002',
   'RUN_DATABASE_TESTS' => 'no',
   'PATH_TO_ZEBRA' => '',
+  'USE_MEMCACHED'     => 'no',
+  'MEMCACHED_SERVERS' => '127.0.0.1:11211',
+  'MEMCACHED_NAMESPACE' => 'KOHA'
 );
 
 # set some default configuration options based on OS
@@ -449,6 +452,7 @@ my %valid_config_values = (
   'ZEBRA_MARC_FORMAT' => { 'marc21' => 1, 'unimarc' => 1 }, # FIXME should generate from contents of distributation
   'ZEBRA_LANGUAGE'    => { 'en' => 1, 'fr' => 1 }, # FIXME should generate from contents of distribution
   'RUN_DATABASE_TESTS' => { 'yes' => 1, 'no' => 1 },
+  'USE_MEMCACHED'      => { 'yes' => 1, 'no' => 1 },
 );
 
 # get settings from command-line
@@ -549,6 +553,7 @@ WriteMakefile(
                             'Date::ICal'                       => 1.72,
                             'Date::Manip'                      => 5.44,
                             'Digest::MD5'                      => 2.36,
+                            'Digest::SHA'                      => 5.43,
                             'Email::Date'                      => 1.103,
                             'File::Temp'                       => 0.16,
                             'GD'                               => 2.39,    #optional
@@ -560,6 +565,7 @@ WriteMakefile(
                             'HTTP::Cookies'                    => 1.39,
                             'HTTP::OAI'                        => 3.20,
                             'HTTP::Request::Common'            => 1.26,
+                            'IPC::Cmd'                         => 0.46,
                             'JSON'                             => 2.07, # Needed by admin/item_circulation_alerts.pl
                             'LWP::Simple'                      => 1.41,
                             'LWP::UserAgent'                   => 2.033,
@@ -575,6 +581,7 @@ WriteMakefile(
                             'MIME::Lite'                       => 3.00,
                             'MIME::QuotedPrint'                => 3.07,
                             'Mail::Sendmail'                   => 0.79,
+                            'Memoize::Memcached'               => 0.03, # optional
                             'Net::LDAP'                        => 0.33, # optional
                             'Net::LDAP::Filter'                => 0.14, # optional
                             'Net::Z3950::ZOOM'                 => 1.16,
@@ -598,6 +605,7 @@ WriteMakefile(
                             'Time::HiRes'                      => 1.86,
                             'Time::localtime'                  => 1.02,
                             'Unicode::Normalize'               => 0.32,
+                            'URI::Escape'                      => 1.36,
                             'XML::Dumper'                      => 0.81,
                             'XML::LibXML'                      => 1.59,
                             'XML::LibXSLT'                     => 1.59,
@@ -1080,6 +1088,26 @@ PazPar2 port?);
 
         }
     }
+  $msg = q(
+Use memcached and memoize to cache the results of some function calls? 
+This provides a signficant performance improvement. 
+You will need a Memcached server running.);
+  $msg .= _add_valid_values_disp('USE_MEMCACHED', $valid_values);
+  $config{'USE_MEMCACHED'} = _get_value('USE_MEMCACHED', $msg, $defaults->{'USE_MEMCACHED'}, $valid_values, $install_log_values);
+  if ($config{'USE_MEMCACHED'} eq 'yes'){
+      $msg = q(
+Since you've chosen to use caching, you must specify the memcached servers and the namespace to use:
+);
+      $msg = q(
+Memcached server address?);
+      $config{'MEMCACHED_SERVERS'} = _get_value('MEMCACHED_SERVERS', $msg, $defaults->{'MEMCACHED_SERVERS'}, $valid_values, $install_log_values);
+       
+      $msg = q(
+Memcached namespace?);
+      $config{'MEMCACHED_NAMESPACE'} = _get_value('MEMCACHED_NAMESPACE', $msg, $defaults->{'MEMCACHED_NAMESPACE'}, $valid_values, $install_log_values);
+  }
+
+
 
   $msg = q(
 Would you like to run the database-dependent test suite?);