Skip Menu |

This queue is for tickets about the Apache-DBI CPAN distribution.

Report information
The Basics
Id: 13670
Status: resolved
Priority: 0/
Queue: Apache-DBI

People
Owner: Nobody in particular
Requestors: eugene [...] donpac.ru
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: undefined MOD_PERL_API_VERSION
Apache::DBI 0.94 perl 5.8.7 apache 1.3.33 mod_perl 1.29 FreeBSD 5.4-RELEASE-p4 I get the following error upon starting Apache: Use of uninitialized value in numeric eq (==) at /usr/local/lib/perl5/site_perl/5.8.7/Apache/DBI.pm line 211. Use of uninitialized value in numeric eq (==) at /usr/local/lib/perl5/site_perl/5.8.7/Apache/DBI.pm line 35. I've patched Apache::DBI a little to get rid of these. I just had to add a few "if exists $ENV{MOD_PERL_API_VERSION}". As I can see someone already tried to fix 0.98 but a couple of lines still need to be patched. The patch for Apache::DBI 0.98 follows: --- DBI.pm.orig Fri Jul 1 04:00:12 2005 +++ DBI.pm Wed Jul 13 12:54:13 2005 @@ -32,7 +32,7 @@ sub connect_on_init { # provide a handler which creates all connections during server startup - if ($ENV{MOD_PERL_API_VERSION} == 2) { + if (exists $ENV{MOD_PERL_API_VERSION} && $ENV{MOD_PERL_API_VERSION} == 2) { if (!@ChildConnect) { require Apache2::ServerUtil; my $s = Apache2::ServerUtil->server; @@ -114,7 +114,7 @@ my $needCleanup = ($Idx =~ /AutoCommit[^\d]+0/) ? 1 : 0; if(!$Rollback{$Idx} and $needCleanup and Apache->can('push_handlers')) { print STDERR "$prefix push PerlCleanupHandler \n" if $Apache::DBI::DEBUG > 1; - if ($ENV{MOD_PERL_API_VERSION} == 2) { + if (exists $ENV{MOD_PERL_API_VERSION} && $ENV{MOD_PERL_API_VERSION} == 2) { require Apache2::ServerUtil; my $s = Apache2::ServerUtil->server; $s->push_handlers("PerlCleanupHandler", \&cleanup);
--- DBI.pm.orig Fri Jul 1 04:00:12 2005 +++ DBI.pm Wed Jul 13 12:54:13 2005 @@ -32,7 +32,7 @@ sub connect_on_init { # provide a handler which creates all connections during server startup - if ($ENV{MOD_PERL_API_VERSION} == 2) { + if (exists $ENV{MOD_PERL_API_VERSION} && $ENV{MOD_PERL_API_VERSION} == 2) { if (!@ChildConnect) { require Apache2::ServerUtil; my $s = Apache2::ServerUtil->server; @@ -114,7 +114,7 @@ my $needCleanup = ($Idx =~ /AutoCommit[^\d]+0/) ? 1 : 0; if(!$Rollback{$Idx} and $needCleanup and Apache->can('push_handlers')) { print STDERR "$prefix push PerlCleanupHandler \n" if $Apache::DBI::DEBUG > 1; - if ($ENV{MOD_PERL_API_VERSION} == 2) { + if (exists $ENV{MOD_PERL_API_VERSION} && $ENV{MOD_PERL_API_VERSION} == 2) { require Apache2::ServerUtil; my $s = Apache2::ServerUtil->server; $s->push_handlers("PerlCleanupHandler", \&cleanup);
[guest - Wed Jul 13 05:15:52 2005]: Show quoted text
> Apache::DBI 0.94
[...] Show quoted text
> The patch for Apache::DBI 0.98 follows:
Which is it? 0.94 or 0.98? I didn't make any 0.98 version. :-) (I am making a 0.95 which will support the new versions of mod_perl 2 though). - ask