<Perl>
#define options:
#interactive debugger: httpd -X -DPERLDB
#DProf: httpd -X -DPERLDPROF
#SmallProf: httpd -X -DPERLSMALLPROF
my @dbs = qw(DB DProf SmallProf);
my $init_db = 0;
my $handler = "";
for (@dbs) {
my $define = "PERL\U$_";
next unless $init_db = Apache->define($define);
$handler = "Apache::$_";
last;
}
if ($init_db) {
require Apache::DB;
Apache::DB::->init;
eval "require $handler;";
die $@ if $@;
print "Apache::DB configured with $handler\n";
push @{ $Location{'/'}->{PerlFixupHandler} }, $handler;
}
</Perl>