Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: trevor.schellhorn-perl [...] marketingtips.com
Cc:
AdminCc:

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



Subject: Apache::DBI dumps unnecessary warnings to Apache log files
When using Apache::DBI with some DBI->connect calls, unnecessary warnings about uninitialized variables get dumped on every call. These warnings are generated when not enough information is passed to the connect() method. This can happen when using DBI_DSN to make the connection to the web server. We are experiencing this when we are using mysql_read_defaults_file directive in the DBI_DSN. We don't pass in a password or username and these end up being uninitialized in the information that gets passed to the Apache::DBI::connect method. The attached patch disables warnings when making the unique connect string for the connection.
--- DBI.pm 2004-01-09 17:53:18.000000000 -0800 +++ /opt/lib/perl5/site_perl/5.8.3/Apache/DBI.pm 2004-01-22 10:40:28.000000000 -0800 @@ -72,6 +72,7 @@ # the hash-reference differs between calls even in the same # process, so de-reference the hash-reference if (3 == $#args and ref $args[3] eq "HASH") { + local $^W; map { $Idx .= "$;$_=$args[3]->{$_}" } sort keys %{$args[3]}; } elsif (3 == $#args) { pop @args;
From: ask [...] develooper.com
[guest - Thu Jan 22 13:46:39 2004]: Show quoted text
> When using Apache::DBI with some DBI->connect calls, unnecessary > warnings about uninitialized variables get dumped on every call. > These warnings are generated when not enough information is passed > to the connect() method. This can happen when using DBI_DSN to > make the connection to the web server. We are experiencing this > when we are using mysql_read_defaults_file directive in the > DBI_DSN. We don't pass in a password or username and these end up > being uninitialized in the information that gets passed to the > Apache::DBI::connect method. The attached patch disables warnings > when making the unique connect string for the connection.
Thanks. I've fixed this in my development version. - ask