Hello Monks,
Thanks for your help with my
DBI question. In that node I asked why I was getting a warning when I called DBI->connect() like so ...
DBI->connect( $dbname, $dbuser, $dbpass, $dbd );
The answer is that with the new version of DBI I should call DBI->connect() like this ...
DBI->connect("dbi:$dbd:$dbname", $user, $pass);
Now what I would like to know is how would I go about doing something like this ...
my $DBI_version = getDBI_Version();
if ( $DBI_version > $oldstyle ) {
$dbh = DBI->connect("dbi:$dbd:$dbname", $user, $pass);
} else {
$dbh = DBI->connect( $dbname, $dbuser, $dbpass, $dbd );
}
Does this make any sense? Or am I make this issue too complicated?