perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip M. Gollucci" <>
Subject Re: Apache::DBI and mod_perl 2.0.1
Date Sat, 02 Jul 2005 06:25:34 GMT
Vincent Moneymaker wrote:
> Philip, I think I've spotted another small Apache/DBI issue that I 
> thought I would run by you.
> In the 'connect' function inside the module (as opposed to the 
> Apache/ there are somes lines about 12 lines down from the start 
> of the 'connect' function that reads as follows
> $connect_meth ||= $DBI::connect_via;    # fallback to default
> $dsn ||= $ENV{DBI_DSN} || $ENV{DBI_DBNAME} || '' unless $old_driver;
> if ($DBI::dbi_debug) {
> local $^W = 0;
> pop @_ if $connect_meth ne 'connect';
> my @args = @_; $args[2] = '****'; # hide password
> DBI->trace_msg("    -> $class->$connect_meth(".join(", ",@args).")\n");
> }
> This looks like the last value of the @arg array will be popped off 
> where the $connect_meth value has been set to Apache::DBI::connect via 
> the $DBI::connect_via variable.  It doesn't seem like a big deal but I 
> could see how it would drive someone crazy if they turned on 
> $DBI::dbi_debug and they weren't getting the messages back that they 
> expected.  Let me know if I am wrong on this and what I should do if I 
> am right.

You are correct in what it does; however, its not an issue as far as I 
can see.  The reason being is that the last arg of connect is the 
\%attrs hash ref.  Its replacing the password with *'s and then showing 
all SCALAR (aka simple to the lazy programer) parameters :)

dbi-users (at) perl (dot) org
[No worries I read this list too :)]

would be able more sutied to answer DBI specific questions.  I'm 
assuming you pointed this out b/c you didn't get the message you 
expected. Examples ?

     What doesn't kill us can only make us stronger.
                 Nothing is impossible.
Philip M. Gollucci ( 301.254.5198
Consultant /
Senior Developer / Liquidity Services, Inc.

View raw message