CVS: koha installer.pl,1.2.2.1,1.2.2.2
Update of /cvsroot/koha/koha In directory usw-pr-cvs1:/tmp/cvs-serv5541/koha Modified Files: Tag: rel-1-2 installer.pl Log Message: Added testing for Perl and dependancies Index: installer.pl =================================================================== RCS file: /cvsroot/koha/koha/installer.pl,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.2 diff -C2 -r1.2.2.1 -r1.2.2.2 *** installer.pl 26 Apr 2002 14:47:17 -0000 1.2.2.1 --- installer.pl 9 May 2002 09:26:47 -0000 1.2.2.2 *************** *** 10,15 **** - - This installer will prompt you with a series of questions. It assumes you (or your system administrator) has installed: --- 10,13 ---- *************** *** 57,62 **** system("tar -x $answer"); #unpack fill out ! #test for Perl and Apache? print "Are you using MySql?(Y/[N]): "; $answer = $_; --- 55,93 ---- system("tar -x $answer"); #unpack fill out + # + # Test for Perl - Do we need to explicity check versions? + # + print "\nChecking perl modules ...\n"; + unless (eval "require 5.004") { + die "Sorry, you need at least Perl 5.004\n"; + } + + + # + # Test for Perl Dependancies + # + my @missing = (); + unless (eval require DBI) { push @missing,"DBI" }; + unless (eval require Date::Manip) { push @missing,"Datr::Manip" } + unless (eval require DBD::mysql) { push @missing,"DBD::mysql" } + unless (eval require Set::Scalar) { push @missing,"Set::Scalar" } + + # + # Print out a list of any missing modules + # + + if (@missing > 0) { + print "\n\n"; + print "You are missing some Perl modules which are required by Koha.\n"; + print "They can be installed by running (as root) the following:\n"; + foreach my $module (@missing) { + print " perl -MCPAN -e 'install \"$module\"'\n"; + } + print "\n"; + exit; + } + ! #test for MySQL? print "Are you using MySql?(Y/[N]): "; $answer = $_;
participants (1)
-
Mike Mylonas