r65050 - in /branches/upstream/libapache-dbi-perl/current: Changes META.yml README lib/Apache/AuthDBI.pm lib/Apache/DBI.pm

periapt-guest at users.alioth.debian.org periapt-guest at users.alioth.debian.org
Fri Nov 19 13:34:10 UTC 2010


Author: periapt-guest
Date: Fri Nov 19 13:33:41 2010
New Revision: 65050

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=65050
Log:
[svn-upgrade] new version libapache-dbi-perl (1.09)

Modified:
    branches/upstream/libapache-dbi-perl/current/Changes
    branches/upstream/libapache-dbi-perl/current/META.yml
    branches/upstream/libapache-dbi-perl/current/README
    branches/upstream/libapache-dbi-perl/current/lib/Apache/AuthDBI.pm
    branches/upstream/libapache-dbi-perl/current/lib/Apache/DBI.pm

Modified: branches/upstream/libapache-dbi-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libapache-dbi-perl/current/Changes?rev=65050&op=diff
==============================================================================
--- branches/upstream/libapache-dbi-perl/current/Changes (original)
+++ branches/upstream/libapache-dbi-perl/current/Changes Fri Nov 19 13:33:41 2010
@@ -1,4 +1,11 @@
 Revision history for ApacheDBI.
+
+1.09 November 11, 2010
+  - Fix pod errors
+    Submitted by: Damyan Ivanov <dmn at debian.org>
+
+  - Adds PerlChildExitHandler to disconnect existing connections
+    Submitted by: Nick Wellnhoffer <wellnhofer at aevum.de>
 
 1.08 February 3rd, 2010
   - Fix bug to allow DBI in startup.pl etc again

Modified: branches/upstream/libapache-dbi-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libapache-dbi-perl/current/META.yml?rev=65050&op=diff
==============================================================================
--- branches/upstream/libapache-dbi-perl/current/META.yml (original)
+++ branches/upstream/libapache-dbi-perl/current/META.yml Fri Nov 19 13:33:41 2010
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               Apache-DBI
-version:            1.08
+version:            1.09
 abstract:           ~
 author:  []
 license:            unknown
@@ -18,7 +18,7 @@
     directory:
         - t
         - inc
-generated_by:       ExtUtils::MakeMaker version 6.55_02
+generated_by:       ExtUtils::MakeMaker version 6.56
 meta-spec:
     url:      http://module-build.sourceforge.net/META-spec-v1.4.html
     version:  1.4

Modified: branches/upstream/libapache-dbi-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libapache-dbi-perl/current/README?rev=65050&op=diff
==============================================================================
--- branches/upstream/libapache-dbi-perl/current/README (original)
+++ branches/upstream/libapache-dbi-perl/current/README Fri Nov 19 13:33:41 2010
@@ -1,7 +1,7 @@
 DESCRIPTION:
 ------------
 
-This is version 1.08 of Apache::AuthDBI and Apache::DBI.
+This is version 1.09 of Apache::AuthDBI and Apache::DBI.
 
 These modules are supposed to be used with the Apache server together with 
 an embedded perl interpreter like mod_perl. They provide support for basic 

Modified: branches/upstream/libapache-dbi-perl/current/lib/Apache/AuthDBI.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libapache-dbi-perl/current/lib/Apache/AuthDBI.pm?rev=65050&op=diff
==============================================================================
--- branches/upstream/libapache-dbi-perl/current/lib/Apache/AuthDBI.pm (original)
+++ branches/upstream/libapache-dbi-perl/current/lib/Apache/AuthDBI.pm Fri Nov 19 13:33:41 2010
@@ -1,7 +1,7 @@
 # $Id$
 package Apache::AuthDBI;
 
-$Apache::AuthDBI::VERSION = '1.08';
+$Apache::AuthDBI::VERSION = '1.09';
 
 # 1: report about cache miss
 # 2: full debug output
@@ -1356,6 +1356,8 @@
 
 =head1 LIST OF TOKENS
 
+=over
+
 =item * Auth_DBI_data_source (Authentication and Authorization)
 
 The data_source value has the syntax 'dbi:driver:dsn'. This parameter is
@@ -1469,6 +1471,8 @@
 Default is 'off'.  When set 'on', the select statement is prepared using a
 placeholder for the username.  This may result in improved performance for
 databases supporting this method.
+
+=back
 
 =head1 CONFIGURATION
 
@@ -1549,6 +1553,7 @@
 mod_perl versions less then 2.0.0 are NO longer supported.
 
 =head2 MOD_PERL 1.0
+
 Note that this module needs mod_perl-1.08 or higher, apache_1.3.0 or higher
 and that mod_perl needs to be configured with the appropriate call-back hooks:
 
@@ -1580,6 +1585,8 @@
 
 =head1 AUTHORS
 
+=over
+
 =item *
 Apache::AuthDBI by Edmund Mergl; now maintained and supported by the
 modperl mailinglist, subscribe by sending mail to 
@@ -1591,6 +1598,8 @@
 =item *
 DBI by Tim Bunce <dbi-users-subscribe at perl.org>
 
+=back
+
 =head1 COPYRIGHT
 
 The Apache::AuthDBI module is free software; you can redistribute it and/or

Modified: branches/upstream/libapache-dbi-perl/current/lib/Apache/DBI.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libapache-dbi-perl/current/lib/Apache/DBI.pm?rev=65050&op=diff
==============================================================================
--- branches/upstream/libapache-dbi-perl/current/lib/Apache/DBI.pm (original)
+++ branches/upstream/libapache-dbi-perl/current/lib/Apache/DBI.pm Fri Nov 19 13:33:41 2010
@@ -22,7 +22,7 @@
 
 require_version DBI 1.00;
 
-$Apache::DBI::VERSION = '1.08';
+$Apache::DBI::VERSION = '1.09';
 
 # 1: report about new connect
 # 2: full debug output
@@ -39,6 +39,9 @@
                                 #   a negative value de-activates ping,
                                 #   default = 0
 my %LastPingTime;               # keeps track of last ping per data_source
+my $ChildExitHandlerInstalled;  # set to true on installation of
+                                # PerlChildExitHandler
+my $InChild;
 
 # Check to see if we need to reset TaintIn and TaintOut
 my $TaintInOut = ($DBI::VERSION >= 1.31) ? 1 : 0;
@@ -131,6 +134,23 @@
         if ($Apache::ServerStarting and $Apache::ServerStarting == 1) {
             debug(2, "$prefix skipping connection during server startup, read the docu !!");
             return $drh->connect(@args);
+        }
+    }
+
+    # this PerlChildExitHandler is supposed to disconnect all open
+    # connections to the database
+    if (!$ChildExitHandlerInstalled) {
+        $ChildExitHandlerInstalled = 1;
+        my $s;
+        if (MP2) {
+            $s = Apache2::ServerUtil->server;
+        }
+        elsif (Apache->can('push_handlers')) {
+            $s = 'Apache';
+        }
+        if ($s) {
+            debug(2, "$prefix push PerlChildExitHandler");
+            $s->push_handlers(PerlChildExitHandler => \&childexit);
         }
     }
 
@@ -212,6 +232,22 @@
             shift @$aref;
             DBI->connect(@$aref);
             $LastPingTime{@$aref[0]} = time;
+        }
+    }
+
+    1;
+}
+
+# The PerlChildExitHandler disconnects all open connections
+sub childexit {
+
+    my $prefix = "$$ Apache::DBI            ";
+    debug(2, "$prefix PerlChildExitHandler");
+
+    foreach my $dbh (values(%Connected)) {
+        eval { DBI::db::disconnect($dbh) };
+        if ($@) {
+            debug(2, "$prefix DBI::db::disconnect failed - $@");
         }
     }
 
@@ -517,7 +553,7 @@
   PERL_CHILD_INIT=1 PERL_STACKED_HANDLERS=1
 
 Apache::DBI v0.94 was the last version before dual mod_perl 2.x support was begun.
-It still recommened that you use the latest version of Apache::DBI because Apache::DBI
+It still recommended that you use the latest version of Apache::DBI because Apache::DBI
 versions less than 1.00 are NO longer supported.
 
 =head1 DO YOU NEED THIS MODULE?
@@ -537,6 +573,8 @@
 
 =head1 AUTHORS
 
+=over
+
 =item *
 Philip M. Gollucci <pgollucci at p6m7g8.com> is currently packaging new releases.
 
@@ -553,6 +591,8 @@
 =item *
 DBI by Tim Bunce <dbi-users-subscribe at perl.org>
 
+=back
+
 =head1 COPYRIGHT
 
 The Apache::DBI module is free software; you can redistribute it and/or




More information about the Pkg-perl-cvs-commits mailing list