use strict; use lib qw(/home/httpd/lib /home/httpd/extra-lib); $ENV{MOD_PERL} or die "not running under mod_perl!"; use Apache::Registry (); use LWP::UserAgent (); use Apache::DBI (); use DBI (); use Carp (); $SIG{__WARN__} = \&Carp::cluck; use CGI (); CGI->compile(':all'); Apache::DBI->connect_on_init ("DBI:mysql:database=test;host=localhost", "user", "password", { PrintError => 1, # warn() on errors RaiseError => 0, # don't die on error AutoCommit => 1, # commit executes immediately } ); 1;