You should either add this bin directory to your system path following the instructions earlier in this chapter in Error Message About MySQL Executable Programs Not Being
Found or Recognized or specify the full path to the Perl interpreter whenever you see perl for the remainder of this chapter.
If
Perl is available, the command will display several lines of text describing the version and other configuration details. If Perl is not installed, you’ll see an error message saying something
like command not found(Linux or Mac OS Xor 'perl' is not recognized as an internal or external command,
operable program or batch file(Windows).
You can find more information on obtaining and installing Perl at
http://www.perl.org/get.html, and more information
on installing modules at http://www.cpan.org/modules/INSTALL.html. Fora Linux system, download and install the Perl package for your distribution according to the instructions
in Installing MySQL, Apache, PHP, and Perl on Linux Using Distribution Packages Fora Windows or Mac OS X system, check that you’ve installed XAMPP correctly.
Once you
know that Perl is installed, you can test whether the DBI and CGI modules are installed by asking the Perl interpreter to use these modules to run an empty Perl script. To check whether the DBI module is installed, type
perl -mDBI -e ''If you see an error
message that Perl Cant locate DBI.pm, you’ll need to install the module yourself. Similarly, check whether the CGI
module is installed by typing perl -mCGI -e ''If the DBI module is installed, you should also check whether the MySQL database driver (DBD) is installed. An easy way to do this is to ask Perl to printout all the
drivers that are available perl -e "use DBI; foreach d (DBI->available_drivers()){print $d;}"DBMExamplePFileSpongemysql
If you don’t seethe letters “mysql”, you’ll need to install the MySQL database driver.
Share with your friends: