LameNerd has asked for the wisdom of the Perl Monks concerning the following question:
The answer is that with the new version of DBI I should call DBI->connect() like this ...DBI->connect( $dbname, $dbuser, $dbpass, $dbd );
Now what I would like to know is how would I go about doing something like this ...DBI->connect("dbi:$dbd:$dbname", $user, $pass);
Does this make any sense? Or am I make this issue too complicated?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 ); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How do I determine module version in my script?
by NetWallah (Canon) on Jul 23, 2003 at 17:11 UTC | |
|
Re: How do I determine module version in my script?
by moxliukas (Curate) on Jul 23, 2003 at 17:09 UTC | |
|
Re: How do I determine module version in my script? ( END{if defined $opt_versions...} )
by ybiC (Prior) on Jul 23, 2003 at 17:33 UTC |