From d7aedb51928bf5f6e5ffbc360bd6129850b54c85 Mon Sep 17 00:00:00 2001 From: tonnesen Date: Mon, 22 Jul 2002 22:41:59 +0000 Subject: [PATCH] Test for Net::Z3950 --- installer.pl | 57 +++++++++++++++++++++++++++++++++++++--------------- koha.upgrade | 34 +++++++++++++++---------------- 2 files changed, 57 insertions(+), 34 deletions(-) diff --git a/installer.pl b/installer.pl index 4bab2cc27e..d9f0ccf83b 100644 --- a/installer.pl +++ b/installer.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl -w # please develop with -w -use diagnostics; +#use diagnostics; use strict; # please develop with the strict pragma if ($<) { @@ -128,21 +128,21 @@ unless (eval {require DBI}) { push @missing,"DBI" }; unless (eval {require Date::Manip}) { push @missing,"Date::Manip" }; unless (eval {require DBD::mysql}) { push @missing,"DBD::mysql" }; unless (eval {require Set::Scalar}) { push @missing,"Set::Scalar" }; -#unless (eval {require Net::Z3950}) { -# print qq| -# -#The Net::Z3950 module is missing. This module is necessary if you want to use -#Koha's Z39.50 client to download bibliographic records from other libraries. -#To install this module, you will need the yaz client installed from -#http://www.indexdata.dk/yaz/ and then you can install the perl module with the -#command: -# -#perl -MCPAN -e 'install Net::Z3950' -# -#Press the key to continue: -#|; -# ; -#} +unless (eval {require Net::Z3950}) { + print qq| + +The Net::Z3950 module is missing. This module is necessary if you want to use +Koha's Z39.50 client to download bibliographic records from other libraries. +To install this module, you will need the yaz client installed from +http://www.indexdata.dk/yaz/ and then you can install the perl module with the +command: + +perl -MCPAN -e 'install Net::Z3950' + +Press the key to continue: +|; + ; +} # # Print out a list of any missing modules @@ -330,6 +330,31 @@ foreach my $httpdconf (qw(/usr/local/apache/conf/httpd.conf close(HTTPDCONF); } } +unless ($realhttpdconf) { + print qq| + +I was not able to find your apache configuration file. It is usually +called httpd.conf or apache.conf. +|; + print "Where is your Apache configuratin file? "; + chomp($input = ); + + if ($input) { + $realhttpdconf = $input; + } else { + $realhttpdconf=''; + } + if ( -f $realhttpdconf ) { + open (HTTPDCONF, $realhttpdconf) or warn "Insufficient privileges to open $realhttpdconf for reading.\n"; + while () { + if (/^\s*User\s+"?([-\w]+)"?\s*$/) { + $httpduser = $1; + } + } + close(HTTPDCONF); + } +} + unless ($httpduser) { print qq| diff --git a/koha.upgrade b/koha.upgrade index e9bcec2b0a..668798ffa4 100644 --- a/koha.upgrade +++ b/koha.upgrade @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -use diagnostics; +#use diagnostics; use strict; # please develop with the strict pragma @@ -123,23 +123,21 @@ unless (eval {require DBI}) { push @missing,"DBI" }; unless (eval {require Date::Manip}) { push @missing,"Date::Manip" }; unless (eval {require DBD::mysql}) { push @missing,"DBD::mysql" }; unless (eval {require Set::Scalar}) { push @missing,"Set::Scalar" }; -unless (eval {require Digest::MD5}) { push @missing,"Digest::MD5" }; -unless (eval {require HTML::Template}) { push @missing,"HTML::Template" }; -#unless (eval {require Net::Z3950}) { -# print qq| -# -#The Net::Z3950 module is missing. This module is necessary if you want to use -#Koha's Z39.50 client to download bibliographic records from other libraries. -#To install this module, you will need the yaz client installed from -#http://www.indexdata.dk/yaz/ and then you can install the perl module with the -#command: -# -#perl -MCPAN -e 'install Net::Z3950' -# -#Press the key to continue: -#|; -# ; -#} +unless (eval {require Net::Z3950}) { + print qq| + +The Net::Z3950 module is missing. This module is necessary if you want to use +Koha's Z39.50 client to download bibliographic records from other libraries. +To install this module, you will need the yaz client installed from +http://www.indexdata.dk/yaz/ and then you can install the perl module with the +command: + +perl -MCPAN -e 'install Net::Z3950' + +Press the key to continue: +|; + ; +} # # Print out a list of any missing modules -- 2.39.5