You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by as...@apache.org on 2010/02/03 23:54:03 UTC

svn commit: r906273 - in /perl/Apache-DBI/trunk: Changes lib/Apache/DBI.pm

Author: ask
Date: Wed Feb  3 22:54:02 2010
New Revision: 906273

URL: http://svn.apache.org/viewvc?rev=906273&view=rev
Log:
Fix bug to allow DBI in startup.pl etc again
Bug report from Adam Prime, patch from Lubomir Rintel
https://rt.cpan.org/Public/Bug/Display.html?id=36346

Modified:
    perl/Apache-DBI/trunk/Changes
    perl/Apache-DBI/trunk/lib/Apache/DBI.pm

Modified: perl/Apache-DBI/trunk/Changes
URL: http://svn.apache.org/viewvc/perl/Apache-DBI/trunk/Changes?rev=906273&r1=906272&r2=906273&view=diff
==============================================================================
--- perl/Apache-DBI/trunk/Changes (original)
+++ perl/Apache-DBI/trunk/Changes Wed Feb  3 22:54:02 2010
@@ -1,6 +1,9 @@
 Revision history for ApacheDBI.
 
 1.08
+  - Fix bug to allow DBI in startup.pl etc again
+    Bug report from Adam Prime, patch from Lubomir Rintel
+    https://rt.cpan.org/Public/Bug/Display.html?id=36346
 
 1.07 05/09/2008
   - http://rt.cpan.org/Public/Bug/Display.html?id=31003

Modified: perl/Apache-DBI/trunk/lib/Apache/DBI.pm
URL: http://svn.apache.org/viewvc/perl/Apache-DBI/trunk/lib/Apache/DBI.pm?rev=906273&r1=906272&r2=906273&view=diff
==============================================================================
--- perl/Apache-DBI/trunk/lib/Apache/DBI.pm (original)
+++ perl/Apache-DBI/trunk/lib/Apache/DBI.pm Wed Feb  3 22:54:02 2010
@@ -141,7 +141,9 @@
     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';