1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
# Description: backport fix for loading from startup.pl from 1.08
# Origin: upstream, http://search.cpan.org/diff?from=Apache-DBI-1.07&to=Apache-DBI-1.08
# Bug: https://rt.cpan.org/Public/Bug/Display.html?id=36346
# Bug-Debian: http://bugs.debian.org/568534
--- a/lib/Apache/DBI.pm
+++ b/lib/Apache/DBI.pm
@@ -141,7 +141,9 @@ sub connect {
if (!$Rollback{$Idx}) {
my $r;
if (MP2) {
- $r = Apache2::RequestUtil->request;
+ # We may not actually be in a request, but in <Perl> (or
+ # equivalent such as startup.pl), in which case this would die.
+ eval { $r = Apache2::RequestUtil->request };
}
elsif (Apache->can('push_handlers')) {
$r = 'Apache';
|