in reply to Re: DBI connect problem
in thread DBI connect problem

I would refactor code like
if (!defined($dbh) ) { $errStr .= " [dbh UNDEFINED]".$testStr; $self->log_comment("ERROR: db_connect => ".$errStr); } else { $errStr .= " [dbh DEFINED]".$testStr; }
into
if (defined $dbh) { $errStr .= " [dbh DEFINED]".$testStr; } else { $errStr .= " [dbh UNDEFINED]".$testStr; $self->log_comment("ERROR: db_connect => ".$errStr); }
Idea of this refactoring is that if you have an if/else construct it makes sense to swap branches if it simplifies the condition.

--
Ilya Martynov (http://martynov.org/)