http://qs321.pair.com?node_id=635815

vc_will_do has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks, I am new to mod_perl. I have written a startup script like this.

#!/usr/bin/perl BEGIN { use Bundle::Apache2 (); use Apache::DBI (); } use Apache2::Const -compile => qw(OK); $dbh = Apache::DBI->connect_on_init("DBI:mysql:database=dbname;host=lo +calhost","dbuser","dbpass",{ PrintError => 1, RaiseError => 0, AutoCo +mmit => 1}); 1;
On the line $dbh = Apache::DBI->connect_on_init, I am getting the error
Apache.pm was not loaded at ./startup.pl line 18
I have mod_perl2 installed. Thanks in advance.